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

Reduce CI compute time by cancelling obsolete workflow jobs #7672

Closed
3 tasks done
mtrezza opened this issue Oct 31, 2021 · 2 comments
Closed
3 tasks done

Reduce CI compute time by cancelling obsolete workflow jobs #7672

mtrezza opened this issue Oct 31, 2021 · 2 comments
Labels
type:ci CI related issue

Comments

@mtrezza
Copy link
Member

mtrezza commented Oct 31, 2021

New Feature / Enhancement Checklist

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

  1. Open PR
  2. Make commit 1 -> workflow runs tests for commit 1
  3. Make commit 2 -> workflow runs tests for commit 2
  4. Cancel job for commit 1 as it's superseded by job for commit 2

Alternatives / Workarounds

  • Manually cancel the workflow run
  • Ignore and accept the wasted compute time
@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 31, 2021

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza added the type:ci CI related issue label Oct 31, 2021
@dplewis
Copy link
Member

dplewis commented Jul 18, 2024

Completed via #8213

@dplewis dplewis closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:ci CI related issue
Projects
None yet
Development

No branches or pull requests

2 participants