Closed
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
There are 2 perspectives when it comes to CI compute time optimization:
- a) Reducing the individual workflow job time, e.g. reducing the timeouts in tests
- b) Reducing the overall compute time, e.g. the total compute time consumed by the Parse Organization
Currently, (b) is the sum of all (a), but it don't have to be. The compute time (b) could be significantly reduced by cancelling any currently running workflow jobs (a) from previous commits when a new job started because of a new commit, on a per-branch basis. Looking at the workflow logs, I'd estimate a compute time reduction around 50-70%.
Feature / Enhancement Description
Add workflow job trigger to cancel any currently running jobs of previous commit of the same branch of the same workflow.
That should only apply to CI workflows to run tests, not to release-related workflows.
Example Use Case
- Open PR
- Make commit
1
-> workflow runs tests for commit1
- Make commit
2
-> workflow runs tests for commit2
- Cancel job for commit
1
as it's superseded by job for commit2
Alternatives / Workarounds
- Manually cancel the workflow run
- Ignore and accept the wasted compute time