Skip to content
Latchkey

How to Handle a Flaky Required Check Blocking the Merge Queue

A flaky required check fails intermittently on the merge group, so the queue drops the pull request and rebuilds the batch, stalling throughput.

Because the queue removes any PR whose required check fails, a flaky check can churn the whole queue. Add bounded retries, quarantine known-flaky tests, and keep the flaky suite non-required until stabilized.

Steps

  • Add bounded retries to the flaky command so transient failures self-heal.
  • Quarantine known-flaky tests out of the required suite.
  • Track flake rate and only re-add the check once it is stable.

Retry the flaky step

.github/workflows/ci.yml
steps:
  - uses: nick-fields/retry@v3
    with:
      max_attempts: 3
      timeout_minutes: 15
      command: npm run test:e2e

Quarantine at the test level

Terminal
# Skip a known-flaky test until it is fixed (Jest)
test.skip('reconnects after network blip', () => {})

Gotchas

  • Blanket retries hide real regressions; scope them to genuinely transient steps.
  • A flaky required check on the merge group rebuilds the whole batch, multiplying wasted minutes; Latchkey managed runners auto-retry transient infrastructure failures to cut that churn.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →