feat(stovepipe): add Build entity and terminal Request states#362
Merged
roychying merged 1 commit intoJul 14, 2026
Merged
Conversation
roychying
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
July 14, 2026 17:39
behinddwalls
approved these changes
Jul 14, 2026
roychying
force-pushed
the
chenghan.ying/stovepipe-build-entity
branch
from
July 14, 2026 21:01
cc258ba to
7939548
Compare
3 tasks
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.
Why?
Stovepipe's
build/buildsignalpipeline stage needs aBuildentity to track a triggered build's lifecycle, andbuildsignal/DLQ reconciliation need a way to know when aRequesthas reached a state the pipeline will never advance past.What?
stovepipe/entity/build.go:BuildStatus(accepted/running/succeeded/failed/cancelled) withIsTerminal()— shaped like SubmitQueue'sBuildStatusbut defined locally rather than shared.Build— a single triggered build (ID, RequestID, URI, BaseURI, Status, Version), immutable exceptStatus/Version, which onlybuildsignalwrites afterbuildcreates the row.BuildID— a lightweight wrapper for the runner-assigned id, used on the queue and as theBuildRunnerStatus/Cancel parameter.BuildMetadata— caller-supplied, provider-echoed free-form metadata (empty for now).ToBytes/*FromBytes) for queue payloads on all three types.stovepipe/entity/request.go:RequestStatevalues:recorded_green/recorded_not_green, written byrecord. once whole-repo greenness is written for a URI (normal path or fail-closed reconciler).RequestState.IsTerminal()— true forsupersededor either recorded outcome — used bybuildsignalto short-circuit polling once a Request is already done.Test Plan
go test ./stovepipe/...passes locally.Need to conduct e2e testing after filling in more logics.
Issue