Commit 82fea5d
committed
Auto-file GitHub issues for nightly UT new failures
New failures in the nightly UT run are today only visible as a red job and a
CSV artifact, and muting one means a human hand-writing a skip issue. This adds
a deterministic bot that files one issue per root cause, plus the artifacts it
needs from the existing UT pipeline.
Filing an issue mutes a test: fetch_issues.sh subtracts the `Cases:` block of
every open `skipped` issue from the next night's failures. Every decision here
therefore fails in the direction of leaving a case running rather than silently
muting it, and the job stays in --dry-run until the repo variable
UT_AUTO_ISSUE_ENABLED is set to `true`.
Review in this order:
1. The producers. These only add artifacts and change no existing behaviour:
check-ut.py writes all_cases_<category>.log (the full case universe, which
unlike passed+failures also carries skipped cases), ut_result_check.sh
records its per-category count verdict to run_health.jsonl, and the two
composite actions land collect_env.log and versions.txt under ut_log so the
shas actually under test travel with the artifact.
2. The wiring: _linux_ut.yml exports UT_RUN_HEALTH_FILE, _ut_auto_issue.yml is
a new callable workflow, and nightly_ondemand.yml calls it after the UT
matrix - on !cancelled() rather than success(), since the UT job fails
exactly when there is something to file.
3. ut_auto_issue.py. Its stage banners, Stage 0 through Stage 8, are the
intended reading order.
4. ut-auto-issue-body.md, whose `Cases:` block and trailing marker are both
machine-consumed; its header comment says which consumer reads what.
Three choices had a real alternative and are worth calling out.
Grouping keys on (normalized error, test file) rather than on the error alone.
The error alone would collapse a generic message - a precision mismatch, or the
sentinel used when a case dies without one - across unrelated files into a
single issue and therefore a single very wide mute. Over-splitting is the safe
direction, so one root cause spread over several files stays several issues,
and they are linked to each other by a comment instead of being merged.
The baseline is resolved per category, not per run. There is no "last good
nightly", only "the last nightly in which this category completed healthily":
a run that truncated in op_ut is still a perfectly good op_extended baseline.
The per-run issue cap admits or defers a whole error family at once. A plain
head/tail cut on the size-ordered list would file the big test files of one
root cause and defer its small ones, muting half a bug and leaving the rest to
fail every night.
Test Plan
No automated test ships with this change, so the pre-enable dry run below is
the gate, not a formality.
During development the pure logic was exercised against stubbed inputs -
normalization stability across nights, grouping, the family-atomic issue
budget, the Cases: parse/append contract that does the actual muting, and a
main() smoke test with every gh call replaced by a stub. Those harnesses were
ad hoc and are not part of the change.
Before UT_AUTO_ISSUE_ENABLED is set, the job must be dry-run against real past
nightlies and the rendered bodies in the report artifact reviewed by hand; the
normalization rules are the part most likely to need tuning:
```bash
python3 .github/scripts/ut_auto_issue.py --run-id <past_nightly_run_id> --dry-run
```
That command was not executed here: this workstation has no authenticated gh
and the script needs a real run id. The workflow's own default is --dry-run, so
merging this changes no issue state until the repo variable is set.
Authored with the assistance of an AI coding agent.1 parent 4086121 commit 82fea5d
9 files changed
Lines changed: 1699 additions & 3 deletions
File tree
- .github
- ISSUE_TEMPLATE/agent
- actions
- linux-testenv
- linux-uttest
- scripts
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
204 | 212 | | |
205 | 213 | | |
206 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
| 241 | + | |
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
| |||
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| 307 | + | |
| 308 | + | |
302 | 309 | | |
303 | | - | |
304 | 310 | | |
305 | 311 | | |
306 | | - | |
307 | 312 | | |
308 | 313 | | |
309 | 314 | | |
| |||
325 | 330 | | |
326 | 331 | | |
327 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
328 | 346 | | |
329 | 347 | | |
330 | 348 | | |
| |||
390 | 408 | | |
391 | 409 | | |
392 | 410 | | |
| 411 | + | |
393 | 412 | | |
394 | 413 | | |
395 | 414 | | |
| |||
0 commit comments