chore(ci): add in cancellations for concurrent builds of the same branch #17915
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.
I'd love to get others opinions on this.
This PR introduces a change to the CI that we use in Metals that has
really come in handy. The problem that this attempts to address is that
sometimes during the day the Dotty CI gets really backed up. Many times
when you look at why this is, it's because sometimes people push their
branch 2 or 3 times shortly after one another will small changes. This
then adds 3 full runs to CI when the vast majority of the time, the
latest one is the one they actually care about. What this change does is
cancels the previous one to run the latest. This only does this on
PRs, not on the main branch.
EDIT:
Following the meeting I added in the ability to include a
[no cancel]
to your PR body. When this is included concurrent builds will be allowed.