-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add the tenant into the short URL once the short URL is resolved #1462
Add the tenant into the short URL once the short URL is resolved #1462
Conversation
883c6c6
to
95a020c
Compare
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. Waiting on CI before approval. Thank you for being on top of addressing comments
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1462 +/- ##
=======================================
Coverage 65.62% 65.62%
=======================================
Files 93 93
Lines 2307 2307
Branches 314 314
=======================================
Hits 1514 1514
Misses 725 725
Partials 68 68 ☔ View full report in Codecov by Sentry. |
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
…mments. Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
…ct#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]>
Hey @leanneeliatra I'd suggest writing a unit test in jest and an end-to-end test in functional test repo. |
Thanks @DarshitChanpura, The unit test is done, I'll do the end-to-end test in cypress in the functional test repo. |
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.
Thank you @leanneeliatra! This change looks good to me. I am adding the backport 2.x label.
* More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit e9f9576)
…) (#1485) * More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit e9f9576) Co-authored-by: leanneeliatra <[email protected]>
The backport to
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-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-1462-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e9f95763a16f5e42247830ff6083af6ef7014e9b
# Push it to GitHub
git push --set-upstream origin backport/backport-1462-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x Then, create a pull request where the |
The backport to
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-1.3 1.3
# Navigate to the new working tree
cd .worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-1462-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e9f95763a16f5e42247830ff6083af6ef7014e9b
# Push it to GitHub
git push --set-upstream origin backport/backport-1462-to-1.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.3 Then, create a pull request where the |
…nsearch-project#1462) * More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (opensearch-project#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (opensearch-project#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit e9f9576)
…nsearch-project#1462) * More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (opensearch-project#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (opensearch-project#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit e9f9576)
…s resolved (#1462) (#1514) * Add the tenant into the short URL once the short URL is resolved (#1462) * More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit e9f9576) * Linter fix Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: leanneeliatra <[email protected]>
…s resolved (#1462) (#1516) * Add the tenant into the short URL once the short URL is resolved (#1462) * More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit e9f9576) * Linter fix Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: leanneeliatra <[email protected]>
…nsearch-project#1462) * More information added Signed-off-by: leanneeliatra <[email protected]> * More information added Signed-off-by: leanneeliatra <[email protected]> * fixed linting errors Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Extracting function to tenant_resolver and adding more appropriate comments. Signed-off-by: leanneeliatra <[email protected]> * lint errors fixed Signed-off-by: leanneeliatra <[email protected]> * Use version from package.json for integration tests (opensearch-project#1463) * Use version from package.json for integration tests Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Adds 2.8 release notes (opensearch-project#1464) Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Cleaning up comments Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * linting issues resolved Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Removing Prerequisite Checks Workflow (opensearch-project#1456) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * Update server/multitenancy/tenant_resolver.ts Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> * comments addressed & linting amended Signed-off-by: leanneeliatra <[email protected]> * integration test fix following rebase Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: leanneeliatra <[email protected]> --------- Signed-off-by: leanneeliatra <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Leanne Lacey-Byrne <[email protected]> Signed-off-by: leanneeliatra <[email protected]> Co-authored-by: Ryan Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: Sam <[email protected]>
Description
This is a duplicate PR (closed) to #1443,
Copying the changes from a branch branched from main allowed me a cleaner & safer way to perform similar rebase.
When the tenancy is being changed after copying a short URL, if the user then pastes this short URL into a new tab, the user will be redirected to the current selected tenant, not the tenant as specified in the copied short URL.
We need to retain this information in the URL and redirect so the user is brought to the correct link, with the correct user.
Category
[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
Why these changes are required?
To enable sharing of a short URL with the tenant as specified in the URL remaining selected as the active tenant.
What is the old behavior before changes and new behavior after changes?
The old behaviour is:
The new behaviour is:
The goal of the piece of code
How it is done
Why it is done this way
Other attempted solutions:
The first solution implemented to fix this issue, was to wipe the local storage to solve this issue.
However, once it was done, I realised the localstorage value was needed elsewhere & could not be wiped as intended.
New solutions were considered, perhaps using a cookie, which came with it's own challenges to change how localstorage is currently being used.
In the end, the solution that maintained the localstorage (as it was needed in the code for other purposes) and solved the issue at hand (couldn't change the tenant after copying the short URL), was to, if the tenant was changed in multitenancy mode, to make sure the tenant information remained in the short URL (it was there before page load but is removed from the resolved URL, we ensured the tenant information was retained in the resolved URL) and also, remove any specifics of the URL (so the user wouldn't be brought to a dashboard that doesn't exist in that tenant and get an error message).
Issues Resolved
[BUG] Shortlinks to other Tenants do not work #1203
Testing
Submitting the PR for an initial review of changes, tests will follow.
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.