Skip to content

build: retry git clones a few times when they fail - #5488

Open
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-retryclone
Open

lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-retryclone

Conversation

@lgritz

@lgritz lgritz commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

I'm pretty fed up with GitHub's reliability. Sometimes a clone just fails, their uptime has been spotty lately. Using our dependency auto-build feature for more packages, more frequently in CI, the opportunities for spurious failures have grown enough that it seems like every CI workflow (with 29 job variants these days) has a good chance of at least one job variant failing. That's a lot of noise in what's supposed to be a reliable signal about whether the PR passes or fails the testsuite on its own merits. I'm constantly poking "rerun failed jobs" on people's PRs for no good reason, and having trouble separating which are temporary GitHub failures from which PRs are actually broken.

So here is me being a little desperate -- I'm adding a CMake function execute_process_with_retry, that we use with the git clone of dependencies to try up to 5 times before a full failure. After the first failure, it waits 15 seconds. The delay doubles with each failure. If all attempts fail, it's a full job failure. Hopefully, any spurious GitHub clone unavailability that lasts less than a few minutes will just be glossed over and let us complete CI, at the cost of perhaps a minute or two delay, which seems like a small price to pay.

Assisted by: Claude Code / claude-opus-5

I'm pretty fed up with GitHub's reliability. Sometimes a clone just
fails, their uptime has been spotty lately.  Using our dependency
auto-build feature for more packages, more frequently in CI, the
opportunities for spurious failures have grown enough that it seems
like every CI workflow (with 29 job variants these days) has a good
chance of at least one job variant failing. That's a lot of noise in
what's supposed to be a reliable signal about whether the PR passes or
fails the testsuite on its own merits.

So here is me being a little desperte -- I'm adding a CMake function
execute_process_with_retry, that we use with the git clone of
dependencies to try up to 5 times before a full failure. After the
first failure, it waits 15 seconds. The delay doubles with each
failure. If all attempts fail, it's a full job failure. Hopefully, any
spurious GitHub clone unavailability that lasts less than a few
minutes will just be glossed over and let us complete CI, at the cost
of perhaps a minute or two delay, which seems like a small price to
pay.

Assisted by: Claude Code / claude-opus-5

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant