-
Notifications
You must be signed in to change notification settings - Fork 91
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
Only run one full sync on main at a time #4977
Comments
What should be an expected scenario with 10 PRs waiting to be merged?
|
The goals are:
It is ok to occasionally have two syncs running, if it turns out that is hard to avoid. Also remember that the GitHub trigger is per-push, not per-PR. Mergify might have batched some of the PRs, there's no need to test every PR/commit in a batch push.
The exact implementation doesn't really matter - either of those implementations would be ok. But it seems like GitHub has exactly the implementation we want: If a concurrent job is running:
The check must be automated. When we've made checks manual in the past, people forget to do them. |
Previous behavior: Multiple Mainnet full syncs were able to run on the main branch at the same time, and pushing multiple commits to the same branch would run multiple CI workflows, when only the run from last commit was relevant Expected behavior: Ensure that only a single CI workflow runs at the same time in PRs. The latest commit should cancel any previous running workflows from the same PR. Solution: Use GitHub actions concurrency feature https://docs.github.com/en/actions/using-jobs/using-concurrency Fixes #4977 Fixes #4857
* ci(concurrency)!: run a single CI workflow as required Previous behavior: Multiple Mainnet full syncs were able to run on the main branch at the same time, and pushing multiple commits to the same branch would run multiple CI workflows, when only the run from last commit was relevant Expected behavior: Ensure that only a single CI workflow runs at the same time in PRs. The latest commit should cancel any previous running workflows from the same PR. Solution: Use GitHub actions concurrency feature https://docs.github.com/en/actions/using-jobs/using-concurrency Fixes #4977 Fixes #4857 * docs: typo * ci(concurrency): do not cancel running full syncs Co-authored-by: teor <teor@riseup.net> * fix(concurrency): explain the behavior better & add new ones Co-authored-by: teor <teor@riseup.net>
Motivation
There isn't much point in running multiple Mainnet full syncs on the
main
branch at the same time.It slows down the Zcash network, costs the Foundation more money, and it doesn't provide much more diagnostic information.
Designs
We could skip or cancel full syncs if there is already one running on
main
.(But still run all the dependent jobs, if possible.)
We don't want to just limit the concurrency of jobs running on
main
, because that could queue up days worth of jobs onmain
.The text was updated successfully, but these errors were encountered: