Skip to content

Commit

Permalink
Fix CloudFetch retry policy to be compatible with all urllib3 versi…
Browse files Browse the repository at this point in the history
…ons we support

Signed-off-by: Levko Kravets <[email protected]>
  • Loading branch information
kravets-levko committed Jul 11, 2024
1 parent 185ff3c commit 8703393
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 8703393

Please sign in to comment.