Skip to content

Conversation

tgross35
Copy link
Contributor

When multiple merges to master happen before a CI run completes, the in-progress job is getting canceled. Fix this by using the commit sha for the group key if a pull request number is not available, rather than github.ref (which is always refs/head/master after merge). This should prevent jobs running on previous commits from getting cancelled, while still ensuring there is only ever one active run per pull request.

When multiple merges to `master` happen before a CI run completes, the
in-progress job is getting canceled. Fix this by using the commit sha
for the group key if a pull request number is not available, rather than
`github.ref` (which is always `refs/head/master` after merge). This
should prevent jobs running on previous commits from getting cancelled,
while still ensuring there is only ever one active run per pull request.
@tgross35 tgross35 marked this pull request as ready for review May 29, 2025 19:05
@tgross35 tgross35 merged commit 11cf244 into rust-lang:master May 29, 2025
35 checks passed
@tgross35 tgross35 deleted the ci-fix-concurrency branch May 29, 2025 19:16
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