fix(ci): stop no-op label events from cancelling PR deployments - #2303
Open
Michael Flanakin (flanakin) wants to merge 1 commit into
Open
fix(ci): stop no-op label events from cancelling PR deployments#2303Michael Flanakin (flanakin) wants to merge 1 commit into
Michael Flanakin (flanakin) wants to merge 1 commit into
Conversation
The PR Deploy workflow shared one concurrency group across both its `pull_request` and `pull_request_target` triggers with `cancel-in-progress: true`. Any bot label landing while a deployment was running entered the same group and cancelled it, then skipped every job because check-options requires the label to be 'Needs: Deployment'. The PR was left with cancelled/skipped deploy jobs and no explanation. Label events that are not 'Needs: Deployment' now get a unique, throwaway group so they cancel nothing. Real deployments — every `pull_request` run and the 'Needs: Deployment' label run — stay in the shared per-PR group, so a new push still cancels an in-flight deployment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Michael Flanakin (flanakin)
requested a review
from Brett Wilson (MSBrett)
as a code owner
September 7, 2026 10:10
Copilot started reviewing on behalf of
Michael Flanakin (flanakin)
September 7, 2026 10:10
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, well-scoped to the workflow’s concurrency group, and matches the stated behavior for label-triggered no-op runs without affecting real deployment cancellation semantics.
Pull request overview
Updates the PR Deploy GitHub Actions workflow concurrency configuration so that label events which do not request deployment no longer cancel in-flight PR deployments, while preserving the desired “new push cancels prior deployment” behavior for real deployments.
Changes:
- Adds explanatory comments documenting why PR deploy runs share a concurrency group and why non-deploy label events must not.
- Adjusts
concurrency.groupso non-Needs: Deploymentpull_request_targetlabel events use a unique, per-run “noop” group (preventing cancellation of active deployments).
File summaries
| File | Description |
|---|---|
.github/workflows/ftk-pr-deploy.yml |
Refines the concurrency group expression to isolate no-op label-triggered runs so they can’t cancel real PR deployment runs. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
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.
🛠️ Description
The PR Deploy workflow shared one concurrency group across both its
pull_requestandpull_request_targettriggers, withcancel-in-progress: true:Any bot label landing while a test deployment was running entered that same group and cancelled the deployment. The label run then skipped every job, because
check-optionsrequiresgithub.event.label.name == 'Needs: Deployment'.Observed on #2291: a
pull_requestedit started deploy run34090567648at 06:22:51; a bot label startedpull_request_targetrun3409060214828 seconds later and killed it. The PR was left showing cancelled/skipped deploy jobs, which reads as "deployment not requested" rather than "deployment was killed".Fix: label events that are not
Needs: Deploymentget a unique, throwaway group, so they cancel nothing. Real deployments stay in the shared per-PR group.pull_request(opened/synchronize/edited)ftk-pr-<n>pull_request_target, label =Needs: Deploymentftk-pr-<n>pull_request_target, any other labelftk-pr-<n>-noop-<run_id>Suffixing the group with
github.event_namewas rejected as the fix: it would split allpull_request_targetruns off, so a new push would no longer cancel an in-flight fork deployment and two labels could stack concurrent deployments.Verified: the workflow YAML parses (the
Needs: Deploymentliteral requires the group value to be quoted), all 7 jobs are intact, and no other workflow uses aftk-pr-*concurrency group.Fixes #
📋 Checklist
🔬 How did you test this change?
📦 Deploy to test?
🙋♀️ Do any of the following that apply?
📑 Did you update
docs/changelog.md?📖 Did you update documentation?
🤖 Generated with Claude Code