Repository navigation
Commit d883430
[SPARK-59293][INFRA] Fix update_build_status.yml to map non-standard conclusions
### What changes were proposed in this pull request?
This PR fixes `update_build_status.yml` so that it coerces non-standard workflow run conclusions to a value accepted by the PATCH /repos/{owner}/{repo}/check-runs/{check_run_id} endpoint. run.data.conclusion is mapped to itself when it is one of the conclusions the endpoint accepts, and to failure otherwise, instead of passing the raw value through. This mirrors the mapping of non-standard run statuses in the else branch a few lines below, added by SPARK-57124.
It also isolates per-PR sync failures, so that a single uncaught error can no longer end the whole scheduled pass:
- The per-PR check-run listing is wrapped in a `try/catch`; a failure skips only that PR, which is retried on the next pass.
- Both check-run PATCH calls go through an `updateCheckRun` helper that logs and records a failure instead of throwing.
- Backfill failures, which already skipped the PR, are now recorded too.
- After the full pass, the step calls `core.setFailed` naming every recorded PR, so a recurring error like this 422 still turns the scheduled run red instead of hiding in the log of a green run. Transient fork-run lookup failures (5xx, rate limiting) still skip the PR without failing the step, as before.
Successful syncs send the same PATCH bodies as before.
### Why are the changes needed?
The scheduled job has been failing on every run for quite a while with `startup_failure is not a member of ["success", "failure", "neutral", "cancelled", "timed_out", "action_required", "skipped"].`
Because the error was uncaught, it ended the pass and left every open PR later in the iteration unsynced, so their Build checks could stay `queued` after their fork runs had completed. Isolating failures per PR keeps one rejected value from stalling the whole job again.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Extracted the script from the YAML and ran it in node against a mocked GitHub API whose PATCH rejects invalid values with a 422, like the real endpoint. Injected a 502 on one PR's check-run listing, a 422 on another's PATCH, and a 500 on a third's backfill: the script synced every other PR, including the one after all three failures, then failed the step naming just those three. With no injected failures it sent the same PATCHes as before and did not fail the step. Not run against live data.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5
Closes #58579 from tokoko/fix-build-status-invalid-conclusion.
Lead-authored-by: Tornike Gurgenidze <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>1 parent 522140f commit d883430
1 file changed
Lines changed: 52 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
115 | 137 | | |
116 | 138 | | |
117 | 139 | | |
118 | 140 | | |
119 | 141 | | |
120 | 142 | | |
121 | 143 | | |
122 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
123 | 153 | | |
124 | 154 | | |
125 | 155 | | |
| |||
179 | 209 | | |
180 | 210 | | |
181 | 211 | | |
182 | | - | |
183 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
184 | 222 | | |
185 | 223 | | |
186 | 224 | | |
187 | 225 | | |
188 | 226 | | |
189 | | - | |
| 227 | + | |
190 | 228 | | |
191 | 229 | | |
192 | 230 | | |
193 | 231 | | |
194 | 232 | | |
195 | 233 | | |
196 | 234 | | |
197 | | - | |
| 235 | + | |
198 | 236 | | |
199 | 237 | | |
200 | 238 | | |
| |||
301 | 339 | | |
302 | 340 | | |
303 | 341 | | |
304 | | - | |
305 | | - | |
306 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
307 | 345 | | |
308 | 346 | | |
309 | 347 | | |
| |||
379 | 417 | | |
380 | 418 | | |
381 | 419 | | |
| 420 | + | |
382 | 421 | | |
383 | 422 | | |
384 | 423 | | |
385 | 424 | | |
386 | 425 | | |
387 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
0 commit comments