Repository navigation
fix(ci): cancel superseded external CI runs - #25896
Draft
iAmMichaelConnor wants to merge 1 commit into
Draft
iAmMichaelConnor wants to merge 1 commit into
iAmMichaelConnor wants to merge 1 commit into
Conversation
ci3-external.yml put runs for the same fork branch in one concurrency group only when the event was `pull_request`, but it runs on `pull_request_target`. Every run fell through to its own run_id group, so a new push to a fork PR never cancelled the run it superseded. Group by pull request number for pull_request_target events. A label event that cannot start CI (any label other than ci-external-once, on a PR without ci-external) keeps a group of its own, so it cannot cancel a run a maintainer approved with ci-external-once. merge_group runs keep their own group as before.
iAmMichaelConnor
force-pushed
the
mike/ci-external-concurrency
branch
from
November 24, 2026 20:02
5b9a345 to
10dd9dc
Compare
This was referenced Nov 24, 2026
This branch has not been deployed
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.
Merge order
Merge after #25895 and #25894, ideally also after aztec-labs-eng/ci3#28 and the ci3 pin bump. This PR makes superseded external runs get cancelled, and both of those must be in place first:
Problem
ci3-external.yml(CI for pull requests from forks) is meant to allow one run per fork branch:But the workflow runs on
pull_request_targetand never onpull_request, so the test is always false. Every run lands in its ownrun_idgroup, andcancel-in-progressnever applies. What happens to a superseded run depends on its instance name:Change
pull_request_targetevents. A new run cancels the one it supersedes, the same as inci3.yml(which groups by<pr>/merge). Keying by PR number rather than fork and branch also covers a fork branch with PRs into two bases, and a deleted fork.ci-external-once, on a PR withoutci-external; External Contributor Checks fails those runs. Without this, adding an unrelated label while a maintainer'sci-external-oncerun is in progress would cancel the approved run and replace it with a failure. (A label added after that run has finished still starts a run that fails External Contributor Checks, as it does today, and as the newestci-externalresult that failure replaces the earlier pass.)run_idgroup, as before.Testing
No CI was run; this is a draft. To check after merging, on a fork PR:
ci-externalon the PR, and confirm the first run is cancelled;ci-external-once, then an unrelated label while that run is going, and confirm the approved run carries on.