diff --git a/modules/mesh-delivery-indexer/internal/index/modules_test.go b/modules/mesh-delivery-indexer/internal/index/modules_test.go index 6e150e2..7fd2ac7 100644 --- a/modules/mesh-delivery-indexer/internal/index/modules_test.go +++ b/modules/mesh-delivery-indexer/internal/index/modules_test.go @@ -17,7 +17,11 @@ func record(t *testing.T, id, module, repo, path, ref, state, at, inputs string) t.Helper() // an outcome has no state key (mesh-controller internal/chain/records.go:57-59); state asked is a request 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 += `"repository":"` + repo + `","ref":"` + ref + `","module":"` + module + `","commit":"7a74cee83f88e6585a5511c3cc53bdf0f5303d20","path":"` + path + `","at":"` + at + `"` diff --git a/modules/mesh-delivery-view/internal/view/view.go b/modules/mesh-delivery-view/internal/view/view.go index 4addb11..7ab0ec4 100644 --- a/modules/mesh-delivery-view/internal/view/view.go +++ b/modules/mesh-delivery-view/internal/view/view.go @@ -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 -// 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. func (m *Model) fingerprintRows() []FingerprintRow { newest := map[string]buildEntry{}