Skip to content

feat(coderd): protect pending jobs only while the provisioner queue is moving (#32099) - #32262

Merged
denisra merged 1 commit into
release/2.38from
backport/32099-to-2.38
Nov 24, 2026
Merged

denisra merged 1 commit into
release/2.38from
backport/32099-to-2.38

Conversation

@dylanhuff-at-coder

Copy link
Copy Markdown
Collaborator

Backport of #32099 to release/2.38.

Stops the pending job reaper from failing jobs in a queue that's still moving. This cherry-picks the change from main (git cherry-pick -x b0ae8adab5), no migration. The only conflict was in manage-provisioner-jobs.md, where I kept the new text. The jobreaper and dbauthz tests pass on release/2.38.

Part of CORE-586

…s moving (#32099)

Stops the pending job reaper from failing jobs in a queue that's still
moving. This is an alternative to #31469 that came out of Steven's
[review](#31469 (review))
asking whether 2h is enough, and it builds on George's work there.

A pending job past 30m is now only protected while a matching online
provisioner is making progress, meaning it finished a job in the last
30m or is running one that's still being updated. A moving queue never
gets reaped and a frozen one still does at 30m like today. There's no
absolute cap.

No migration since it uses the existing
`provisioner_jobs_worker_id_organization_id_completed_at_idx`. One
tradeoff is that a stuck build whose provisioner keeps heartbeating
counts as progress, so if every matching provisioner is stuck like that,
the queue waits until that build is canceled.

Part of CORE-586

---------

Co-authored-by: George Katsitadze <[email protected]>

(cherry picked from commit b0ae8ad)
@dylanhuff-at-coder dylanhuff-at-coder added the backport/v2.38 Backport PR targeting release/2.38 label Nov 16, 2026
@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

CORE-586

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @dylanhuff-at-coder!

This PR is targeting the release/2.38 release branch, but its title does not start with fix: or fix(scope):.

Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format:

fix: description of the bug fix
fix(scope): description of the bug fix

If this is not a bug fix, it likely should not target a release branch.

@denisra
denisra merged commit dec6e4b into release/2.38 Nov 24, 2026
62 of 64 checks passed
@denisra
denisra deleted the backport/32099-to-2.38 branch November 24, 2026 17:51

This branch had an error being deployed

1 failed deployment
docs-preview — 54cc9ad3 Deployed Nov 24, 2026 by denisra via cleanup #439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/v2.38 Backport PR targeting release/2.38

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants