Skip to content

fix: only retry transient I/O errors in should_retry()#2317

Open
ritankarsaha wants to merge 1 commit intoconda:mainfrom
ritankarsaha:fix/should-retry-transient-io-errors
Open

fix: only retry transient I/O errors in should_retry()#2317
ritankarsaha wants to merge 1 commit intoconda:mainfrom
ritankarsaha:fix/should-retry-transient-io-errors

Conversation

@ritankarsaha
Copy link
Copy Markdown
Contributor

@ritankarsaha ritankarsaha commented Apr 5, 2026

Description

  • should_retry() was returning true for all IoError and CouldNotCreateDestination variants, regardless of error kind
  • Permanent failures like PermissionDenied, NotFound, and Other would retry forever — the TODO comment in the code also acknowledged this was wrong
  • Now checks err.kind() and only retries genuinely transient kinds: BrokenPipe, ConnectionReset, ConnectionAborted, ConnectionRefused, NotConnected, TimedOut, UnexpectedEof, Interrupted
  • Tests updated to assert permanent errors do NOT retry; added a new test for CouldNotCreateDestination with a transient error kind

Fixes #2316

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.

@baszalmstra what do you think ? Any more changes required?

@ritankarsaha ritankarsaha force-pushed the fix/should-retry-transient-io-errors branch from 2e1eb16 to f3ddde0 Compare April 6, 2026 03:01
…ould_retry()

Signed-off-by: RITANKAR SAHA <ritankar.saha786@gmail.com>

fix(rattler_package_streaming): only retry transient I/O errors in should_retry()

fix(rattler_package_streaming): only retry transient I/O errors in should_retry()
@ritankarsaha ritankarsaha force-pushed the fix/should-retry-transient-io-errors branch from f3ddde0 to 2228d7b Compare April 6, 2026 03:18
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.

should_retry() retries permanent I/O errors, causing infinite retry loops

1 participant