From 9907de906d68266844ac726edaaf85e638c11c04 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 25 Nov 2026 18:08:09 +0100 Subject: [PATCH] P1 (log): the step log's entry of a step asked again after a passed-over end names the pipeline's revision and the passed-over one Builds: design 47 H2 H-A-577 (3), H-A-743 --- .../mesh-delivery-pipeline/internal/pipeline/endopen_test.go | 4 ++++ modules/mesh-delivery-pipeline/internal/pipeline/steps.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/endopen_test.go b/modules/mesh-delivery-pipeline/internal/pipeline/endopen_test.go index 891236465..e0b5f7a97 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/endopen_test.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/endopen_test.go @@ -263,6 +263,10 @@ func TestAPipelineWithNothingOpenEndsAtOnce(t *testing.T) { if len(started) != 1 || !started[0].Result.Rerun || started[0].Result.By != "mesh-delivery-pipeline" || started[0].Result.Ask != "x1again" { t.Errorf("step-started said %+v, want one rerun by the runner of x1again", started) } + // H-A-743: the step log's entry of the step asked again names the pipeline's own revision and the passed-over end's. + if len(p.Unlogged) != 1 || p.Unlogged[0].Revision == 0 || p.Unlogged[0].PassedOver == 0 || p.Unlogged[0].PassedOver >= p.Unlogged[0].Revision || p.Unlogged[0].What != seat.LogEntryWhatStarted { + t.Errorf("the step log's entries %+v, want one started entry naming the pipeline's revision and the older passed-over one", p.Unlogged) + } if !slices.ContainsFunc(journal, func(l string) bool { return strings.Contains(l, "passed over") }) { t.Errorf("the passed-over end is not said: %q", journal) } diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/steps.go b/modules/mesh-delivery-pipeline/internal/pipeline/steps.go index 97ab0410e..5005b2b59 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/steps.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/steps.go @@ -370,6 +370,10 @@ func (h *Hearer) OnStepEndedRevised(bs StepSeat, subject string, ev StepEnded, s old := s.Ask a, why := h.supersededAgain(&p, i, ev, passed, now) if a != nil { + // The step log's entry of the step asked again names the pipeline's own revision and the one the passed-over end + // named (design 47 H2 H-A-577 (3), H-A-743). + p.Unlogged = append(p.Unlogged, seat.LogEntry{Pipeline: ev.Pipeline, Module: s.Module, Step: s.Step, Artifact: s.Artifact, + What: seat.LogEntryWhatStarted, Outcome: seat.LogEntryOutcomeRunning, Revision: own, PassedOver: superseding, At: now}) if _, err := h.Store.Update(ev.Pipeline, p, rev); errors.Is(err, ErrChanged) { continue } else if err != nil {