ganeshashree commented on code in PR #57867:
URL: https://github.com/apache/spark/pull/57867#discussion_r3746147196
##########
.github/workflows/update_build_status.yml:
##########
@@ -122,8 +186,162 @@ jobs:
details_url: run.data.details_url
})
}
+ }
+ }
+
+ // No syncable Build check: notify_test_workflow.yml never
created one, or only
+ // a stale action_required one exists. Recreate it here,
mirroring notify. Skip
+ // if the head repo was deleted.
+ if (!syncableBuildCheck && pr.head.repo) {
+ const forkOwner = pr.head.repo.owner.login
+ const forkRepo = pr.head.repo.name
+ // Look up the fork's build_main.yml runs for the PR
branch, matching
+ // notify_test_workflow.yml. Filter by branch (head.ref),
not just head_sha:
+ // build_main.yml skips fork pushes to master (the "Sync
fork" case), so the
+ // same SHA can carry a skipped/unrelated run on another
branch, and a
+ // head_sha-only lookup could attach the Build check to
that run instead of
+ // the PR branch's. Then pick the run whose head_sha
equals the settled head
+ // SHA so stale runs from earlier commits on the branch
cannot drive the
+ // decision. Re-poll a few times: the run is often not yet
registered right
+ // after a push, and we must not create the sticky
action_required check below
+ // over registration lag. A transient lookup error (5xx,
network, rate limit)
+ // aborts to a later scheduled pass; any other error is
treated as "no runs".
+ let matched_run
+ let transient = false
+ for (let attempt = 0; attempt < 3; attempt++) {
Review Comment:
Fixed in the latest commit. When the initial checkRuns listing already shows
an action_required Build check, the backfill now does a single sleepless lookup
(attempts = 1) instead of 3 lookups with two 3s sleeps. And if that lookup
still finds no run, the guidance check is already present, so we continue
without the recheck listing or the create. The re-poll/retries only remain for
the genuine registration-lag case where no action_required check exists yet. A
PR that permanently lacks a fork run now costs one lookup per pass, while still
getting promoted to a queued check on whichever pass first sees a run appear.
Thanks!
--
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]