Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tenant tab when disabled via yaml #1960

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented May 15, 2024

Description

Removes tenant tab from showing up in the left nav, and also doesn't register it as a page at /tenants if tenancy is turned off/not enabled via yaml. Since workspaces is coming and no active development being done on the tenancy feature, this is appropriate. Also gets rid of a few "ghost" routes and UI components related to different tenancy tabs (manage vs configure), since these were not connected to any UI component and would only be hit unexpectedly or if people know the exact route to put in the URL.

Category

Enhancement

Why these changes are required?

Fix: #1959

What is the old behavior before changes and new behavior after changes?

New behavior: when multi tenancy is turned off via dashboards yaml, tenancy does not show up in the left nav, explicitly navigating to '/tenants' does not do anything

Issues Resolved

Fix: #1959

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 45.83333% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 69.91%. Comparing base (37c2695) to head (9404930).

Files Patch % Lines
public/apps/configuration/app-router.tsx 57.89% 7 Missing and 1 partial ⚠️
public/apps/configuration/panels/get-started.tsx 0.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1960   +/-   ##
=======================================
  Coverage   69.91%   69.91%           
=======================================
  Files          97       96    -1     
  Lines        2506     2513    +7     
  Branches      336      339    +3     
=======================================
+ Hits         1752     1757    +5     
  Misses        673      673           
- Partials       81       83    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@derek-ho derek-ho marked this pull request as ready for review May 15, 2024 19:07
@derek-ho
Copy link
Collaborator Author

Failing cypress test case should be changed to instead assert that tenancy tab does not show up on the left nav menu. That test is not being run at release time, will move that over in a separate PR

@derek-ho derek-ho added the backport 2.x backport to 2.x branch label May 15, 2024
@derek-ho
Copy link
Collaborator Author

Test fix is within this PR: opensearch-project/opensearch-dashboards-functional-test#1276

derek-ho added 3 commits May 16, 2024 13:44
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@DarshitChanpura DarshitChanpura merged commit a202d48 into opensearch-project:main May 19, 2024
19 of 20 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1960-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a202d4875ae42729994b64fb38090af6b7f1ae7a
# Push it to GitHub
git push --set-upstream origin backport/backport-1960-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1960-to-2.x.

@DarshitChanpura
Copy link
Member

@derek-ho Could you create a manual backport?

derek-ho added a commit to derek-ho/security-dashboards-plugin that referenced this pull request May 20, 2024
stephen-crawford pushed a commit that referenced this pull request May 21, 2024
* Remove tenant tab when disabled via yaml (#1960)

---------

Signed-off-by: Derek Ho <[email protected]>

* Update snapshot

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
DarshitChanpura added a commit to DarshitChanpura/security-dashboards-plugin that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Remove tenancy tab if turned off via dashboards config
4 participants