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

Purging from Nomad UI does not work because parameters are passed incorrectly #18677

Closed
Kamilcuk opened this issue Oct 6, 2023 · 2 comments · Fixed by #19139
Closed

Purging from Nomad UI does not work because parameters are passed incorrectly #18677

Kamilcuk opened this issue Oct 6, 2023 · 2 comments · Fixed by #19139
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui type/bug

Comments

@Kamilcuk
Copy link
Contributor

Kamilcuk commented Oct 6, 2023

Nomad version

Nomad v1.6.2

Operating system and Environment details

Fedora 29

Issue

Nomad UI sends wrong request when purging.

Reproduction steps

Create a job not in default namespace. Stop it. Click to purge it.

Expected Result

Should be purged.

Actual Result

Not purged.
When clicking "purge job" from the ui I see in chrome network debug view that it sends the following query:

 <url>/v1/job/jobname?namespace=dev?purge=true

It's wrong, it should be namespace=dev&purge=true.

I completely guess, I know nothing about javascript, this is caused by adding ?purge here:

https://github.com/hashicorp/nomad/blob/main/ui/app/adapters/job.js#L47

Where the ?namespace is added here:

https://github.com/hashicorp/nomad/blob/main/ui/app/adapters/watchable-namespace-ids.js#L54

@philrenaud philrenaud self-assigned this Oct 11, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Nomad UI Oct 11, 2023
@philrenaud philrenaud moved this from Backlog to Todo in Nomad UI Oct 11, 2023
@philrenaud
Copy link
Contributor

Hi @Kamilcuk , good find — seems we're not handling query params the right way here. Will look into a fix.

Copy link

github-actions bot commented Jan 4, 2025

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui type/bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants