From 4dc67a98fa6423e28053f86452e49ac38ccbc799 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 21:17:12 +0100 Subject: [PATCH] The pipeline part and the assigner read the runner's events and pipeline by fingerprint, as CT14 names it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The join with CT14 (08812c7f) renames fp to fingerprint in the runner's Pipeline, PipelineStarted, PipelineEnded; the readers follow. Builds: design 47 G §534, §550, §585, §646 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- .../cmd/mesh-delivery-assigner/pipelines.go | 2 +- .../cmd/mesh-delivery-assigner/pipelines_test.go | 2 +- modules/mesh-delivery-pipeline/internal/pipeline/read.go | 2 +- modules/mesh-delivery-pipeline/internal/pipeline/start.go | 4 ++-- .../mesh-delivery-pipeline/internal/pipeline/start_test.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines.go index efddeb7a..43fe85ed 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines.go @@ -173,7 +173,7 @@ func (e *pipelineEnds) take(p mpr.PipelineEnded, passed bool) error { return nil // an older end, or this one again } } - end := End{Source: p.Source, EndCount: p.EndCount, Fp: p.Fp, Commit: p.Commit, Passed: passed, Why: p.Why} + end := End{Source: p.Source, EndCount: p.EndCount, Fp: p.Fingerprint, Commit: p.Commit, Passed: passed, Why: p.Why} value, err := json.Marshal(end) if err != nil { return err diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines_test.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines_test.go index db115598..8b4a6da8 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines_test.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pipelines_test.go @@ -56,7 +56,7 @@ func (m *memEnds) swap(key string, v []byte, rev uint64) error { } func pipe(module, branch string, source, count int64, fp, outcome string, steps ...mpr.StepResult) mpr.PipelineEnded { - return mpr.PipelineEnded{Module: module, Branch: branch, Source: source, EndCount: count, Fp: fp, Outcome: outcome, Steps: steps, + return mpr.PipelineEnded{Module: module, Branch: branch, Source: source, EndCount: count, Fingerprint: fp, Outcome: outcome, Steps: steps, Pipeline: branch + "." + module, Commit: "c"} } diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/read.go b/modules/mesh-delivery-pipeline/internal/pipeline/read.go index 00163110..0fd36d66 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/read.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/read.go @@ -80,7 +80,7 @@ func (r Reads) Stands() (seat.StandsAnswer, error) { continue } out = append(out, seat.Wait{Pipeline: p.Pipeline, Module: p.Module, Branch: p.Branch, Commit: p.Commit, - Group: p.Group, Run: p.Run, Source: p.Source, Revision: p.Revision, Fp: p.Fp, Step: s.Step, + Group: p.Group, Run: p.Run, Source: p.Source, Revision: p.Revision, Fingerprint: p.Fingerprint, Step: s.Step, Artifact: s.Artifact, On: s.On, Since: *s.Started, V: 1}) } } diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/start.go b/modules/mesh-delivery-pipeline/internal/pipeline/start.go index 3d693669..c507db63 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/start.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/start.go @@ -64,7 +64,7 @@ func (s *Starter) Start(b Begin) (bool, error) { now = s.Now().UTC() } key := Key(b.Branch, b.Source, b.Module) - p := seat.Pipeline{V: 1, Pipeline: key, Branch: b.Branch, Source: b.Source, Module: b.Module, Commit: b.Commit, Fp: b.Fp, + p := seat.Pipeline{V: 1, Pipeline: key, Branch: b.Branch, Source: b.Source, Module: b.Module, Commit: b.Commit, Fingerprint: b.Fp, Group: b.Group, Repository: b.Repository, Revision: b.Revision, Outcome: seat.PipelineOutcomeRunning, Started: &now, Steps: []seat.StepResult{}} raw, err := json.Marshal(p) @@ -78,7 +78,7 @@ func (s *Starter) Start(b Begin) (bool, error) { return false, fmt.Errorf("the pipeline %s is not written: %w", key, err) } ev := seat.PipelineStarted{V: 1, At: &now, Pipeline: key, Branch: b.Branch, Source: b.Source, Module: b.Module, - Commit: b.Commit, Fp: b.Fp, Group: b.Group, Revision: b.Revision} + Commit: b.Commit, Fingerprint: b.Fp, Group: b.Group, Revision: b.Revision} commitOrGroup := b.Commit if b.Group != "" { commitOrGroup = b.Group diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/start_test.go b/modules/mesh-delivery-pipeline/internal/pipeline/start_test.go index da18b6ba..5b657f5b 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/start_test.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/start_test.go @@ -50,7 +50,7 @@ func TestStarts(t *testing.T) { t.Errorf("outdated asked %+v, want the package on its branch", asked) } var p seat.Pipeline - if err := json.Unmarshal(store["main.41.app"], &p); err != nil || p.Commit != "c1" || p.Fp != "src2:aa" || p.Revision != 9 || + if err := json.Unmarshal(store["main.41.app"], &p); err != nil || p.Commit != "c1" || p.Fingerprint != "src2:aa" || p.Revision != 9 || p.Outcome != seat.PipelineOutcomeRunning || p.Source != 41 { t.Errorf("the pipeline main.41.app = %+v (%v)", p, err) }