Skip to content

fix(server): consecutive requeues are bounded - #274

Merged
sweepies merged 2 commits into
mainfrom
fix/requeue-cap
Nov 12, 2026
Merged

sweepies merged 2 commits into
mainfrom
fix/requeue-cap

Conversation

@sweepies

@sweepies sweepies commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

The server's requeues are bounded. Until now a repository that kept losing a race reran every minute for good, with nothing counting the requeues. That was fine while the only cause was a moved default branch, which arrives with its own push event. The next PR widens requeueing to lifecycle races, which include GitHub lag: that has no event and can hit many repositories at once during an incident.

  • Migration 012: server_work.requeues INTEGER NOT NULL DEFAULT 0.
  • Claim carries requeues; finish_work adds one on a requeue and resets it on Done or Failed (a failure already backs off; keeping the streak through it would turn the next unrelated requeue into a second failure). Recovery of a leftover claim resets it too.
  • MAX_REQUEUES = 3 beside RETRY_MS. A claim requeued three times in a row finishes its fourth requeue as Failed, under the new error kind requeue-limit, so it takes the normal failure backoff and shows in the batch failed log. Below the cap nothing changes (a_requeue_retries_after_a_minute_without_counting_as_a_failure still passes).
  • Tests: counting, reset on Done and on Failed, the fourth requeue failing with backoff, and the migration on a fresh and a schema-11 database. guide/server.mdx states the cap.

Behaviour change: a repository requeued three times in a row backs off as a failure on the fourth.

View guided diff Turn on auto-fix

A repository requeued three times in a row backs off as a failure on the
fourth, counted under a new error kind "requeue-limit", instead of
retrying every minute forever when the cause never resolves.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula b83ee98 Commit Preview URL

Branch Preview URL
Nov 12 2026, 12:43 AM

@sweepies
sweepies merged commit dfc12ce into main Nov 12, 2026
12 checks passed
@sweepies
sweepies deleted the fix/requeue-cap branch November 12, 2026 01:02
@sweepies-ops sweepies-ops Bot mentioned this pull request Nov 12, 2026
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.

1 participant