doc(stovepipe): build and buildsignal pipeline steps#336
Conversation
|
chenghan.ying seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
112337e to
1abb551
Compare
1abb551 to
4e4d789
Compare
|
|
||
| It handles only the trigger: it does not poll for completion, record greenness, or decide incremental-vs-full — those are `buildsignal`'s, `record`'s, and `process`'s jobs respectively. | ||
|
|
||
| `build` is structurally the same controller as `submitqueue/orchestrator/controller/build/build.go`, and [doc/rfc/submitqueue/build-runner.md](../../submitqueue/build-runner.md) is the reference rationale for the trigger-then-poll shape this stage reuses. The `BuildRunner` contract's `Status`/`Cancel` half now carries over as literally shared code with SubmitQueue, via `platform/extension/buildrunner`; what does *not* carry over is `Trigger` — the two domains model different problems, so each keeps its own, following the [extension-contract.md](../../submitqueue/extension-contract.md) "identity in, resolve internally" principle. |
There was a problem hiding this comment.
can we use relative to root paths than relative to current
There was a problem hiding this comment.
do we need to have it as buildrunner extension at the platform vs per technologu say buildkite, i don't think the idea of breaking the contract in places so defining somewhat similar thing in 2 places for status and cancel is fine..and we abstract away by the underlying impl like buildkite to so ? thoughts
There was a problem hiding this comment.
- paths fixed.
- yes and this is one of the alternatives I'd already recorded. The shared-interface route does give a compile-time guarantee that both domains' Status/Cancel stay identical (I believe they should be?), but it costs fragmenting one conceptual contract across two packages, plus migrating SubmitQueue's already-shipped code onto promoted platform/base types for a half only SubmitQueue uses today. Your approach is what the doc now adopts.
| The shape isn't decided here because project semantics belong to `analyze`, not `build`: how a project maps to a buildable scope (a Bazel target pattern, a directory, a service name) is implementer-specific per [workflow.md](../workflow.md#project---greenness-at-a-finer-grain). The expectation is that this stays an opaque token — following the same "identity in, resolve internally" shape already used for `headURI`/`baseURI` (owned and interpreted by `SourceControl`) — that `build` reads off the `Request`/message and hands to the runner uninterpreted, rather than a structured type `build` would have to understand: | ||
|
|
||
| ```go | ||
| Trigger(ctx context.Context, headURI, baseURI string, projectScope entity.ProjectScope, metadata base.BuildMetadata) (base.BuildID, error) |
There was a problem hiding this comment.
should be added anyway in both SQ and Stovepipe... currently there no metadata as such from SQ to be passed but i can think of things which might be valuable to pass like conflict graph info or any other decisions which maybe relevant to build.
cc: @JamyDev
There was a problem hiding this comment.
Shall we decided the concrete shape here? my preference is leaving it deferred until there's a real consumer in either domain..
a437451 to
78a3df5
Compare
Why?
Stovepipe's pipeline had design docs for process but nothing for the two stages downstream of it - build (triggers the build-runner) and buildsignal (polls it to completion). Both stages needed a documented contract before implementation could start, in particular because stovepipe can't reuse SubmitQueue's BuildRunner interface as-is: SubmitQueue validates stacks of batches, stovepipe validates a single URI against a baseline, and that mismatch has to be resolved deliberately rather than discovered mid-implementation.
What?
Test Plan
N/A
Issue