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

Fix a bug where basepath nextUrl is invalid when it should be valid #2096

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Aug 21, 2024

Description

Fixes a bug when OSD is run with a basepath that basepath is an invalid nexturl, when it should be allowed

Category

Bug fix

Why these changes are required?

Fix: #2097

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

now basepath is a valid nexturl

Issues Resolved

Fix: Fix: #2097

Testing

Added a unit test

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 Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.39%. Comparing base (487c571) to head (4a45d98).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2096   +/-   ##
=======================================
  Coverage   71.39%   71.39%           
=======================================
  Files          97       97           
  Lines        2650     2650           
  Branches      410      403    -7     
=======================================
  Hits         1892     1892           
  Misses        642      642           
  Partials      116      116           

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

Signed-off-by: Derek Ho <dxho@amazon.com>
@derek-ho
Copy link
Collaborator Author

Without the change the test fails
Screenshot 2024-08-21 at 3 53 32 PM

@derek-ho derek-ho added the backport 2.x backport to 2.x branch label Aug 21, 2024
Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @derek-ho !

@derek-ho derek-ho merged commit b1148fb into opensearch-project:main Aug 21, 2024
21 checks passed
@derek-ho derek-ho deleted the nextUrl branch August 21, 2024 20:35
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 21, 2024
…2096)

* Fix a bug where basepath nextUrl is invalid when it should be valid

Signed-off-by: Derek Ho <dxho@amazon.com>

* Udpate test

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>
(cherry picked from commit b1148fb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 21, 2024
…2096)

* Fix a bug where basepath nextUrl is invalid when it should be valid

Signed-off-by: Derek Ho <dxho@amazon.com>

* Udpate test

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>
(cherry picked from commit b1148fb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
cwperks pushed a commit that referenced this pull request Aug 21, 2024
…2096) (#2098)

* Fix a bug where basepath nextUrl is invalid when it should be valid



* Udpate test



---------


(cherry picked from commit b1148fb)

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
cwperks pushed a commit to cwperks/security-dashboards-plugin that referenced this pull request Aug 22, 2024
…pensearch-project#2096) (opensearch-project#2098)

* Fix a bug where basepath nextUrl is invalid when it should be valid



* Udpate test



---------


(cherry picked from commit b1148fb)

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.3 backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] invalidNextUrl when the value for nextUrl is the basePath (without trailing forward slash)
3 participants