feat(stovepipe): reconcile dead-lettered build signals and free the slot - #565
Merged
Conversation
mnoah1
marked this pull request as ready for review
August 11, 2026 15:06
mnoah1
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
August 11, 2026 15:06
mnoah1
enabled auto-merge
August 11, 2026 15:18
roychying
reviewed
Aug 11, 2026
A buildsignal message that dead-letters ends the only poll chain watching a build that is still running, and its request keeps holding one of the queue's in_flight_count slots. With no reconciler on that topic the count stays high for good, so the queue loses a slot per incident until it can no longer admit work. Add the buildsignal DLQ controller, which maps the dead-lettered build back to its request, marks the request failed, and releases the slot, and register it plus its topic in the reference server. Also document in the RFC that the stage's "classifier decides" disposition for Status failures only works if the BuildRunner backend classifies its own transport and HTTP errors. Unclassified, they take the non-retryable default, which is what sends a poll message to the DLQ on the first proxy blip.
Review question on the buildsignal reconciler: failRequest releases the queue slot only for a request in processing, so does it need to widen that? It does not. Processing is the only non-terminal state that can own a slot: process claims the slot and CAS-marks accepted->processing, compensating its own claim when that CAS does not land, and processing exits only to a terminal outcome, which releases the slot itself. Releasing for accepted would decrement for the common request that never claimed one, over-admitting against MaxConcurrent. Say that where failRequest gates on the state, note at the buildsignal call site that a build row implies processing-or-terminal, and pin the intent on the accepted test case, which passes no queue expectations.
mnoah1
force-pushed
the
mnoah1/stovepipe-buildsignal-dlq
branch
from
August 11, 2026 21:33
085d43c to
232a133
Compare
behinddwalls
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Add buildsignal dlq controller implementation
Why?
A buildsignal message that dead-letters ends the only poll chain watching a build that is still running, and its request keeps holding one of the queue's in_flight_count slots. With no reconciler on that topic the count stays high for good, so the queue loses a slot per incident until it can no longer admit work.
Add the buildsignal DLQ controller, which maps the dead-lettered build back to its request, marks the request failed, and releases the slot, and register it plus its topic in the reference server.
Also document in the RFC that the stage's "classifier decides" disposition for Status failures only works if the BuildRunner backend classifies its own transport and HTTP errors. Unclassified, they take the non-retryable default, which is what sends a poll message to the DLQ on the first proxy blip.
Test Plan