nchammas opened a new pull request, #60467:
URL: https://github.com/apache/spark/pull/60467

   ### What changes were proposed in this pull request?
   
   The Build Status workflow (`update_build_status.js`) reads each open PR's 
GitHub Actions check suites on the head commit, then syncs the mirrored `Build` 
check from the fork's `build_main.yml` run.
   
   The GraphQL query previously filtered those suites with `checkName: 
"Build"`. That filter is a join to every historical check run of that name, not 
a unique list of suites. GitHub then returns the same suite many times and 
still sets `pageInfo.hasNextPage`. The script treated `hasNextPage` as overflow 
and skipped the PR instead of syncing it.
   
   This change lists Actions suites by `appId` only and keeps `checkName: 
"Build"` with `checkType: LATEST` on `checkRuns`. Overflow is again "the page 
of Actions suites is full," which is the remaining real limit.
   
   ### Why are the changes needed?
   
   Production Build Status runs fail on PRs such as #60293 with:
   
   ```
   The PR head commit has more check suites or Build checks than a page holds
   ```
   
   A live query of that PR with the old filter still returns ten copies of one 
suite id and `hasNextPage: true`. The same query without `checkName` on 
`checkSuites` returns one suite, one latest `Build` check, and `hasNextPage: 
false`. REST on that commit also shows a single `Build` check.
   
   Until this is fixed, those PRs never get a synced `Build` check on 
apache/spark.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No Spark API, SQL, or config change. Contributors may see previously stuck 
`Build` checks on apache/spark start updating again.
   
   ### How was this patch tested?
   
   There is no committed JS test job for this workflow. Local checks:
   
   1. `node --check .github/workflows/update_build_status.js`
   2. A throwaway mock of the script: one unique `Build` suite updates the 
in-progress check; a full page with `hasNextPage` still fails that PR; ten 
duplicate suite nodes with `hasNextPage: false` still sync once.
   3. Line-length and ASCII scan of the changed file.
   4. Live GraphQL against apache/spark#60293, old filter vs new filter, as 
above.
   
   The mock was not committed. GitHub-side behavior (suite identity under 
`checkName`) cannot be fully covered without hitting the API.
   
   Remaining limit, unchanged: a commit with more than ten GitHub Actions 
workflow runs on apache/spark can still overflow, for example an in-repo branch 
that retried `build_main.yml` many times. Fork PRs almost always have one 
Actions suite on apache/spark.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Cursor Grok 4.6
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to