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
Retry git fetch operations #9820
Comments
Hi, @alexcrichton, I was looking at the related code in this repo here: cargo/src/cargo/sources/git/utils.rs Lines 812 to 820 in c227565
So we've been using the git CLI all the time for I am going to override our I am looking at |
The test for whether an error is a spurious network error is located at cargo/src/cargo/util/network.rs Lines 36 to 67 in c227565
fetch_with_cli or something like that to know what to inspect, and otherwise detection of whether or not it's a spurious error also needs to be implemented.
|
Describe the problem you are trying to solve
The problem here is that since
git fetch
operation is a network operation it may suddenly fail due to temporary connectivity issues.Cargo already has
CARGO_NET_RETRY
configuration for network retries, however, it seems that this one is not applied togit fetch
operations.Describe the solution you'd like
I suggest that
CARGO_NET_RETRY
is taken into account when runninggit fetch
andgit fetch
does get retried with the maximum retries specified inCARGO_NET_RETRY
config value[UPD]
The cargo config we are using does have
net.git-fetch-with-cli
parameter set totrue
Notes
The issue with
git fetch
thatcargo
does regularly arises in our CI system with different errors likeFailed to connect to github.com port 443: Timed out
.The text was updated successfully, but these errors were encountered: