fix(deploy): declare the drain before freeing the slot (#66) #66

Merged
mi merged 1 commits from drain-before-release into main 2026-09-15 11:37:40 +02:00
Owner

PR#65 set the draining flag after releasing the concurrency slot, so a
build waiting on that semaphore could be woken by the release and start
before it could read the flag — under the version on its way out, to be
cut short by the restart and re-run by the recovery. That is the window
the drain exists to close, one layer further in than the one PR#65
closed.

The flag is now set before the slot is released; the wait for the
executing builds stays after it. Found by Scenario#65.05 on the
production host, which is slower and busier than the machine the change
was written on, where it had passed.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

PR#65 set the draining flag after releasing the concurrency slot, so a build waiting on that semaphore could be woken by the release and start before it could read the flag — under the version on its way out, to be cut short by the restart and re-run by the recovery. That is the window the drain exists to close, one layer further in than the one PR#65 closed. The flag is now set before the slot is released; the wait for the executing builds stays after it. Found by Scenario#65.05 on the production host, which is slower and busier than the machine the change was written on, where it had passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mi added 1 commit 2026-09-15 11:37:24 +02:00
PR#65 set the draining flag after releasing the concurrency slot, so a
build waiting on that semaphore could be woken by the release and start
before it could read the flag — under the version on its way out, to be
cut short by the restart and re-run by the recovery. That is the window
the drain exists to close, one layer further in than the one PR#65
closed.

The flag is now set before the slot is released; the wait for the
executing builds stays after it. Found by Scenario#65.05 on the
production host, which is slower and busier than the machine the change
was written on, where it had passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mi merged commit d48feb30d7 into main 2026-09-15 11:37:40 +02:00
mi deleted branch drain-before-release 2026-09-15 11:37:40 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#66