-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Apply concurrency for GHA workflow pull_requests
events only
#1544
Apply concurrency for GHA workflow pull_requests
events only
#1544
Conversation
The following are included as keys to the group. `${{ github.head_ref || github.run_id }}` This allows concurrency to work only with Push to PullRequest, and cancels all but the most recent push for successive pushes; for merge commits, in other words push events, `${{ github.run_id }}` is used, so The cancellation is not enforced because it is always a unique group.
860e358
to
306ff21
Compare
pull_requests
envents only
pull_requests
envents onlypull_requests
events only
Same as: rubocop/rubocop-rspec#1544 rubocop/rubocop#11414 The following are included as keys to the group. `${{ github.head_ref || github.run_id }}` This allows concurrency to work only with Push to PullRequest, and cancels all but the most recent push for successive pushes; for merge commits, in other words push events, `${{ github.run_id }}` is used, so The cancellation is not enforced because it is always a unique group. This eliminates the problem of consecutive Pushes being cancelled at the time of release. ![release](https://user-images.githubusercontent.com/13041216/211700533-cb01c051-dc8d-4889-8276-327c96bf4755.png)
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.
Thanks for the explanation and this follow-up!
Same as: rubocop/rubocop-rspec#1544 rubocop/rubocop#11414 The following are included as keys to the group. `${{ github.head_ref || github.run_id }}` This allows concurrency to work only with Push to PullRequest, and cancels all but the most recent push for successive pushes; for merge commits, in other words push events, `${{ github.run_id }}` is used, so The cancellation is not enforced because it is always a unique group. This eliminates the problem of consecutive Pushes being cancelled at the time of release. ![release](https://user-images.githubusercontent.com/13041216/211700533-cb01c051-dc8d-4889-8276-327c96bf4755.png)
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.
It does seem rather complicated. Wouldn’t it be easier to remove group
and cancel-in-progress: true
?
Perhaps, A appears to be a required parameter. Also, removing In addition, the approach implemented in this PR is the approach described in the GitHub documentation. |
Probably I don’t understand which problem this PR solves. If |
For example, if you continuously push to PullRequest, or if you continuously take in Suggest Changes, you will probably have several jobs running. However, since there is a limit to the number of concurrent actions that can be executed, sometimes a job will become pending in the queue, waiting for the last CI that was pushed last to be successfully executed. For more information about the upper limit on the number of actions, please refer to the following page: Therefore, my motivation is to reduce this waiting time and to cancel the execution of GHA workflows that are unnecessary in the first place. |
When there is more than one running build for the same PR branch. Our builds run quickly, it wouldn't be such a big deal for us. But the limit is per-account, i.e. per
This change is to minimize build queuing across |
The following are included as keys to the group.
${{ github.head_ref || github.run_id }}
This allows concurrency to work only with Push to PullRequest, and cancels all but the most recent push for successive pushes; for merge commits, in other words push events,
${{ github.run_id }}
is used, so The cancellation is not enforced because it is always a unique group.This eliminates the problem of consecutive Pushes being cancelled at the time of release.
Before submitting the PR make sure the following are checked:
master
(if not - rebase it).CHANGELOG.md
if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).