Skip to content

fix(nomad): keep the counts a job runs with on an edit, unless the file changes them - #116

Merged
ingvarch merged 1 commit into
mainfrom
fix/keep-counts
Oct 16, 2026
Merged

ingvarch merged 1 commit into
mainfrom
fix/keep-counts

Conversation

@ingvarch

Copy link
Copy Markdown
Owner

What changes

An edit of a job no longer resets the counts it runs with (#104). urga registered the edited file with the counts written in it, so a group the autoscaler, or s on task groups, had scaled to 5 went back to the file's count = 1 the next time anything in the job was edited. The plan showed it in its diff, next to the change you made, and it was easy to miss.

  • A group whose count you left as it was in the file keeps the count it runs with. A count you change in the editor is used as written. A group the job does not run yet gets the count of the file.
  • The plan and the submit use the same counts, and the plan lists the ones it kept: Task group "web": 5, the file says 1.
  • Nomad's PreserveCounts is not used: it ignores every count of the file for a group that exists, so a count changed in the editor would be lost.
  • The counts of the file are read when the editor opens. When the cluster cannot read them, for example a file that calls file(), the editor still opens, and the plan says every count is the one in the file.
  • A new job, a job run from a file and a revert keep nothing, as before.

Closes #104

Checklist

  • The test for this change was written first and failed
  • make check is green
  • The title is a conventional commit: feat(ui): ..., fix(nomad): ...

@ingvarch ingvarch added this to the v0.14.1 milestone Oct 16, 2026
@ingvarch ingvarch added bug Something isn't working documentation Improvements or additions to documentation ui Screens, keys and the header nomad The client of the Nomad API and what it reads priority: medium Wrong result or wrong target in a common case labels Oct 16, 2026
@ingvarch
ingvarch merged commit cfad5f0 into main Oct 16, 2026
5 checks passed
@ingvarch
ingvarch deleted the fix/keep-counts branch October 16, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation nomad The client of the Nomad API and what it reads priority: medium Wrong result or wrong target in a common case ui Screens, keys and the header

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An edit resets the count the autoscaler or a scale set to the count in the file

1 participant