-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
The flag experimental_repository_downloader_retries
doesn't retry except in the case of truncated downloads
#24530
Comments
…ception Fix for bazelbuild#24530 --experimental_repository_downloader_retries will now retry on `SocketException` in addition to `ContentLengthMismatchException` Closes bazelbuild#24608. PiperOrigin-RevId: 704633572 Change-Id: Idd1fcbb768c9dabed596fe15d8ae9260ef3e895d
…SocketException (#24722) Fix for #24530 --experimental_repository_downloader_retries will now retry on `SocketException` in addition to `ContentLengthMismatchException` Closes #24608. PiperOrigin-RevId: 704633572 Change-Id: Idd1fcbb768c9dabed596fe15d8ae9260ef3e895d Commit 459bb57 Co-authored-by: Pareesh Madan <[email protected]>
…ception Fix for bazelbuild#24530 --experimental_repository_downloader_retries will now retry on `SocketException` in addition to `ContentLengthMismatchException` Closes bazelbuild#24608. PiperOrigin-RevId: 704633572 Change-Id: Idd1fcbb768c9dabed596fe15d8ae9260ef3e895d
Should be fixed by #24608 |
…SocketException (#24969) Fix for #24530 --experimental_repository_downloader_retries will now retry on `SocketException` in addition to `ContentLengthMismatchException` Closes #24608. PiperOrigin-RevId: 704633572 Change-Id: Idd1fcbb768c9dabed596fe15d8ae9260ef3e895d Commit 459bb57 Co-authored-by: Pareesh Madan <[email protected]>
A fix for this issue has been included in Bazel 7.5.0 RC2. Please test out the release candidate and report any issues as soon as possible. |
A fix for this issue has been included in Bazel 8.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. |
Description of the bug:
We tried using
experimental_repository_downloader_retries
to mitigate the impact of intermittent connection resets but observed that, even though it is documented with "The maximum number of attempts to retry a download error", Bazel won't retry repository downloads in case it gets a connection reset in the middle of the download:Looking at the code, we see that retries after the connection is established are exclusive for cases of
ContentLengthMismatchException
:bazel/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
Lines 355 to 371 in e0738ff
While the flag was created to handle truncated downloads (#13957), due to its naming and docs, we have been using it with the expectation that retries would also mitigate intermittent download failures caused by connection resets and read timeouts.
It seems reasonable to also retry if the suppressed exception is a
SocketException
, but I could be missing something.Which category does this issue belong to?
External Dependency
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run Bazel without a repository cache downloading from a source which sends connection resets in the middle of the download. Perhaps iptable could be used to simulate that, but I haven't figured out a good setup for it.
Which operating system are you running Bazel on?
Rocky 9
What is the output of
bazel info release
?release 7.4.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: