Skip to content

fix: skip orphaned check suites when checking GitHub CI - #1163

Open
trivenay wants to merge 1 commit into
nodejs:mainfrom
trivenay:fix-orphaned-check-suite-blocking
Open

fix: skip orphaned check suites when checking GitHub CI#1163
trivenay wants to merge 1 commit into
nodejs:mainfrom
trivenay:fix-orphaned-check-suite-blocking

Conversation

@trivenay

@trivenay trivenay commented Aug 13, 2026

Copy link
Copy Markdown

Problem

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 remain stuck in QUEUED with 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 with git 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 macOS suite and landed manually.

Fix

Skip a non-completed suite only when both:

  • it has zero check runs (checkRuns.nodes.length === 0), and
  • it was created more than 3 hours ago.

A 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 createdAt to the checkSuites GraphQL query to compute suite age.

Trade-off

If someone adds commit-queue before request-ci has 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:

PR Orphaned suite runs age result with this fix
#64991 queued 0 ~199h skipped → unblocked
#64830 queued 0 ~358h skipped → unblocked

In both cases the single orphaned suite is exactly what blocked the commit queue, and this change lets the check pass instead of hanging indefinitely.

`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
trivenay force-pushed the fix-orphaned-check-suite-blocking branch from 36d7b3d to f8aeedb Compare August 13, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant