Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid executing
contracts-docs-publish
parallelly
As triggers for the `Publish contracts documentation` jobs in the workflows generating Random Beacon and ECDSA API docs are the same (and also the previously executed steps are very similar, it's likely that the both jobs will start and the same or very similar time. When that happens it's very likely that the both jobs will pull the `auto-update-solidity-api-docs` branch at the same state and one of the jobs will push a commit with updated docs, while the other won't be able to do that, as the state of the branch will be different than when the pull happened. The error we see in that case is following: ``` error: failed to push some refs to 'https://github.com/threshold-network/threshold.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. ``` To avoid such situations we add a 4 minutes wait before we execute the 'Publish contracts documentation' job in ECDSA workflow. This should be more than enught for the Random Beacon's `Publish contracts documentation` to finish. There is still a small change that both `Publish contracts documentation` jobs will run at similar time (if something slows down the execution of the Random Beacon workflow) and cause a failure of one of them, but in that unlikely scenario, we can always rerun the failing job and it should pass on that second run.
- Loading branch information