Commit a32b39d
✴️ iz2: Partial revert of #6954 — the UI half of #8300.
**Problem.** Autorevert's restart runs (`workflow_dispatch` on
`trunk/<sha>`) were filtered out of the HUD, so their results —
including real failures — never reached the grid. And a multi-run cell
was merged pairwise, newest `job.id` wins, with the flaky flag taken
from the *loser*: a pass followed by a restart failure rendered plain
red, the reverse order rendered flaky `F`.
**Proposed solution.** Invariant: **who issued a run does not change how
the HUD aggregates it.** A push, a re-run attempt and a restart are all
just runs; a cell's verdict follows from the set of conclusions, not
from the issuer and not from arrival order. Origin is reported on the
tooltip, never aggregated on. Rules, in the new
`torchci/lib/mergeCellRuns.ts`:
- one run → show that run
- success + a real failure, in any order → show the success, marked
flaky `F`
- `cancelled` loses to any non-cancelled run, and is deliberately not
failure evidence (unlike `isFailure()`); `skipped` loses to a real
result, as before
- otherwise rank success > failure > pending > neutral > skipped, newest
run breaking a tie within a class
**What changes?** Restart results reach the grid on the same terms as
any other run, and a mixed cell renders `F` in either order. This
governs every multi-run cell, not just restarts — a twice-scheduled
periodic job or a re-run now follows the ranking above instead of
newest-id-wins, so an older success outranks a newer pending run.
Measured over 14 days on the 266 `pytorch/pytorch` trunk shas that had
restart runs (cells without a restart were not measured): **14,405 cells
differ from `main`** — 13,687 restart-only cells now show their real
conclusion, 208 turn `F` (restart failed, natural run passed), 195 the
reverse, 223 stop being `F` (a cancelled co-run no longer counts as
failure), 92 in smaller classes.
**Changed, at a high level**
- `hud_query` — admit restart runs; project the run's origin and
dispatching identity
- `mergeCellRuns.ts` + `types.ts` — the rules above and which run
represents the cell; unit-tested on both permutation axes (order,
issuer)
- `fetchHud.ts` — collect every run per cell and delegate; the old
reducer is gone
- `JobTooltip.tsx` — one radio per run behind the cell, with the grid's
own status glyph and a `gh` link to that run; picking one rebinds the
log viewer, links and failure classification to it
- `commit_jobs_query` — admits restarts that *passed* (all were hidden
before); its comment records the divergence below
**Known gaps.** A restart that *failed* still doesn't show on the commit
page: `fetchCommit` dedups by newest id with no flaky marker, so
admitting one would replace the natural conclusion instead of combining
with it. Grid and commit page disagree there until that page can render
`F` — tracked as a follow-up. `commit_jobs_batch_query` and its
`viable_strict_sole_blocker` mirror are untouched: `is_green()` has no
per-job-name dedup and vetoes on the first non-success row, so restarts
only add vetoes (17 currently-green commits would go red, 0 red would go
green) — #8300's second action item.
Refs #8300
---------
Co-authored-by: Ivan Zaitsev <izaitsevfb@meta.com>
Co-authored-by: Ivan Zaitsev <izaitsevfb@users.noreply.github.com>
1 parent a6cd5e7 commit a32b39d
13 files changed
Lines changed: 2090 additions & 55 deletions
File tree
- torchci
- clickhouse_queries
- commit_jobs_query
- hud_query
- components
- commit
- job
- lib
- pages
- api/[repoOwner]/[repoName]/commit
- hud/[repoOwner]/[repoName]/[branch]
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
41 | 55 | | |
42 | 56 | | |
43 | 57 | | |
| |||
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
49 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
| |||
88 | 110 | | |
89 | 111 | | |
90 | 112 | | |
91 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
92 | 128 | | |
93 | 129 | | |
94 | 130 | | |
95 | 131 | | |
96 | 132 | | |
97 | | - | |
| 133 | + | |
98 | 134 | | |
99 | 135 | | |
100 | 136 | | |
| |||
128 | 164 | | |
129 | 165 | | |
130 | 166 | | |
131 | | - | |
| 167 | + | |
| 168 | + | |
132 | 169 | | |
133 | 170 | | |
134 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
22 | 43 | | |
23 | 44 | | |
24 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
25 | 78 | | |
26 | 79 | | |
27 | 80 | | |
| |||
33 | 86 | | |
34 | 87 | | |
35 | 88 | | |
36 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
37 | 95 | | |
38 | 96 | | |
39 | 97 | | |
| |||
61 | 119 | | |
62 | 120 | | |
63 | 121 | | |
64 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
65 | 152 | | |
66 | 153 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
270 | 275 | | |
271 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
272 | 279 | | |
273 | 280 | | |
274 | 281 | | |
| |||
0 commit comments