-
Notifications
You must be signed in to change notification settings - Fork 174
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
Disable tenancy pop-ups when disabled or default tenant set #1759
Conversation
…fault tenant set Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
…rds-plugin into tenancy
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1759 +/- ##
==========================================
+ Coverage 67.09% 67.27% +0.17%
==========================================
Files 94 94
Lines 2404 2408 +4
Branches 318 320 +2
==========================================
+ Hits 1613 1620 +7
+ Misses 713 711 -2
+ Partials 78 77 -1 ☔ View full report in Codecov by Sentry. |
Usages of setShowTenancyPopup: Seems like the existing logic is as follows: However, there may be a bug here since the value would never be true. Regardless, we should not rely on sessionstorage since this is lost whenever the page is closed, thus leading to the observed bug. |
There is some larger cleanup effort with the session/local storage overall which I don't think belong in this PR. Created a follow up issue: #1761 |
@derek-ho wdyt about this approach? I'm reading through the current code and I believe this is the original intent.
Simplify the existing block to:
All of the logic can be encapsulated in |
Signed-off-by: Derek Ho <[email protected]>
…rds-plugin into tenancy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thank you for addressing all comments. 🚢
Signed-off-by: Derek Ho <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: Derek Ho <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit b1e986c)
…1763) Signed-off-by: Derek Ho <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit b1e986c) Co-authored-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit b1e986c)
Description
Even if tenancy is disabled or a default tenant is set, OSD still shows the pop-up based on session-storage/the browser. This adds some sanity checks on whether we should show it.
Situations covered:
Not covered/not sure how to check:
Category
[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
Why these changes are required?
What is the old behavior before changes and new behavior after changes?
Issues Resolved
Fix: #1717
Testing
[Please provide details of testing done: unit testing, integration testing and manual testing]
Check List
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.