From 10b879bc3169f0f3849816a1a798003232701999 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 16 Nov 2026 14:52:43 +0100 Subject: [PATCH] assigner: a machine whose node-engine is not heard running composes with the revision's node-engine entry, said (A-451) Live, 2026-11-16: main.953's composition could not run, 'novox: no build of mesh-host is heard running there'. --- .../cmd/mesh-delivery-assigner/compositionrun.go | 6 ++++-- .../mesh-delivery-assigner/compositionrun_test.go | 14 +++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go index 7cb6ae5b..3abf6f12 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go @@ -411,7 +411,7 @@ func programOfEntry(e meshcatalog.CatalogEntry) (buildstep.RunProgram, error) { // programs answers, per machine, the composer its run builds (A-226, A-243, A-252): where the revision's node-engine entry differs // from the trunk's, that build for every machine; else the build the machine's node-engine runs, as its `running` says, its entry -// read through mesh-catalog's `entry`. +// read through mesh-catalog's `entry`; a machine whose node-engine's `running` is not heard gets the revision's entry, said (A-451). func (r *compositionRun) programs(half mcc.Half) (func(node string) (buildstep.RunProgram, error), error) { engine, ok := nodeEngineEntry(half.Entries) if !ok { @@ -426,7 +426,9 @@ func (r *compositionRun) programs(half mcc.Half) (func(node string) (buildstep.R return func(node string) (buildstep.RunProgram, error) { running, ok := r.running(node, engine.Module) if !ok || running.Fingerprint == "" { - return buildstep.RunProgram{}, fmt.Errorf("no build of %s is heard running there", engine.Module) + r.logf("%s: no build of %s is heard running there, so its composer is the catalog revision's entry %s (A-451)", node, + engine.Module, engine.Fp) + return programOfEntry(engine) } mu.Lock() p, ok := byFp[running.Fingerprint] diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun_test.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun_test.go index 341e5796..fe99d51d 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun_test.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun_test.go @@ -118,7 +118,7 @@ func newRunStand(t *testing.T, revisionEngine, trunkEngine, seatDigest string) * // Design 47 G §354, §63, §64, A-226, A-238, A-240, A-243, A-252, A-254, A-261: one request and one run ask per machine, the request // depth compose with the one machine and one case `change`, its manifests, verdicts and seats from the step's revision; the // composer is the node-engine build each machine runs, its entry read through `entry`, or the revision's where it differs from the -// trunk's; the run's verdict is read from its step-ended; a machine away passes with a warning, one not composing fails the step. +// trunk's, or the revision's for a machine whose node-engine is not heard running (A-451); the run's verdict is read from its step-ended; a machine away passes with a warning, one not composing fails the step. func TestTheCompositionStepRunsOneAskPerMachine(t *testing.T) { step := meshwants.StepRun{Module: "m", Branch: "main", Revision: 7, Step: meshwants.StepRunStepComposition} s := newRunStand(t, "src2:e1", "src2:e1", "d1") @@ -160,6 +160,18 @@ func TestTheCompositionStepRunsOneAskPerMachine(t *testing.T) { t.Errorf("the change's node-engine does not compose every machine: %+v %+v %v", changed.asks["ace"].Run.Program, changed.asks["g14"].Run.Program, changed.entries) } + // No running of the node-engine is heard on g14: its composer is the revision's entry, and no entry is asked for it (A-451). + unheard := newRunStand(t, "src2:e1", "src2:e1", "d1") + unheard.r.running = func(node, module string) (ne.Running, bool) { + return ne.Running{Node: node, Module: module, Fingerprint: "src2:e1"}, node == "ace" && module == "engine" + } + if out := unheard.r.run(context.Background(), "ask-step", step); out.Outcome != meshwants.StepEndedOutcomeFailed || !strings.Contains(out.Said, "g14 does not compose") { + t.Fatalf("the step with g14's node-engine not heard came to %+v", out) + } + if unheard.asks["g14"].Run == nil || unheard.asks["g14"].Run.Program.Commit != commitE1 { + t.Errorf("g14's composer with no running heard is %+v, want the revision's entry", unheard.asks["g14"].Run) + } + // A seat digest neither the revision nor the trunk holds: could not run, naming the seat and the digest (A-261). other := newRunStand(t, "src2:e1", "src2:e1", "d2") if out := other.r.run(context.Background(), "ask-step", step); out.Outcome != meshwants.StepEndedOutcomeCouldNotRun ||