Write a failed build as the controller does, an outcome with failed set (issue 1281)
mesh/repo-check head 3c655c5ab449 merged into trunk 6a23627426c6 — pass: its merge-check.sh passed
mesh/merge-gate head 3c655c5ab449 merged into trunk 6a23627426c6 — pass: group fix/1281-outcome-is-a-build composed: every machine composes with the change…
mesh/delivery delivered
mesh/delivery-group group fix/1281-outcome-is-a-build delivered: every member is delivered

This commit is contained in:
2026-10-19 22:47:41 +00:00
parent 8ffcf02a9c
commit 3c655c5ab4
2 changed files with 6 additions and 2 deletions
@@ -17,7 +17,11 @@ func record(t *testing.T, id, module, repo, path, ref, state, at, inputs string)
t.Helper() t.Helper()
// an outcome has no state key (mesh-controller internal/chain/records.go:57-59); state asked is a request // an outcome has no state key (mesh-controller internal/chain/records.go:57-59); state asked is a request
raw := `{"id":"` + id + `",` raw := `{"id":"` + id + `",`
if state != "" { switch state {
case "":
case "failed": // a failure is an outcome with failed set and no state (mesh-controller internal/chain/records.go:109)
raw += `"failed":"the build failed",`
default:
raw += `"state":"` + state + `",` raw += `"state":"` + state + `",`
} }
raw += `"repository":"` + repo + `","ref":"` + ref + `","module":"` + module + `","commit":"7a74cee83f88e6585a5511c3cc53bdf0f5303d20","path":"` + path + `","at":"` + at + `"` raw += `"repository":"` + repo + `","ref":"` + ref + `","module":"` + module + `","commit":"7a74cee83f88e6585a5511c3cc53bdf0f5303d20","path":"` + path + `","at":"` + at + `"`
@@ -454,7 +454,7 @@ func (m *Model) groupRows() []GroupRow {
} }
// fingerprintRows compare each module the indexer fingerprinted with the source fingerprint of the module's newest // fingerprintRows compare each module the indexer fingerprinted with the source fingerprint of the module's newest
// successful trunk build (delivery.BuildRecord.IsTrunkBuild: built, on main or with no ref) that recorded one. The newest key is any state and ref, so it is not // successful trunk build (delivery.BuildRecord.IsTrunkBuild: an outcome, not failed, on main or with no ref) that recorded one. The newest key is any state and ref, so it is not
// used: the records are. // used: the records are.
func (m *Model) fingerprintRows() []FingerprintRow { func (m *Model) fingerprintRows() []FingerprintRow {
newest := map[string]buildEntry{} newest := map[string]buildEntry{}