Skip to content
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

Fix CloudFetch retry policy to be compatible with all urllib3 versions we support #412

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/databricks/sql/cloudfetch/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
retryPolicy = Retry(
total=5, # max retry attempts
backoff_factor=1, # min delay, 1 second
backoff_max=60, # max delay, 60 seconds
# TODO: `backoff_max` is supported since `urllib3` v2.0.0, but we allow >= 1.26.
# The default value (120 seconds) used since v1.26 looks reasonable enough
# backoff_max=60, # max delay, 60 seconds
# retry all status codes below 100, 429 (Too Many Requests), and all codes above 500,
# excluding 501 Not implemented
status_forcelist=[*range(0, 101), 429, 500, *range(502, 1000)],
Expand Down
Loading