Skip to content

ci: fix release-labels sync for drafts and cross-PR run cancellation - #29329

Merged
ethanndickson merged 3 commits into
mainfrom
ci-pr-labels-jqsr
Sep 16, 2026
Merged

ethanndickson merged 3 commits into
mainfrom
ci-pr-labels-jqsr

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

The release-labels job skips draft PRs, so when the release/breaking label was added to #29207 whilst it was a draft, nothing happened. When it was marked ready for review, the ready_for_review branch 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

Action: ready_for_review
Title: fix: authenticate confidential clients on the OAuth2 refresh grant
Labels: release/breaking

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, unlabeled and edited events, 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 concurrency group is pr-${{ github.ref }}, but on pull_request_target github.ref is the base branch, so every PR into main (and every issue_comment run) 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 eleven contrib runs across six unrelated PRs were cancelled, and any labeled or edited event 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 a pull_request_target workflow, none of this takes effect until it's on main.

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.
@ethanndickson
ethanndickson marked this pull request as ready for review September 15, 2026 02:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-15T03:00:45.567976Z 524638d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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.
@ethanndickson ethanndickson changed the title ci: sync the release/breaking label and title on draft PRs ci: run release-labels on drafts and key contrib concurrency by PR Sep 15, 2026
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 524638d959

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@ethanndickson ethanndickson changed the title ci: run release-labels on drafts and key contrib concurrency by PR ci: fix release-labels sync for drafts and cross-PR run cancellation Sep 15, 2026
@ethanndickson
ethanndickson merged commit 965c961 into main Sep 16, 2026
36 checks passed
@ethanndickson
ethanndickson deleted the ci-pr-labels-jqsr branch September 16, 2026 01:59
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants