Commit d73a822
committed
fix: fail a SLURM job the scheduler marked FAILED, whatever its exit code
monitor_slurm_job.sh decided pass/fail from SLURM's ExitCode alone and
ignored the job state it had already queried and printed. SLURM
intermittently reports State=FAILED alongside ExitCode=0:0, and on
those jobs the log reads:
[20:05:16] Job 13132145 reached terminal state: FAILED
Job 13132145 completed successfully
The GitHub job then went green with the test failures still in its
log. Five of nine "successful" Phoenix gpu-acc runs on master were
hiding 23 failing tests this way, which is long enough for a real
regression to go unnoticed and makes a green self-hosted job worthless
as evidence.
run_monitored_slurm_job.sh already re-checks the state via sacct and
requires COMPLETED *and* 0:0 -- but only when the monitor exits
non-zero, so nothing verified the state on the success path. That
asymmetry is the bug; this makes both paths agree.
The guard is deliberately conservative: if no terminal state was
recorded it falls back to the previous exit-code-only behaviour, so it
cannot invent new red CI.
Tests: the first case reproduces the false green (the monitor returned
0 where 1 was expected) and the second pins the other direction so a
genuinely COMPLETED job still passes.
test_monitor_ci_summary.py's stub reported FAILED for every job,
including the one named "a successful job" -- a combination SLURM does
not produce for a clean run, and only harmless while the state was
being ignored. Its state now tracks the exit code, and any test that
wants the pathological pairing asks for it explicitly.
Claude-Session: https://claude.ai/code/session_017zrZooJPhZtZYgg9fJiYhg1 parent ec783a8 commit d73a822
3 files changed
Lines changed: 43 additions & 6 deletions
File tree
- .github/scripts
- toolchain/mfc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
312 | | - | |
313 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
317 | 328 | | |
318 | 329 | | |
319 | 330 | | |
320 | | - | |
| 331 | + | |
321 | 332 | | |
322 | 333 | | |
323 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
41 | | - | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
0 commit comments