-
Notifications
You must be signed in to change notification settings - Fork 31
Only cancel in progress workflow runs for pull requests #634
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #634 +/- ##
=======================================
Coverage 78.69% 78.69%
=======================================
Files 9 9
Lines 3835 3835
=======================================
Hits 3018 3018
Misses 817 817 🚀 New features to boost your workflow:
|
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.
LGTM!
Context: @mcbarton said:
@Vipul-Cariappa said:
|
Why do we want this? I don't know the pros of this PR. But the cons are severe. |
@Vipul-Cariappa You will need to make your case to @vgvassilev if you do not have this in. He opened up it up as a bug (see #597). I provided a fix, but gave a warning about the consequences. It is not possible to merge all commits of a PR, but only run the workflow for the most recent one. Currently if you merge 2 PR into main, before the workflow has finished running for the first one, then the workflow run will get cancelled for the first PR. That is all I will say on the matter. |
Ok, I understand the purpose. Points to note: (let me know if I am wrong)
|
The way I understand this feature is that it allows us to cancel the current pr build when a new push to the same pr was done but it won’t cancel builds after something was merged. I did something similar in clad. |
It probably needs to be done like this: |
@vgvassilev The way the feature works, is that if two workflows share the same group, when cancel-in-progress is set to true, then it will cancel the older workflow run. The bug that this PR fixes exists in clad too. e.g. |
What’s the fix for this. How does that work in root? |
Looking at root, they don't seem to have the bug, and the workflow run is only for the latest commit of PR when its merged in. This is what they have defined for the group https://github.com/root-project/root/blob/2a6eaa17d8cdb82ea548d1c45deedf2759260b90/.github/workflows/root-ci.yml#L77 . Can't say I understand how that fixes the bug, but we can try it out. Before I make this change to the PR, I will take a closer look at roots ci, to check nothing else is at play to make this happen. |
Description
Please include a summary of changes, motivation and context for this PR.
Fixes # (issue)
Fixes #597
Type of change
Please tick all options which are relevant.
Testing
Please describe the test(s) that you added and ran to verify your changes.
Checklist