Commit 5be718f
committed
CI: Kill leaf jobs when aborting stale PR dispatchers
The OSS dispatcher already aborts the prior dispatcher build for the same
PR, but the 8 leaf jobs it spawned via `build job: ..., wait: true` keep
running until they finish naturally. That ties up build executors every
time someone pushes a new commit to a PR.
Port the pattern NIXL uses: scrape each stale dispatcher's console log
for `Starting building: <name> #<num>` lines to find its children, kill
the leaves first so the dispatcher's wait unblocks, then kill the
dispatcher. Use `doKill()` instead of `doStop()` for a hard stop, and
retry up to 3 times with a 5s gap so builds caught mid-startup still get
torn down.
Failures inside the abort block are still swallowed and logged - we
never want stale cleanup to break a fresh build.1 parent 95beefc commit 5be718f
1 file changed
Lines changed: 32 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
69 | 93 | | |
| 94 | + | |
70 | 95 | | |
71 | 96 | | |
72 | | - | |
| 97 | + | |
73 | 98 | | |
74 | 99 | | |
75 | 100 | | |
| |||
0 commit comments