[SPARK-57155][INFRA] Fix update_build_status check-run pagination and output parsing#56213
Open
viirya wants to merge 1 commit into
Open
[SPARK-57155][INFRA] Fix update_build_status check-run pagination and output parsing#56213viirya wants to merge 1 commit into
update_build_status check-run pagination and output parsing#56213viirya wants to merge 1 commit into
Conversation
…nd output parsing ### What changes were proposed in this pull request? Two robustness fixes to the scheduled `update_build_status.yml` workflow: 1. List a commit's check-runs with `github.paginate(..., per_page: 100)` instead of a single un-paginated `github.request`, matching `notify_test_workflow.yml`. The default page size is 30, so the target `Build` check could fall off the first page on a SHA that accumulates more check-runs than that (CI matrix, external checks, duplicate `Build` checks from reopened PRs). 2. Wrap `JSON.parse(cr.output.text)` in try/catch and `continue` on failure. A `Build` check created by something other than this mechanism (an older version, a manual run, or another app), or one with empty output text, would otherwise throw inside the loop and abort the whole scheduled run. ### Why are the changes needed? Both issues silently block status updates. If the `Build` check is paginated off the first page, the PR stays stuck in `queued` forever because the updater never sees it. If an unparseable `Build` check is encountered, the uncaught exception aborts the run and blocks updates for every PR queued behind it that cycle. ### Does this PR introduce _any_ user-facing change? No. CI infrastructure only. ### How was this patch tested? Static verification: the embedded `actions/github-script` body passes `node --check`, and the workflow YAML parses. Note `github.paginate` returns a flat array, so the iteration was updated from `checkRuns.data.check_runs` to `checkRuns`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.8) Co-authored-by: Claude Code
dongjoon-hyun
approved these changes
May 29, 2026
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM. Thank you, @viirya .
If possible, could you make this contribution to the sub-projects please?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Two robustness fixes to the scheduled
update_build_status.ymlworkflow:List a commit's check-runs with
github.paginate(..., per_page: 100)insteadof a single un-paginated
github.request, matchingnotify_test_workflow.yml.The default page size is 30, so the target
Buildcheck could fall off thefirst page on a SHA that accumulates more check-runs than that (CI matrix,
external checks, duplicate
Buildchecks from reopened PRs).Wrap
JSON.parse(cr.output.text)in try/catch andcontinueon failure. ABuildcheck created by something other than this mechanism (an olderversion, a manual run, or another app), or one with empty output text, would
otherwise throw inside the loop and abort the whole scheduled run.
Why are the changes needed?
Both issues silently block status updates. If the
Buildcheck is paginated offthe first page, the PR stays stuck in
queuedforever because the updater neversees it. If an unparseable
Buildcheck is encountered, the uncaught exceptionaborts the run and blocks updates for every PR queued behind it that cycle.
Does this PR introduce any user-facing change?
No. CI infrastructure only.
How was this patch tested?
Static verification: the embedded
actions/github-scriptbody passesnode --check, and the workflow YAML parses. Notegithub.paginatereturns aflat array, so the iteration was updated from
checkRuns.data.check_runstocheckRuns.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)