Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bf7026d97 |
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
// `check-here` is a pull request's merge check run on the machine at hand **exactly as the build seat
|
||||
// runs it** (novox/hq issue 283): the same code (builder.Check), the same ask the controller would make of
|
||||
// runs it** (novox/hq issue 286): the same code (builder.Check), the same ask the controller would make of
|
||||
// the seat — the gate's modules and judge by the planner's own answer over the facts snapshot, the
|
||||
// repositories beside it at the refs the snapshot says the seat clones them at — in the toolchain image
|
||||
// the mesh holds, as the user the build seat runs as, against a throwaway store and bus of the versions
|
||||
@@ -126,7 +126,7 @@ func checkHereCommand(ctx context.Context, args []string) error {
|
||||
}
|
||||
if len(toolchains) == 0 {
|
||||
return errors.New("the facts snapshot names no toolchain: it was taken by a controller from before " +
|
||||
"issue 283, and the seat's toolchain cannot be known here")
|
||||
"issue 286, and the seat's toolchain cannot be known here")
|
||||
}
|
||||
beside := map[string]builder.Beside{}
|
||||
for d, ref := range f.Beside {
|
||||
|
||||
@@ -123,7 +123,7 @@ func run() error {
|
||||
// The merge gate: every machine of the snapshot composed with a change (novox/hq to-be 45 §9).
|
||||
case "merge-gate":
|
||||
return mergeGateCommand(ctx, args[1:])
|
||||
// A pull request's merge check run here exactly as the build seat runs it (novox/hq issue 283).
|
||||
// A pull request's merge check run here exactly as the build seat runs it (novox/hq issue 286).
|
||||
case "check-here":
|
||||
return checkHereCommand(ctx, args[1:])
|
||||
case "upgrade":
|
||||
|
||||
@@ -108,7 +108,7 @@ type mergeVerdict struct {
|
||||
Facts time.Time `json:"facts"`
|
||||
Failures []string `json:"failures,omitempty"`
|
||||
// Errors are what kept the gate from judging: a machine the mesh composes that the gate could not
|
||||
// raise as it is. Any one makes the verdict an error — never a pass (novox/hq issue 282).
|
||||
// raise as it is. Any one makes the verdict an error — never a pass (novox/hq issue 285).
|
||||
Errors []string `json:"errors,omitempty"`
|
||||
Warnings []string `json:"warnings,omitempty"`
|
||||
Notes []string `json:"notes,omitempty"`
|
||||
@@ -222,7 +222,7 @@ func mergeGateCommand(ctx context.Context, args []string) error {
|
||||
}
|
||||
|
||||
// errMergeGateCouldNotJudge is the gate's own error: the mesh as it is could not be raised, so nothing
|
||||
// the change does to it can be seen. Never a pass (novox/hq issue 282).
|
||||
// the change does to it can be seen. Never a pass (novox/hq issue 285).
|
||||
var errMergeGateCouldNotJudge = errors.New("the merge gate could not judge the change")
|
||||
|
||||
// errMergeGateFailed is the gate's own failure: the verdict says why, so the error says nothing more.
|
||||
@@ -351,7 +351,7 @@ func judgeChange(ctx context.Context, in mergeCheckInput) (mergeVerdict, error)
|
||||
v.Failures = append(v.Failures, fmt.Sprintf("%s: nothing could be sent to it with this change — %s",
|
||||
gm.Described, firstOr(newOnly(gm.Change.Problems, gm.Base.Problems), gm.Change.Problems)))
|
||||
case !gm.Base.Composes && m.Declaration.Composes:
|
||||
// **The mesh composes it and the gate could not raise it as it is** (novox/hq issue 282): a fact
|
||||
// **The mesh composes it and the gate could not raise it as it is** (novox/hq issue 285): a fact
|
||||
// the snapshot does not carry, or one the gate does not raise. Then the change is judged against a
|
||||
// machine that is not the mesh's — broken against broken, which passes whatever the change does —
|
||||
// so the gate cannot judge, and says so: an error, never a pass.
|
||||
|
||||
@@ -323,11 +323,11 @@ func busMesh(t *testing.T) snapshot.Facts {
|
||||
return f
|
||||
}
|
||||
|
||||
// **Issue 282**: every machine running a module on the bus failed to compose in the gate's store, with
|
||||
// **Issue 285**: every machine running a module on the bus failed to compose in the gate's store, with
|
||||
// the change and without — the store held the module's credential and no account for it, which
|
||||
// composition refuses (issue 203) — and the gate passed every change, "0 of 4 compose". The account the
|
||||
// mesh issued is raised with its credential, so the machine composes in the gate as on the mesh.
|
||||
func TestIssue282AModuleOnTheBusComposesInTheGate(t *testing.T) {
|
||||
func TestIssue285AModuleOnTheBusComposesInTheGate(t *testing.T) {
|
||||
f := busMesh(t)
|
||||
v := gateJudged(t, f, "")
|
||||
if v.Verdict != "pass" {
|
||||
@@ -343,10 +343,10 @@ func TestIssue282AModuleOnTheBusComposesInTheGate(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// **Issue 282**: a machine the mesh composes that the gate cannot raise as it is leaves the change judged
|
||||
// **Issue 285**: a machine the mesh composes that the gate cannot raise as it is leaves the change judged
|
||||
// against a machine that is not the mesh's — broken against broken, which passes whatever the change does.
|
||||
// That is an error, never a pass.
|
||||
func TestIssue282AMachineTheGateCannotRaiseIsAnErrorNeverAPass(t *testing.T) {
|
||||
func TestIssue285AMachineTheGateCannotRaiseIsAnErrorNeverAPass(t *testing.T) {
|
||||
f := busMesh(t)
|
||||
for i := range f.Machines {
|
||||
// A fact the snapshot does not carry: the module's credential, gone from the laptop's.
|
||||
@@ -386,7 +386,7 @@ func TestAWithheldPathIsStoodInForByAPath(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// **Issue 283**: a check run by hand clones beside a change what the seat clones — one rule, read by the
|
||||
// **Issue 286**: a check run by hand clones beside a change what the seat clones — one rule, read by the
|
||||
// controller's ask and by the facts — and finds the repository it checks from its origin.
|
||||
func TestACheckByHandClonesWhatTheSeatClones(t *testing.T) {
|
||||
for dir, refs := range map[string]map[string]string{
|
||||
|
||||
@@ -519,7 +519,7 @@ func gateLayer(ctx context.Context, spec CheckSpec, tree, root, gate, verdictFil
|
||||
case "fail":
|
||||
return "fail", said.Summary
|
||||
case "error":
|
||||
// The gate could not raise the mesh as it is (novox/hq issue 282): said in its own words.
|
||||
// The gate could not raise the mesh as it is (novox/hq issue 285): said in its own words.
|
||||
return "error", said.Summary
|
||||
}
|
||||
}
|
||||
@@ -835,7 +835,7 @@ func (t *tail) String() string {
|
||||
|
||||
// whatFailed is the line of a failed script's output that says what failed, for the status a pull request
|
||||
// shows: the first failing test, the first failing package, the files not formatted — a bare "FAIL" or a
|
||||
// file's name said nothing a reader could act on (novox/hq issue 283) — and the last line otherwise.
|
||||
// file's name said nothing a reader could act on (novox/hq issue 286) — and the last line otherwise.
|
||||
func whatFailed(s string) string {
|
||||
lines := strings.Split(strings.TrimSpace(s), "\n")
|
||||
for i, line := range lines {
|
||||
|
||||
@@ -415,7 +415,7 @@ func TestABuildSaysWhetherItsCommitIsOnTheTrunk(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// **Issue 283**: a failed merge-check.sh was said by its last line — a bare "FAIL", or the name of a file
|
||||
// **Issue 286**: a failed merge-check.sh was said by its last line — a bare "FAIL", or the name of a file
|
||||
// gofmt listed — which named nothing a reader could act on. The status says what failed.
|
||||
func TestAFailedScriptIsSaidByWhatFailed(t *testing.T) {
|
||||
for out, want := range map[string]string{
|
||||
|
||||
@@ -64,7 +64,7 @@ type Facts struct {
|
||||
Edges []Edge `json:"edges,omitempty"`
|
||||
// Beside is the ref each repository is cloned at beside a merge check, by the directory it is found
|
||||
// under — the commits the mesh runs, the catalogue's main — so a check run by hand reads the siblings
|
||||
// the build seat reads (novox/hq issue 283).
|
||||
// the build seat reads (novox/hq issue 286).
|
||||
Beside map[string]string `json:"beside,omitempty"`
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ type Versions struct {
|
||||
// Toolchains are the toolchain images a merge check runs in, by language, as the mesh holds them —
|
||||
// with no address: the artifact store the snapshot is read from is where they are pulled from. What
|
||||
// a repository's merge-check.sh runs in on the build seat, and so what it must run in anywhere else
|
||||
// (novox/hq issue 283): two releases of one compiler disagree, down to how gofmt lays out a file.
|
||||
// (novox/hq issue 286): two releases of one compiler disagree, down to how gofmt lays out a file.
|
||||
Toolchains map[string]string `json:"toolchains,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user