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

Cancel previous builds within the same PR on push #2614

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

npaun
Copy link
Member

@npaun npaun commented Aug 27, 2024

What this does:

  • Makes the test workflow responsible for triggering fixup, labels and lint.
  • Cancels the entire workflow if another commit is pushed to the same PR
  • Allows all other builds to run through.

This should cut down on the number of runners in use, and lead to less wait time for builds.

@npaun npaun requested review from a team as code owners August 27, 2024 18:21
@npaun npaun force-pushed the npaun/concurrency-groups branch 3 times, most recently from f7afc9e to 839cf93 Compare August 27, 2024 18:26
@danlapid
Copy link
Contributor

I like the idea but we need to make sure we aren't reducing our concurrency at all
I don't want a full CI run to be synchronous now.
I think we just want it to be auto cancelled
You don't need the workflow for that, simply set the group to include ${{ github.workflow }} and they'll be fine.
Other than that we still need to make sure matrix jobs have different groups from each other
That might need to happen at the .concurrency.group level though.

@npaun
Copy link
Member Author

npaun commented Aug 27, 2024

This won't reduce our concurrency; the jobs still run in parallel. The advantage of the reusable workflow, where I was able to do to that, is just that I don't need to copy paste the concurrency group name into each workflow.

@npaun
Copy link
Member Author

npaun commented Aug 27, 2024

Screenshot 2024-08-27 at 12 25 35 PM

Just to be sure I grabbed this screenshot of a bunch of jobs running at once.

@npaun npaun merged commit b1c6165 into main Aug 27, 2024
13 checks passed
@npaun npaun deleted the npaun/concurrency-groups branch August 27, 2024 19:31
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