Skip to content

Commit 134b21d

Browse files
Fix CloudFetch retry policy to be compatible with all urllib3 versions we support (#412)
Signed-off-by: Levko Kravets <[email protected]>
1 parent 185ff3c commit 134b21d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/databricks/sql/cloudfetch/downloader.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
retryPolicy = Retry(
1818
total=5, # max retry attempts
1919
backoff_factor=1, # min delay, 1 second
20-
backoff_max=60, # max delay, 60 seconds
20+
# TODO: `backoff_max` is supported since `urllib3` v2.0.0, but we allow >= 1.26.
21+
# The default value (120 seconds) used since v1.26 looks reasonable enough
22+
# backoff_max=60, # max delay, 60 seconds
2123
# retry all status codes below 100, 429 (Too Many Requests), and all codes above 500,
2224
# excluding 501 Not implemented
2325
status_forcelist=[*range(0, 101), 429, 500, *range(502, 1000)],

0 commit comments

Comments
 (0)