Skip to content

Commit 1c8bb11

Browse files
kravets-levkovarun-edachali-dbx
authored andcommitted
Fix CloudFetch retry policy to be compatible with all urllib3 versions we support (#412)
Signed-off-by: Levko Kravets <levko.ne@gmail.com> Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent ee4f94c commit 1c8bb11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/databricks/sql/cloudfetch/downloader.py

Lines changed: 3 additions & 1 deletion
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)