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 in-progress CI jobs for the same branch #1329

Conversation

JeanChristopheMorinPerso
Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Jun 18, 2022

This PR adds a concurrency group to the builds so that only one build for a branch can run at the same time. When pushing a new commit on a branch and a job is already running on that branch, the build will be cancelled to allow to build the new commit.

That's becoming more important now that we have DCO in place. It's quite easy to forget to sign-off a commit and have to rebase commits. That would trigger "useless" builds.

This PR fixes that problem.

The concurrency group is per workflow + branch WHIch means builds on other branches won't be affected.

As an example, I initially pushed without signing my commit, then had to sign + push again. That triggered two builds. The first one (https://github.com/AcademySoftwareFoundation/OpenTimelineIO/actions/runs/2521514987) as automatically cancelled and it says Canceling since a higher priority waiting request for 'OpenTimelineIO-refs/pull/1329/merge' exists. The second build won't have to wait as long as before to get runners.

@codecov-commenter
Copy link

Codecov Report

Merging #1329 (7a0c79d) into main (d9f3e4d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1329   +/-   ##
=======================================
  Coverage   86.20%   86.20%           
=======================================
  Files         196      196           
  Lines       19839    19839           
  Branches     2317     2317           
=======================================
  Hits        17103    17103           
  Misses       2170     2170           
  Partials      566      566           
Flag Coverage Δ
py-unittests 86.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9f3e4d...7a0c79d. Read the comment docs.

Copy link
Collaborator

@jminor jminor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very helpful - thanks!

@jminor jminor merged commit 7bb083b into AcademySoftwareFoundation:main Jul 8, 2022
@JeanChristopheMorinPerso JeanChristopheMorinPerso deleted the cancel_inprogress_runs branch July 8, 2022 01:46
@ssteinbach ssteinbach added this to the Public Beta 15 milestone Sep 19, 2022
MichaelPlug pushed a commit to MichaelPlug/OpenTimelineIO that referenced this pull request Aug 5, 2023
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.

4 participants