Conversation
Remove the hand-rolled per-range retry loop (MAX_DOWNLOAD_RETRIES_PER_RANGE + RETRIABLE_DOWNLOAD_STATUSCODES) from _download_ranged. Transient failures are already retried by the urllib3 Retry configuration mounted on the connection's session (session_with_retries), so the DIY loop only added divergent behavior: different retry counts, different status codes (408/500/501 were retried here but not by the session), and OpenEoApiPlainError raised where the session raises RetryError. Fixes Open-EO#934
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.
Fixes #934
Removes the hand-rolled per-range retry loop from
_download_ranged. Transient failures are already retried by the urllib3 Retry configuration mounted on the connection's session, so the DIY loop only added divergent behavior: different retry counts, a different status-code set (408/500/501 retried here but not by the session), andOpenEoApiPlainErrorwhere the session raisesRetryErrorThe unused
MAX_DOWNLOAD_RETRIES_PER_RANGE/RETRIABLE_DOWNLOAD_STATUSCODESconstants are goneTested with
pytest tests/rest/test_download_ranged_retry.py tests/rest/test_job.py: 133 passed — including a new httpretty-based test proving a 503 on a range is retried by the session and the download completes