fix: only retry transient I/O errors in should_retry#2235
Open
suhr25 wants to merge 3 commits intoconda:mainfrom
Open
fix: only retry transient I/O errors in should_retry#2235suhr25 wants to merge 3 commits intoconda:mainfrom
suhr25 wants to merge 3 commits intoconda:mainfrom
Conversation
Collaborator
|
Can you look at CI? |
Contributor
Author
|
Yes, found out some issues. |
1d7a2b8 to
ff19e9d
Compare
ff19e9d to
1dcaff1
Compare
rattler_index 0.27.16 is not yet published to the conda channel. Downgrade to 0.27.14 so pixi install --locked succeeds. Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
PermissionDenied and NotFound are permanent filesystem errors that will never succeed on retry. Restrict retries to genuinely transient network error kinds (BrokenPipe, ConnectionReset, UnexpectedEof, etc.) and stop retrying CouldNotCreateDestination entirely. Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
1dcaff1 to
1757a5c
Compare
…r errors Decompressors and zip readers (e.g. async_zip) surface unexpected EOF from a truncated network stream as `std::io::Error::other(...)` (kind = Other). The previous narrowing of should_retry() unintentionally stopped retrying these errors, breaking the FailAfterBytes path in test_flaky. Permanent errors like PermissionDenied and NotFound have their own explicit ErrorKind variants and are never wrapped as Other, so this addition does not reintroduce the original bug. Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
Contributor
Author
|
Hi @baszalmstra, |
Contributor
Author
|
Hi @baszalmstra, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improve
ExtractError::should_retry()to only retry transient I/O errors. Currently, permanent errors likePermissionDeniedandNotFoundare retried, causing slow failures and confusing logs during installs. This change makes it fail fast and resolves the existing TODO.Fixes
Retries are now limited to transient errors (e.g.
ConnectionReset,TimedOut), while permanent errors likePermissionDenied,NotFound, andCouldNotCreateDestinationno longer retry, reducing delays and improving error clarity.How Has This Been Tested?
Tests were updated to reflect the new behavior. Also verified manually with a read-only directory, which now fails immediately without retries.
AI Disclosure
Tools: ChatGPT, Claude
Checklist