Commit 62f2268
committed
fix(kwok): fail fast on unworkable timeout margin at derive time
The derive step validated job_timeout_minutes as a positive integer but
never checked that the resulting sync-gate budget (job_timeout_minutes*60
- 240s margin) clears the SYNC_BUDGET_FLOOR_SECONDS floor consumed by
compute_sync_budget. A misconfigured caller (small job_timeout_minutes, or
a future bump to the 240s margin) would compute an already-past or
barely-positive deadline that only surfaced at the first sync gate — after
Go setup, kind prep, and make build had already burned CI minutes.
Add the same floor check at derive time so misconfiguration fails before
any of that work starts. The 120 literal is hand-synced with
SYNC_BUDGET_FLOOR_SECONDS in kwok/scripts/lib/sync-budget.sh and is
guarded by sync-budget_test.sh, same contract as the existing 240s margin
sync check.
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>1 parent 2135446 commit 62f2268
3 files changed
Lines changed: 55 additions & 3 deletions
File tree
- .github/actions/kwok-test
- docs/contributor
- kwok/scripts/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
391 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
392 | 394 | | |
393 | 395 | | |
394 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
101 | 143 | | |
102 | 144 | | |
103 | 145 | | |
104 | 146 | | |
105 | | - | |
| 147 | + | |
0 commit comments