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 edit job results in redirect to wrong url to view job #13039

Closed
optiz0r opened this issue May 17, 2022 · 3 comments · Fixed by #13588
Closed

UI edit job results in redirect to wrong url to view job #13039

optiz0r opened this issue May 17, 2022 · 3 comments · Fixed by #13588
Assignees

Comments

@optiz0r
Copy link
Contributor

optiz0r commented May 17, 2022

Nomad version

Nomad v1.3.0+ent (cb2f0ca)

(tested in enterprise, but probably behaves the same in oss also)

Operating system and Environment details

N/A

Issue

Probably related to #12082 refactoring of URLs for jobs with namespaces. After using UI to edit->plan->run a job, the UI redirects to /ui/jobs/job?namespace=xx instead of ui/jobs/job@namespace. This then tries to load the job details from the wrong namespace.

The redirect generated at the "run" stage of the UI for job edit needs to be updated to use the new style URLs, or, the ui should respect the ?namespace=xx parameter in addition to supporting the new job@namespace syntax for backward compatibility.

Reproduction steps

  • Edit a job running in a namespace in the UI (ensuring no job with the same name exists in default namespace)
  • Plan and run the job
  • Observe error page instead of job details

Expected Result

After the job is run, UI should redirect back to the correct job.

Actual Result

  • For a user with no read permissions in the default namespace, this results in a Not Authorized error
  • For a user with read permissions in the default namespace, this results in a Not Found error

Job file (if appropriate)

N/A

Nomad Server logs (if appropriate)

N/A

Nomad Client logs (if appropriate)

N/A

@tgross tgross added the theme/ui label Jun 6, 2022
@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Jun 6, 2022
@tgross tgross moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Jun 6, 2022
@tgross
Copy link
Member

tgross commented Jun 6, 2022

Thanks for opening this issue @optiz0r! I've flagged it for the UI folks so they can investigate.

@philrenaud
Copy link
Contributor

Hi @optiz0r , thanks for raising this issue; we've made a change in #13588 that should fix this, and you should see it in an upcoming release and backported to all nomad 1.3.x versions.

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

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 Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants