Repository navigation
Serialize changelog-file runs per PR branch - #440
Merged
Merged
Conversation
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]>
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.
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
openedand one forlabeled. Both tried to commit. One push failed withcannot lock refand 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 withhead_repository.full_nameto 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.ymlandchangelog-submit.yml, and setscancel-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