From 8671d1062b107dd13fa5cda808aea308fcb1164c Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 16 Nov 2026 18:52:50 +0100 Subject: [PATCH] assigner: a want held at an older build names that build's release by its parts novox 2026-11-16 18:46: the mesh-sdk merge moved mesh-hand-acts' fingerprint to 9b3a5534; rule 2 holds the want at 4eb3cf48 (no pipeline passed at the new one), and namedBuild named a release only for the trunk's fingerprint, so the held want never got version 0.1.13 though it was released at 18:04:46. Now a held build takes the release whose parts are exactly what it made (A-421's match). Quick fix = thorough fix here: namedBuild is the one place a want's release is looked up. --- .../cmd/mesh-delivery-assigner/buildended_test.go | 8 ++++++++ .../cmd/mesh-delivery-assigner/graphkept.go | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/buildended_test.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/buildended_test.go index 12c6fdc0..8d50c068 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/buildended_test.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/buildended_test.go @@ -81,6 +81,14 @@ func TestATrunkEntryTakesItsVersionFromTheReleaseOfItsFingerprintsSource(t *test if _, ok := named("other"); ok { t.Error("another fingerprint names a release") } + // A build held back at an older fingerprint names the release whose parts are exactly what it made. + heldRaw, _ := json.Marshal(builds.BuildEnded{Module: "mail", Fingerprint: "old", Made: map[string]string{"image": "sha256:9"}}) + if err := w.ends.put(heldRaw); err != nil { + t.Fatal(err) + } + if k, ok := named("old"); !ok || k.Version != "1.2.3" { + t.Errorf("a held build whose parts were released = %+v, %v; want 1.2.3", k, ok) + } p.graph.source = 8 // a later merge that did not rebuild mail if k, ok := named("t"); !ok || k.Version != "1.2.3" { t.Errorf("after a later merge the trunk entry = %+v, %v; want the release of its fingerprint's source", k, ok) diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go index 27a225d5..4afa0d44 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go @@ -197,7 +197,10 @@ func (p *passer) namedBuild(module, trunkFP string, fpSrc int64, unreleased ...b } } if fp != trunkFP { - return assign.KeptBuild{}, false + // A want held back at an older build (rule 2: no pipeline passed at the trunk's newer fingerprint) names that build's + // release when one names exactly the digests it made (novox 2026-11-16: mesh-hand-acts 0.1.13 held at 4eb3cf48 after + // the mesh-sdk merge moved its fingerprint). + return p.w.released.withParts(module, p.w.ends.madeOf(module, fp)) } if p.graph == nil || !p.graph.ok { p.unheardRelease(module, fp, "no assignment graph revision is kept yet, so no release is looked up")