Skip to content

Commit 1e96635

Browse files
Fix race condition with version bump action (#18150) (#18151)
When handling multiple releases on the same schedule it is common to kick off this action across multiple branches. Using *only* the time for a branch name to create a PR for to update lock file results in a race condition where a target branch can conflict. In order to fix this we now include the target branch (logstash stream) in the branch name to raise the PR from. (cherry picked from commit 556366d) Co-authored-by: Cas Donoghue <[email protected]>
1 parent 4b28b3c commit 1e96635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/version_bumps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- run: ./vendor/jruby/bin/jruby -S bundle update --all --${{ github.event.inputs.bump }} --strict
4848
- run: mv Gemfile.lock Gemfile.jruby-*.lock.release
4949
- run: echo "T=$(date +%s)" >> $GITHUB_ENV
50-
- run: echo "BRANCH=update_lock_${T}" >> $GITHUB_ENV
50+
- run: echo "BRANCH=update_lock_${{ env.INPUTS_BRANCH }}_${T}" >> $GITHUB_ENV
5151
- run: |
5252
git checkout -b $BRANCH
5353
git add .

0 commit comments

Comments
 (0)