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

Use urllib3 for retries #182

Merged
merged 11 commits into from
Aug 9, 2023
Merged

Use urllib3 for retries #182

merged 11 commits into from
Aug 9, 2023

Conversation

susodapop
Copy link
Contributor

@susodapop susodapop commented Jul 26, 2023

Description

This pull request implements a sub-class of urllib3's Retry class. The goal is reliability, testability, and extensibility of our retry behaviour which prior to this change was entangled with the command execution flow in thrift_backend.py. This new behavior is gated behind a new config called _enable_v3_retries.

The code is extensively commented and includes accurate docstrings. All tests pass.

Jesse Whitehouse added 4 commits August 8, 2023 14:09
Signed-off-by: Jesse Whitehouse <[email protected]>
The update to client.py was necessary to test cursor close behaviour

Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
@susodapop susodapop marked this pull request as ready for review August 8, 2023 18:36
exception if timer was not started for a request

Signed-off-by: Jesse Whitehouse <[email protected]>
Copy link
Collaborator

@benc-db benc-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will not block if this release is very time sensitive, as most of the comments are minor python style things.

src/databricks/sql/auth/retry.py Show resolved Hide resolved
src/databricks/sql/auth/retry.py Outdated Show resolved Hide resolved
src/databricks/sql/auth/retry.py Outdated Show resolved Hide resolved
src/databricks/sql/auth/retry.py Outdated Show resolved Hide resolved
src/databricks/sql/auth/thrift_http_client.py Show resolved Hide resolved
src/databricks/sql/thrift_backend.py Outdated Show resolved Hide resolved
src/databricks/sqlalchemy/dialect/__init__.py Show resolved Hide resolved
tests/e2e/common/retry_test_mixins.py Show resolved Hide resolved
Jesse Whitehouse added 3 commits August 9, 2023 15:00
Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
@susodapop susodapop merged commit 019acd8 into main Aug 9, 2023
15 checks passed
@susodapop susodapop deleted the PECO-897 branch August 9, 2023 21:41
susodapop pushed a commit to unj1m/databricks-sql-python that referenced this pull request Sep 19, 2023
Behaviour is gated behind `enable_v3_retries` config. This will be removed and become the default behaviour in a subsequent release.

Signed-off-by: Jesse Whitehouse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants