From cd6a452c08147ec5f8d11198e07e20465d922f91 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 16 Nov 2026 18:07:17 +0100 Subject: [PATCH] assigner: name a release by its parts when its source is not the entry's fp-src novox 2026-11-16: mesh-hand-acts 0.1.13 was released from source 962 (the builder's reservation), its catalog entry's fp-src is 963, so the assigner found no release and the want on novox named no version and no parts. When no release of the fp-src is heard, the release whose parts are exactly the digests this fingerprint's build made is this build's (A-421's match, extended). Quick fix (this): the assigner matches by parts, which are the evidence. Thorough fix (noted, not here): the builder's reservation records the entry's fp-src as its source, so both name the same revision. --- .../cmd/mesh-delivery-assigner/buildended_test.go | 5 +++++ .../cmd/mesh-delivery-assigner/graphkept.go | 8 +++++++- 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 7dfc7904..12c6fdc0 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 @@ -109,6 +109,11 @@ func TestATrunkEntryTakesItsVersionFromTheReleaseOfItsFingerprintsSource(t *test if k, ok := p.namedBuild("mail", "t", 0)("t"); !ok || k.Version != "1.2.3" { t.Errorf("an entry naming no fp-src, its build made the released digests: %+v, %v", k, ok) } + // A release from an earlier source than the entry's fp-src (novox 2026-11-16, 962 against 963) is still this build's when + // its parts are exactly what the build made. + if k, ok := p.namedBuild("mail", "t", 8)("t"); !ok || k.Version != "1.2.3" || k.Parts["mail:image"] != "sha256:9" { + t.Errorf("an fp-src with no release, its build made the released digests: %+v, %v", k, ok) + } if len(logs) != 2 || !strings.Contains(logs[0], "the release of mail at fingerprint t is not heard: no version-released of it from source 8") || !strings.Contains(logs[1], "names no fp-src, and no version-released of it names the parts its build.ended made") { t.Errorf("logs = %q, want each unheard release said once, naming the module, the fingerprint and the source", logs) } 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 6e6c14d5..27a225d5 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go @@ -213,7 +213,13 @@ func (p *passer) namedBuild(module, trunkFP string, fpSrc int64, unreleased ...b } k, ok := p.w.released.of(module, fpSrc) if !ok { - p.unheardRelease(module, fp, fmt.Sprintf("no version-released of it from source %d, the one its fingerprint was built at, is heard", fpSrc)) + // The release names the source its reservation was made at, which can be an earlier revision than the entry's + // fp-src (novox 2026-11-16: mesh-hand-acts 0.1.13 released from 962, its entry's fp-src 963): the release whose parts + // are exactly the digests this fingerprint's build made is this build's (A-421). + if k, ok = p.w.released.withParts(module, p.w.ends.madeOf(module, fp)); ok { + return k, true + } + p.unheardRelease(module, fp, fmt.Sprintf("no version-released of it from source %d, the one its fingerprint was built at, nor one naming the parts its build.ended made, is heard", fpSrc)) } return k, ok } -- 2.54.0