Repository navigation
ci: fix release-labels sync for drafts and cross-PR run cancellation - #29329
Merged
Merged
Conversation
The release-labels job skipped draft PRs, so a label added or a title edited whilst in draft was never synced. The ready_for_review branch only reconciled title to label, not label to title, so PRs like #29207 kept the release/breaking label with no ! in the title. Remove the draft skip so events sync as they happen. Keep a two-way reconciliation on opened, reopened and ready_for_review as a checkpoint for runs cancelled by the concurrency group.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Removing the draft skip already syncs labeled and edited events as they happen, so the label to title checkpoint on ready_for_review is not needed for the draft case.
On pull_request_target, github.ref is the base branch, so every PR into main shared the single group pr-refs/heads/main, along with every issue_comment run. GitHub keeps one running and one pending run per group and cancels the rest, so labeled and edited events across unrelated PRs were dropped. Key the group on the PR number so ordering is per PR as intended.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
matifali
approved these changes
Sep 15, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The
release-labelsjob skips draft PRs, so when therelease/breakinglabel was added to #29207 whilst it was a draft, nothing happened. When it was marked ready for review, theready_for_reviewbranch only checked for a!in the title without the label, not the other way around, so the job just logged the mismatch and exited successfully:https://github.com/coder/coder/actions/runs/34917703558
This is the third patch around the draft skip (#14667, #16616), and I couldn't find a reason for it; it was a review suggestion on #5724 with no rationale given. The script only reacts to explicit
labeled,unlabeledandeditedevents, so running it on drafts just syncs at the time of the action, when the intent is unambiguous. So, we'll just remove the skip.Whilst looking at this I noticed the workflow's
concurrencygroup ispr-${{ github.ref }}, but onpull_request_targetgithub.refis the base branch, so every PR intomain(and everyissue_commentrun) shares one group. GitHub keeps one running and one pending run per group and cancels the rest. At 01:32:04 on the 11th, nine of elevencontribruns across six unrelated PRs were cancelled, and anylabeledoreditedevent that lands in a cancelled run is lost for good. The fix is just to key the group on the PR number, which is what the comment above it claims it does.#29251 and #28178 were merged with the label but no
!for the same reason. Since this is apull_request_targetworkflow, none of this takes effect until it's onmain.