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)
This commit is contained in:
2026-11-25 17:12:13 +01:00
parent f3e68c6646
commit 14208c808c
2 changed files with 16 additions and 8 deletions
@@ -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) {
`<td class="wanted">wanted</td><td class="applying">applying</td><td class="not-run">no want written</td>`,
`<td class="held">held: connection refused</td><td class="held">held: health failed on n1</td>`,
"<h2>TIER 2</h2>", `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
@@ -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
}