Repository navigation
ci: remove running CI for superseded commits - #8213
Conversation
Thanks for opening this pull request!
|
|
As a POC you can see these workflow were both cancelled automatically as a new commit was created https://github.com/parse-community/parse-server/actions/runs/3196813578 |
Codecov ReportBase: 93.61% // Head: 94.13% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## alpha #8213 +/- ##
==========================================
+ Coverage 93.61% 94.13% +0.51%
==========================================
Files 182 182
Lines 13771 13771
==========================================
+ Hits 12892 12963 +71
+ Misses 879 808 -71
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Amazing, I wanted to look into that for months and here is the fix - very nice! This should be added to every CI workflow in our 6 major repos. This is only within the workflow scope, right? So this setting doesn't change the behavior of any other workflows. |
|
GitHub actions will cancel any running test that has the same |
|
Could you restrict this on a branch + workflow name basis? Otherwise this logic may interfere with other workflows that run on the same branch should they implement a similar logic. Maybe there is something in the context docs that can be used. |
|
I tried |
|
Could this be a bug or the reference incorrect? Because name should always have a value:
You could also look into the env vars, maybe GITHUB_ACTION or GITHUB_ACTION_REPOSITORY? |
Could you give an example for what the output should be? With actor + branch, the concurrency key is "dblythy-concurrent", meaning any other action with the concurrency key of "dblythy-concurrent" is cancelled as well |
|
I think the output should be the specific workflow. We want to avoid that one workflow cancels another workflow if someone in the future just copy/pastes the cancellation logic. For example: we have |
|
I think concurrency only exists across the whole workflow, I’m not sure you can specify it at a per job basis |
1 similar comment
|
I think concurrency only exists across the whole workflow, I’m not sure you can specify it at a per job basis |
|
With "job" I meant "workflow", sorry for the confusion. We'd want to make sure that this cancellation logic is only considered for the specific workflow; if that is always the case anyway and a workflow cannot cancel another workflow, then we are good. if not, maybe you could open a support ticket with GitHub and ask how to do that. |
|
@Moumouls You approved this even though there is an ongoing discussion - what is your opinion regarding the issue? |
|
I think this section in the docs addresses the issue I was referring to:
And they provide a solution:
Could we try that? It would be interesting to see the output of |
|
The workflow gets canceled with:
This looks good, so it's on a per workflow per PR basis. What do you think? |
|
Nice find! Sounds good to me |
|
🎉 This change has been released in version 5.3.0-alpha.32 |
|
🎉 This change has been released in version 5.4.0-beta.1 |
|
🎉 This change has been released in version 5.4.0-alpha.1 |
|
🎉 This change has been released in version 5.4.0 |
|
🎉 This change has been released in version 5.4.0 |
New Pull Request Checklist
Issue Description
Currently, workflows continue to run even after new pushes have been commited. This can be more efficient and can save workflow billing
Related issue: n/a
Approach
Uses concurrency to cancel existing runs
TODOs before merging