Skip to content

refactor(nomad): name the kind of a batch queue once - #215

Merged
ingvarch merged 1 commit into
mainfrom
refactor/queue-kind
Nov 9, 2026
Merged

ingvarch merged 1 commit into
mainfrom
refactor/queue-kind

Conversation

@ingvarch

@ingvarch ingvarch commented Nov 9, 2026

Copy link
Copy Markdown
Owner

What changes

Nothing changes on screen. The kind of a batch queue now has one name in the code: nomad.QueueKind, with the values QueueFifo and QueueDynamic. Before, the queue screen compared strings in two spellings each ("dynamic priority", "dynamic_priority", and the value of api.BatchQueueTypeDynamic), and internal/ui imported github.com/hashicorp/nomad/api for that one constant.

  • internal/nomad turns the API's queue type into a QueueKind in one place, kindOf, next to queueOf for node pools.
  • QueueWorkload.QueueType and NodePool.Queue are QueueKind.
  • queuePage.dynamic() compares with nomad.QueueDynamic only.
  • A new test, TestUI_DoesNotImportTheNomadAPI, fails when a non-test file in internal/ui imports github.com/hashicorp/nomad/api. The cluster's types reach the screens only through internal/nomad.

Issues

Closes #203

Checklist

  • The test for this change was written first and failed
  • make check is green
  • The guide in docs/ is updated if users see a difference
  • The title is a conventional commit: feat(ui): ..., fix(nomad): ...

@ingvarch ingvarch added this to the v0.19.0 milestone Nov 9, 2026
@ingvarch ingvarch added refactor Code change that neither fixes a bug nor adds a feature ui Screens, keys and the header nomad The client of the Nomad API and what it reads labels Nov 9, 2026
@ingvarch
ingvarch enabled auto-merge (rebase) November 9, 2026 22:11
@ingvarch
ingvarch merged commit 3d4d134 into main Nov 9, 2026
5 checks passed
@ingvarch
ingvarch deleted the refactor/queue-kind branch November 9, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nomad The client of the Nomad API and what it reads refactor Code change that neither fixes a bug nor adds a feature ui Screens, keys and the header

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Name the kind of a batch queue once, and keep nomad/api out of internal/ui

1 participant