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 · 1 comment · Fixed by #19139
Closed

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

Kamilcuk opened this issue Oct 6, 2023 · 1 comment · 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

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Oct 6, 2023
@philrenaud philrenaud self-assigned this 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui type/bug
Development

Successfully merging a pull request may close this issue.

3 participants