Skip to content

Conversation

schmichael
Copy link
Member

hasAlloc was only ever false, so it could never return JobStatusDead

Or perhaps #25081 should have re-added hasAlloc = true like it was in #24974? Checking with @mismithhisler

Description

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

hasAlloc was only ever false, so it could never trigger JobStatusDead
@schmichael schmichael requested a review from mismithhisler July 15, 2025 00:05
Comment on lines 5514 to 5516
// The job is dead if all allocations for this version are terminal,
// all evals are terminal. In the event a jobs allocs and evals
// are all GC'd, we don't want the job to be marked pending.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second sentence here appears to be accurate, but the first sentence no longer is because we're not considering terminal vs GC'd allocs. We should probably update this language and the language in the comment at the bottom of the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants