Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: race condition in goreleaser workflow #15233

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

erikburt
Copy link
Collaborator

Changes

  • Use the github.sha rather than github.ref during goreleaser build/merges to fix race condition

Motivation

On a push event:

  1. Goreleaser workflow is triggered
  2. split job is done first:
    1. This builds all amd64 and arm64 images through a build matrix
  3. Then the merge job is waiting for split to finish
    1. merge checks out the repo at github.ref

If there was a push to develop in between the initial dispatch and the merge starting, the expected SHA will differ, and the version check will fail.


RE-3215

@erikburt erikburt self-assigned this Nov 13, 2024
@erikburt erikburt requested review from a team as code owners November 13, 2024 21:09
@erikburt
Copy link
Collaborator Author

Other solution is to set a concurrency group and cancel in-progress runs if a new commit has been pushed. Thoughts?

@chainchad
Copy link
Collaborator

Looks good, nice find!

@erikburt erikburt requested a review from chainchad November 13, 2024 21:22
@erikburt erikburt enabled auto-merge November 13, 2024 21:30
@erikburt erikburt added this pull request to the merge queue Nov 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 13, 2024
@erikburt erikburt added this pull request to the merge queue Nov 13, 2024
Merged via the queue into develop with commit f9f9079 Nov 13, 2024
89 of 90 checks passed
@erikburt erikburt deleted the fix/goreleaser-merge-race-condition branch November 13, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants