fix: skip orphaned check suites when checking GitHub CI - #1163
Open
trivenay wants to merge 1 commit into
Open
Conversation
`checkGitHubCI()` blocks landing with "GitHub CI is still running" whenever any GitHub Actions check suite has a status other than COMPLETED. GitHub occasionally creates check suites that stay stuck in QUEUED with zero check runs and are never dispatched, so they never complete. These orphaned suites block the commit queue indefinitely and force collaborators to land PRs manually. Skip a non-completed suite only when it has no check runs and was created more than 3 hours ago, since a legitimately queued suite gets its runs attached within seconds. Suites with active runs still block as before, and a fresh empty suite (within the window) is not skipped. Adds `createdAt` to the checkSuites GraphQL query to compute suite age. Refs: nodejs#1160 Signed-off-by: Naman Trivedi <trivenay@amazon.com>
trivenay
force-pushed
the
fix-orphaned-check-suite-blocking
branch
from
August 13, 2026 20:08
36d7b3d to
f8aeedb
Compare
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.
Problem
checkGitHubCI()blocks landing with✘ GitHub CI is still runningwhenever any GitHub Actions check suite has a status other thanCOMPLETED. GitHub occasionally creates check suites that remain stuck inQUEUEDwith zero check runs — they are never dispatched and will never complete. These orphaned suites block the commit queue indefinitely, forcing collaborators to land PRs manually withgit node land.This was discussed in #1160 and observed on at least two recent nodejs/node PRs (#64991, #64830), both stuck on an orphaned
Test macOSsuite and landed manually.Fix
Skip a non-completed suite only when both:
checkRuns.nodes.length === 0), andA legitimately queued suite gets its check runs attached within seconds, so it will not match. Suites with active runs still block as before, and a freshly created empty suite (within the window) is not skipped. This is strictly narrower than the current manual workaround (
git node land --yes), which bypasses all checks including real failures.Adds
createdAtto thecheckSuitesGraphQL query to compute suite age.Trade-off
If someone adds
commit-queuebeforerequest-cihas finished triggering all workflows, a suite that should have run but hasn't started yet could — after aging past the 3h threshold — be skipped, landing the PR without that workflow's results. The 3h window makes this unlikely in practice, and the timeout can be made configurable in a follow-up if desired.Test
Added a unit test with an orphaned suite (0 runs, old
createdAt) alongside a completed suite; the checker now passes instead of blocking.test/unit/pr_checker.test.js: 74/74 pass.Refs: #1160
Validated against the affected PRs
Ran the skip condition against the live check-suite data of both PRs that were stuck on this:
queuedqueuedIn both cases the single orphaned suite is exactly what blocked the commit queue, and this change lets the check pass instead of hanging indefinitely.