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

[ui] Fixes double-namespace-query-param when getting versions #24466

Merged

Conversation

philrenaud
Copy link
Contributor

@philrenaud philrenaud commented Nov 15, 2024

Resolves #24444

I was using a custom +=-based url modifier to add the ?diffVersion to the query to get job versions, ignoring that this was also happening in a nested addToPath method if other query params were inherently present — which is the case if the job has a non-default namespace.

This resulted in a url like job/:jobid/versions?namespace=myNS?diffs=true&diffVersion=3

This PR fixes the double ? and lets the well-vested addToPath() handle all relevant URL param appending.

To test, try applying a namespace, running a job within it, making a new version of it, and checking out the versions page. Before, you'd get 404s and "No changes"; now you should get 200s and version changes.

image

@philrenaud philrenaud self-assigned this Nov 15, 2024
@philrenaud philrenaud linked an issue Nov 15, 2024 that may be closed by this pull request
@philrenaud philrenaud force-pushed the 24444-versions-page-doesnt-load-diffs-in-namespace-scenarios branch from 5502d3a to c89365a Compare November 15, 2024 15:26
@philrenaud philrenaud changed the title [ui] Fixes double-namespace-query-param application when getting versions [ui] Fixes double-namespace-query-param when getting versions Nov 15, 2024
@philrenaud philrenaud added the backport/1.9.x backport to 1.9.x release line label Nov 19, 2024
@philrenaud philrenaud merged commit 4708e06 into main Nov 19, 2024
25 of 26 checks passed
@philrenaud philrenaud deleted the 24444-versions-page-doesnt-load-diffs-in-namespace-scenarios branch November 19, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.9.x backport to 1.9.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Versions page doesn't load diffs in namespace scenarios
2 participants