-
Notifications
You must be signed in to change notification settings - Fork 31
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(ci): prevent workflow cancellation due to multiple concurrent merges #3274
fix(ci): prevent workflow cancellation due to multiple concurrent merges #3274
Conversation
c5933d3
to
3a9d403
Compare
3a9d403
to
16bab6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 12 files at r1, all commit messages.
Reviewable status: 1 of 12 files reviewed, 2 unresolved discussions (waiting on @adi-yakovian-starkware and @alon-dotan-starkware)
.github/workflows/blockifier_ci.yml
line 42 at r1 (raw file):
# On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
where is the job
identifier now?
if it's not part of the concurrency group then the entire workflow will be cancelled even if only one job is re-run
Code quote:
github.job
.github/workflows/blockifier_ci.yml
line 46 at r1 (raw file):
${{ github.workflow }}- ${{ github.ref }}- ${{ github.event_name == 'pull_request' && 'PR' || github.sha }}
what does this do, exactly?
Code quote:
${{ github.event_name == 'pull_request' && 'PR' || github.sha }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 12 files reviewed, 2 unresolved discussions (waiting on @alon-dotan-starkware and @dorimedini-starkware)
.github/workflows/blockifier_ci.yml
line 42 at r1 (raw file):
Previously, dorimedini-starkware wrote…
where is the
job
identifier now?
if it's not part of the concurrency group then the entire workflow will be cancelled even if only one job is re-run
The job
identifier didn't mean anything, as the concurrency block is defined in the workflow context and not per job.
I we'd like to use the job
identifier for real, then we need to copy the concurrency block to each relevant job.
It makes sense to me, but I think it should be done in a different PR as such change is somewhat unrelated.
.github/workflows/blockifier_ci.yml
line 46 at r1 (raw file):
Previously, dorimedini-starkware wrote…
what does this do, exactly?
if the event is PR, then it is equal to the string PR
and otherwise it equals the tip commit sha.
Examples from yesterday's runs:
- A concurrency group of this PR:
Blockifier-CI-2-refs/pull/3274/merge-PR
. - A concurrency group for this branch (push event):
Blockifier-CI-2-refs/heads/adi/ci/fix-merges-concurrency-3a9d403c4a5c56349f03080c8048ec1e513d2aaa
.
This means that all runs that are triggered by a PR event belong to the same group, so a PR re-run cancels an in-progress run.
However, each push event necessarily belongs to a new concurrency group, as its commit is unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 11 of 12 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @alon-dotan-starkware)
No description provided.