Skip to content

fix(ci): never cancel a pull request's Queue check - #450

Merged
kixelated merged 1 commit into
mainfrom
fix/queue-pr-cancel
Nov 3, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/queue-pr-cancel

Conversation

@kixelated

@kixelated kixelated commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

moq-dev/quest#439 made the required Queue job report the reusable build's result: needs: build with if: always() && github.event_name == 'merge_group'. On a pull request that job now waits for build to skip before it skips itself. The workflow-level concurrency group (cancel-in-progress: true) cancels a PR's run when a second event for the same PR arrives within seconds, such as synchronize from a push followed by edited from a body edit. The cancelled run's Queue check then reports cancelled, which fails the required check and blocks enqueueing.

Seen on moq-dev/quest#445, head adb28aa6: run 41683755363 had Queue cancelled while Queue build and Report Queue skipped, next to run 41683758122, which skipped normally. Both were created in the same second.

Approach

Drop the workflow's concurrency group and say why in a comment:

  • Merge groups each have their own ref, and dispatches each have their own head, so the group never coordinated a merge-group run with another. Its only effect was cancelling a PR's duplicate run, which is the bug.
  • With no group, nothing cancels a pull request's run, so its Queue check always ends skipped.
  • The merge-group path is unchanged: Queue still runs under always() and fails when the build fails or is cancelled, so a skipped context can't pass the group.

Alternatives

  • cancel-in-progress: ${{ github.event_name != 'pull_request' }}: rejected. A group without cancel-in-progress still cancels a pending run when a newer one queues (GitHub docs on concurrency), so three quick events would still cancel the middle run's Queue.
  • Make Queue skip immediately off merge groups: not possible while it keeps needs: build, since a job waits for its needs before it evaluates if. always() is what keeps it running when the build is cancelled (status check functions). Dropping needs would lose the build's result.

Impact

  • No public API change. CI only.

Related

Review

  • Reviewer: Codex (quest review --base origin/main), gpt-6.1-sol, medium effort
  • Head: 373fd2fe597d8a2546dd39054da21fc0a0a00f09
  • Findings: none

Follow-ups

  • None.

(written by Claude Opus 5.5)

🤖 Generated with Claude Code

The workflow-level concurrency group cancelled a pull request's run when a
second event for the PR arrived within seconds (a push, then a body edit).
Its `Queue` job, which waits on `build` before it skips, then reported
cancelled and failed the required check. Even without cancel-in-progress, a
group cancels a pending run, so drop the group: merge groups each have their
own ref, and a repeated dispatch only reports the same skipped context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a6e5ffd-3afa-49ba-a32d-edc6df03dbfd
Commits

Reviewing files that changed from the base of the PR and between 273ef14 and 373fd2f.

Files selected for processing: 1
  • .github/workflows/queue.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@kixelated
kixelated added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 5104634 Nov 3, 2026
10 checks passed
@kixelated
kixelated deleted the fix/queue-pr-cancel branch November 3, 2026 18:30
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