From 14208c808c4c0cc54db056b31e9085689ca2c085 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 25 Nov 2026 17:12:13 +0100 Subject: [PATCH] V1 view-rows-carry-fingerprint: the pipeline page names each mover's fingerprint and version from its row Builds: design 47 H2 H-A-709 (1); row V1 (the tiers of PipelineView still read pipeline.movers: question sent to the lead) --- .../internal/view/pipelines_test.go | 13 +++++++++++++ .../internal/view/pipelinespage.go | 11 +++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/mesh-delivery-view/internal/view/pipelines_test.go b/modules/mesh-delivery-view/internal/view/pipelines_test.go index ab9cb2063..52270fa42 100644 --- a/modules/mesh-delivery-view/internal/view/pipelines_test.go +++ b/modules/mesh-delivery-view/internal/view/pipelines_test.go @@ -133,6 +133,12 @@ func TestThePipelinesPage(t *testing.T) { Steps: map[string]int64{"passed": 5, "failed": 1, "could not run": 1, "waiting for a build node": 2}}) runner.setRows(testBranch, seat.PipelineRow{Pipeline: "release.8", Source: 4, Revision: 8, Outcome: seat.PipelineOutcomePassed}, seat.PipelineRow{Pipeline: "release.7", Source: 4, Revision: 7, Outcome: seat.PipelineOutcomeSuperseded}) + // H-A-709 (1): a pipeline of 129 movers whose answer holds none in `movers`, only the rows, each with its fingerprint and version. + big := seat.ShowAnswer{Pipeline: seat.Pipeline{Pipeline: "main.13", Branch: "main", Source: 9, Revision: 13, Outcome: seat.PipelineOutcomePassed}} + for i := range 129 { + big.Movers = append(big.Movers, seat.MoverRow{Module: fmt.Sprintf("m%03d", i), Fingerprint: "src2:" + strings.Repeat(fmt.Sprintf("%x", i%16), 64), Version: fmt.Sprintf("0.1.%d", i), Outcome: seat.MoverRowOutcomePassed}) + } + runner.shows["main.13"] = big p := NewPipelines(runner.call, func() []string { return []string{testBranch} }, 0, nil) m := New(testView) fill(m, sourceE(t, 4)) @@ -188,6 +194,13 @@ func TestThePipelinesPage(t *testing.T) { `wantedapplyingno want written`, `held: connection refusedheld: health failed on n1`, "

TIER 2

", `changes?pipeline=main.12\u0026since=`}}, + {"the terminal view's pipeline of 129 movers names each mover's fingerprint and version from its row", func() string { + a, err := p.Show("main.13", "", "") + if err != nil { + return err.Error() + } + return text(func(b *bytes.Buffer) { PipelineTable(b, PipelineAnswer{ShowAnswer: a}, "") }) + }, []string{"m000 src2:" + strings.Repeat("0", 64) + " 0.1.0 passed", "m128 src2:" + strings.Repeat("0", 64) + " 0.1.128 passed", "m127 src2:" + strings.Repeat("f", 64) + " 0.1.127 passed"}}, {"a stage's worst outcome follows the runner's step words, an unknown one counting as failed", func() string { at := func(o ...string) string { var ss []seat.StepResult diff --git a/modules/mesh-delivery-view/internal/view/pipelinespage.go b/modules/mesh-delivery-view/internal/view/pipelinespage.go index 4353f1e6a..0e070a2d3 100644 --- a/modules/mesh-delivery-view/internal/view/pipelinespage.go +++ b/modules/mesh-delivery-view/internal/view/pipelinespage.go @@ -99,17 +99,12 @@ func failedText(f *seat.FailedStep) string { return s } -// MoverRowsText is one pipeline's mover rows as show without a mover answers them: each row's module, outcome and failed -// step, beside the pipeline's mover of that module's fingerprint and published version. +// MoverRowsText is one pipeline's mover rows as show without a mover answers them: each row's module, its fingerprint and +// version, which the row carries (design 47 H2 H-A-709 (1)), its outcome and failed step. func MoverRowsText(a seat.ShowAnswer) [][]string { - movers := map[string]seat.Mover{} - for _, m := range a.Pipeline.Movers { - movers[m.Module] = m - } var out [][]string for _, r := range a.Movers { - m := movers[r.Module] - out = append(out, []string{r.Module, m.Fingerprint, m.Version, r.Outcome, failedText(r.Failed)}) + out = append(out, []string{r.Module, r.Fingerprint, r.Version, r.Outcome, failedText(r.Failed)}) } return out }