Skip to content

ci: Cancel stale merge-queue runs when the queue rebuilds a PR's group #974

Closed

Description

@zackees

When the merge queue rebuilds an entry (another entry fails or the base moves), GitHub starts a new merge_group run on a new gh-readonly-queue/master/pr-<N>-<sha> ref, but the old run for the same PR keeps going. pr-pull.yaml has concurrency: group: '${{ github.workflow }} @ ${{ ...github.ref }}', and the ref is unique per attempt, so nothing cancels the superseded run.

Seen on 2026-10-16 around 02:30 UTC: four merge_group runs were live for two queue entries (#934 x3, #936 x1) while about 10 PR runs sat queued for runners. I cancelled 38839685361 and 38839594604 by hand.

Options:

  1. Key merge_group concurrency on the PR number. Expressions can't split the ref, so a small first job would need to compute the group, or a separate merge_group workflow would compute it and call build-project.yaml.
  2. Add a cheap first job that checks the queue (GraphQL mergeQueue.entries) and cancels the run if its head_sha is no longer an entry's head.
  3. Leave it and rely on build: Link Windows-MSVC and macOS Rust targets on Linux (soldr LLVM bundle needs host libxml2.so.2) #695 and ci: Move per-PR native macOS/Windows jobs to post-merge once cross lanes link and run #698 to cut runner pressure.

Option 2 needs no new workflow file.

Activity

  1. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Fixed by #988 (Cancel Superseded Queue Runs 🧹 in pr-pull.yaml). #980 was a duplicate and is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions