Skip to content

feat(stovepipe): add Build entity and terminal Request states#362

Merged
roychying merged 1 commit into
uber:mainfrom
roychying:chenghan.ying/stovepipe-build-entity
Jul 14, 2026
Merged

feat(stovepipe): add Build entity and terminal Request states#362
roychying merged 1 commit into
uber:mainfrom
roychying:chenghan.ying/stovepipe-build-entity

Conversation

@roychying

@roychying roychying commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Why?

Stovepipe's build/buildsignal pipeline stage needs a Build entity to track a triggered build's lifecycle, and buildsignal/DLQ reconciliation need a way to know when a Request has reached a state the pipeline will never advance past.

What?

  • Adds stovepipe/entity/build.go:
    • BuildStatus (accepted/running/succeeded/failed/cancelled) with IsTerminal() — shaped like SubmitQueue's BuildStatus but defined locally rather than shared.
    • Build — a single triggered build (ID, RequestID, URI, BaseURI, Status, Version), immutable except Status/Version, which only buildsignal writes after build creates the row.
    • BuildID — a lightweight wrapper for the runner-assigned id, used on the queue and as the BuildRunner Status/Cancel parameter.
    • BuildMetadata — caller-supplied, provider-echoed free-form metadata (empty for now).
    • JSON (de)serialization helpers (ToBytes/*FromBytes) for queue payloads on all three types.
  • Extends stovepipe/entity/request.go:
    • Two new RequestState values: recorded_green / recorded_not_green, written by record. once whole-repo greenness is written for a URI (normal path or fail-closed reconciler).
    • RequestState.IsTerminal() — true for superseded or either recorded outcome — used by buildsignal to 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

@roychying
roychying requested review from a team, behinddwalls and sbalabanov as code owners July 14, 2026 17:39
@CLAassistant

CLAassistant commented Jul 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@roychying
roychying force-pushed the chenghan.ying/stovepipe-build-entity branch from cc258ba to 7939548 Compare July 14, 2026 21:01
@roychying
roychying added this pull request to the merge queue Jul 14, 2026
Merged via the queue into uber:main with commit 3bdd094 Jul 14, 2026
15 checks passed
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.

3 participants