Repository navigation
fix(auth): honor _retry_stop_after_attempts_count as total attempts - #1089
Open
atharva18-hue wants to merge 1 commit into
Open
atharva18-hue wants to merge 1 commit into
atharva18-hue wants to merge 1 commit into
Conversation
DatabricksRetryPolicy mapped _retry_stop_after_attempts_count 1:1 onto urllib3's `total`, which counts retries after the first request, so the knob bought one extra wire attempt (count=1 still retried once). Set the initial `total` to one less than the configured count, and index the backoff by retries already performed so backoff timing is unchanged. Fixes databricks#890 Signed-off-by: Atharva Chavhan <atharvachavhan18@gmail.com>
This branch has not been deployed
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 #890 (ERRORRECOV-013, Thrift portion; the SEA/kernel side already honours the knob — see issue).
What changed:
total = count - 1in DatabricksRetryPolicy; backoff now indexed by retry history so backoff timing is unchanged; docstring corrected; CHANGELOG entry; tests updated plus 2 new regression tests (repro counts 1→1, 3→3, 30→30).Verification: tests/unit/test_retry.py — 18 passed. Revert check: stashing only retry.py makes all 7 new/updated tests fail; restoring the fix makes them pass. The make_request loop is unchanged (14→14, 1→1 under a persistent 429).
Not verified locally: pyarrow-gated unit tests and E2E/conformance tests need CI / a live Databricks workspace — CI is the check for those.