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

Tagging the latest version of a "Stopped" job results in the job.Status going from "dead" to "running" #24982

Open
philrenaud opened this issue Jan 30, 2025 · 0 comments
Labels
hcc/jira theme/golden-versions Tagging and preserving job versions type/bug

Comments

@philrenaud
Copy link
Contributor

(and additionally, upon starting the job again, the version tag is duplicated)

Image
^--- all allocs terminal (complete), job status "running", job.Stopped = true

I noticed a situation where tagging the latest version of a job, if it is currently set to Stopped (having been manually stopped via DELETE to the job endpoint or otherwise), its status in the UI would change from "Stopped" to "Failed". I dug in and the "Stopped" code path only gets hit if the job.Status is set to "dead", and in this case it was coming back as "running" from both the /statuses endpoint and the nomad job status command.

Reproduction:

  • Run a service job and allow it to get in a healthy state
  • Stop the job (by clicking "Stop Job" in the UI or hitting the /job/$jobid endpoint with DELETE)
    • Check the job's status: it should be dead
  • Observe that the job now has two versions (version 1's only change should be that Stop has gone from false to true)
  • Tag the latest (stopped) version via the web UI
    • BUG: Check the job's status: it is now running
  • In the UI, because the status is now running, click "Start Job"
    • Look again at the versions: There should now be 3.
    • BUG: both the latest and second-latest versions should have the tag you applied earli.
@philrenaud philrenaud added hcc/jira theme/golden-versions Tagging and preserving job versions type/bug labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hcc/jira theme/golden-versions Tagging and preserving job versions type/bug
Projects
None yet
Development

No branches or pull requests

1 participant