Publish only a commit on its module's trunk; post a pull request's change plan (hq ADR 0238)
One commit, one plan: a commit off the trunk — a pull request's head, a branch built by hand, a rebuild or replay of one — is for checking. The build seat reads from its clone which branches hold the commit, and the controller records and never registers a build whose commit is not on the branch the module follows (the repository's default for a new one), so nothing off the trunk can be sent. A pull request's check now carries its change plan, computed by the planner: what a merge would build in which order, what each machine would receive, and what is not an ordinary send — the bus step, a module waiting for a person, a provider's consumers.
This commit is contained in:
@@ -114,6 +114,8 @@ type CheckRequest struct {
|
||||
// Dependents are the modules a merge would build after Modules because they stand on them: the
|
||||
// planner's dependency walk, said on the pull request.
|
||||
Dependents []string `json:"dependents,omitempty"`
|
||||
// Plan is the change plan of the commit checked, computed by the controller and echoed with the outcome.
|
||||
Plan *ChangePlan `json:"plan,omitempty"`
|
||||
// Manifests are the touched modules' manifests in the change's tree, by path from its root: what the
|
||||
// gate puts through `module check`.
|
||||
Manifests []string `json:"manifests,omitempty"`
|
||||
@@ -203,6 +205,15 @@ type BuildResult struct {
|
||||
// manifest the mesh keeps says nothing about it (novox/hq 04-ISSUES/131).
|
||||
Read []ReadRepository `json:"read,omitempty"`
|
||||
|
||||
// Trunk is the repository's default branch at the build, and OnTrunk whether the commit built is on it
|
||||
// (novox/hq ADR 0238): **only a commit on the trunk is published** — the controller refuses to register
|
||||
// a build of one off it. Empty Trunk is a build seat that could not say, or predates the rule.
|
||||
Trunk string `json:"trunk,omitempty"`
|
||||
OnTrunk bool `json:"on-trunk,omitempty"`
|
||||
// Branches are every branch the commit is on: the trunk of a module that follows a branch other than
|
||||
// the repository's default is the branch it follows.
|
||||
Branches []string `json:"branches,omitempty"`
|
||||
|
||||
// SourceFingerprint is what the build was made from, hashed (novox/hq issue 280): the module's
|
||||
// tree at the commit, the trees of the contexts it read, its bases and toolchains by digest. Two
|
||||
// builds with one fingerprint are one build, however their digests differ — an image is not
|
||||
|
||||
Reference in New Issue
Block a user