example-package icon indicating copy to clipboard operation
example-package copied to clipboard

Stagger `schedule` triggers so that there is less contention on pushes

Open ianlewis opened this issue 1 year ago • 0 comments

Bootstrap scripts often have race conditions where two runs push changes to the repo at the same time causing the push to fail. e2e-bootstrap.sh implements retries to help alleviate the issue but it would be good to stagger the schedule triggers by a few minutes to further help with the problem.

The error shows up in logs like the following:

To https://github.com/slsa-framework/example-package.git
 ! [rejected]          main -> main (fetch first)
error: failed to push some refs to 'https://github.com/slsa-framework/example-package.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

ianlewis avatar Feb 27 '24 00:02 ianlewis