From 9bba3000f3f1497663e52082c3a459b803177982 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 23 Nov 2026 10:57:26 +0100 Subject: [PATCH] Pipelines page: a stage's count is of the worst outcome's group Passed, carried and passed read "passed 2/3", as if one did not pass: the cell counts the artifacts in the group of its worst outcome (failed, not run, waiting, running, passed) and shows the count only where fewer than all are in it, so a cell never reads worse or better than it is. Builds: design 47 H2 H-A-531 addendum (3), as read in hq d7e7d204 --- .../mesh-delivery-view/internal/view/pipelines_test.go | 8 ++++---- .../mesh-delivery-view/internal/view/pipelineview.go | 10 ++++++---- 2 files changed, 10 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 c41077c6b..f640a91f4 100644 --- a/modules/mesh-delivery-view/internal/view/pipelines_test.go +++ b/modules/mesh-delivery-view/internal/view/pipelines_test.go @@ -165,7 +165,7 @@ func TestThePipelinesPage(t *testing.T) { "failed; first failure: unit beta:program: could not run: no build node; 1 of 4 movers run their build on every node they are placed on; 1 is placed on none", "

TIER 1

", "MOVEROUTCOMEBUILDLINTUNITINTEGRATIONVALIDATECOMPOSITIONCODE REVIEWAPPROVALn1n2n3", `alphapassedpassed 2/3", `running the pipeline's buildrunning the pipeline's build`, + `alpha:tool: passed">passed`, `running the pipeline's buildrunning the pipeline's build`, `could not run 1/2", `waiting`, `wantedapplyingno want written`, @@ -180,8 +180,8 @@ func TestThePipelinesPage(t *testing.T) { return stageCell(ss, t0).Text() } return strings.Join([]string{at("passed", "running", "waiting for a build node", "not asked", "running"), at("cancelled", "could not run"), - at("frobbed", "passed"), at("running", "running"), at("nothing to run"), at()}, "|") - }, []string{"not asked 1/5|could not run 1/2|frobbed 1/2|running 2/2|nothing to run|"}}, + at("frobbed", "passed"), at("running", "running"), at("nothing to run"), at("failed", "passed", "carried"), at()}, "|") + }, []string{"not asked 1/5|could not run 1/2|frobbed 1/2|running|nothing to run|failed 1/3|"}}, {"a mover's page is its steps, each asked, taken and ended, how long it waited and how long it ran", func() string { return web("/pipelines/show?pipeline=main.12&mover=beta") }, []string{"ASKEDTAKENENDEDWAITEDRAN", @@ -212,7 +212,7 @@ func TestThePipelinesPage(t *testing.T) { return text(func(b *bytes.Buffer) { PipelineTable(b, *got, "") }) }, []string{"PIPELINE main.12: failed; first failure: unit beta:program: could not run: no build node; 1 of 4 movers", "TIER 1 MOVER OUTCOME BUILD LINT UNIT INTEGRATION VALIDATE COMPOSITION CODE REVIEW APPROVAL N1 N2 N3", - "alpha passed passed 2/3 - - - - - passed - running the pipeline's build running the pipeline's build -", + "alpha passed passed - - - - - passed - running the pipeline's build running the pipeline's build -", "delta passed - - - - - - - - - - -", "TIER 2", "beta failed - - could not run 1/2 - - - - waiting wanted applying no want written", "gamma passed - - - - - - - - held: connection refused held: health failed on n1 -"}}, diff --git a/modules/mesh-delivery-view/internal/view/pipelineview.go b/modules/mesh-delivery-view/internal/view/pipelineview.go index 1dbe8e8fc..c193bde01 100644 --- a/modules/mesh-delivery-view/internal/view/pipelineview.go +++ b/modules/mesh-delivery-view/internal/view/pipelineview.go @@ -72,7 +72,8 @@ type MoverStage struct { Nodes []NodeCell `json:"nodes"` } -// StageCell is one stage of one mover: the worst outcome over its artifacts, how many hold it of how many, and each +// StageCell is one stage of one mover: the worst outcome over its artifacts, how many are in its group (failed, not run, +// waiting, running, passed) of how many, and each // artifact's waited, ran and why, shown on hover. type StageCell struct { Outcome string `json:"outcome,omitempty"` @@ -81,9 +82,10 @@ type StageCell struct { Steps []string `json:"steps,omitempty"` } -// Text is the cell's outcome, with the count where the stage has several artifacts (H-A-531 addendum (3)). +// Text is the cell's outcome, with how many artifacts are in its group where fewer than all are (H-A-531 addendum (3), as read +// in hq d7e7d204): passed, carried and passed read "passed"; failed, passed and passed "failed 1/3". func (c StageCell) Text() string { - if c.Of > 1 { + if c.Count < c.Of { return fmt.Sprintf("%s %d/%d", c.Outcome, c.Count, c.Of) } return c.Outcome @@ -133,7 +135,7 @@ func stageCell(steps []seat.StepResult, now time.Time) StageCell { switch r := stepRank(s.Outcome); { case r > worst: worst, c.Outcome, c.Count = r, s.Outcome, 1 - case s.Outcome == c.Outcome: + case r == worst: c.Count++ } waited, ran := waitedRan(s, now)