Skip to content

Serialize changelog-file runs per PR branch - #440

Merged
theletterf merged 1 commit into
mainfrom
fix/changelog-file-concurrency-per-branch
Oct 27, 2026
Merged

theletterf merged 1 commit into
mainfrom
fix/changelog-file-concurrency-per-branch

Conversation

@theletterf

@theletterf theletterf commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

While testing #439 in the release-notes playground, opening a PR with a type label started two "Changelog file" runs on the same branch, one for opened and one for labeled. Both tried to commit. One push failed with cannot lock ref and posted the commit-failed comment, and the other run's "entry committed" comment replaced it a few seconds later. Which comment wins depends on timing.

The runs never waited for each other because the concurrency group ended with workflow_run.id, so each run had its own group. #41 added that suffix together with head_repository.full_name to stop a fork branch from cancelling an internal branch with the same name. The repository name already does that.

This drops the run ID from the group in release-notes-changelog-file.yml and changelog-submit.yml, and sets cancel-in-progress: false. Cancelling is the wrong choice here: a run cancelled after its push but before its comment job would leave the next run with nothing to commit and nothing to post. With queueing, the second run starts after the first, finds nothing new to commit, and records no decision, so it posts nothing.

Tested in docs-playground-release-notes-changelogs with the caller pointed at this branch (now back on @v1). On a labeled PR, the second run started at 09:25:58, one second after the first ended, logged "No changes to commit", and skipped the comment job. The PR got one changelog commit and one "entry committed" comment.

Related to elastic/docs-eng-team#1133

🤖 Generated with Claude Code

Opening a labeled PR starts two runs on the same branch. The run ID in
the concurrency group gave each run its own group, so both committed and
the last comment won by chance. Keep the head repository and branch, which
already stop a fork branch from sharing a group with an internal one, and
queue instead of cancel.

Related to elastic/docs-eng-team#1133

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@theletterf theletterf added the bug Something isn't working label Oct 27, 2026
@theletterf
theletterf marked this pull request as ready for review October 27, 2026 09:28
@theletterf
theletterf requested a review from a team as a code owner October 27, 2026 09:28
@theletterf
theletterf requested a review from bmorelli25 October 27, 2026 09:28
@theletterf
theletterf merged commit 2731333 into main Oct 27, 2026
6 checks passed
@theletterf
theletterf deleted the fix/changelog-file-concurrency-per-branch branch October 27, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant