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

Changelog shows incorrect parameter name for specifying retry policy #219

Closed
LukasDBakerIkea opened this issue Sep 7, 2023 · 1 comment · Fixed by #225
Closed

Changelog shows incorrect parameter name for specifying retry policy #219

LukasDBakerIkea opened this issue Sep 7, 2023 · 1 comment · Fixed by #225

Comments

@LukasDBakerIkea
Copy link

A small but annoying issue:

I was facing a slew of warnings of the form DatabricksRetryPolicy is currently bypassed. The CommandType cannot be set.. In my search for a way to resolve this warning, I found the following helpful line in the changelong (line 21):

Replace retry handling with DatabricksRetryPolicy. This is disabled by default. To enable, set enable_v3_retries=True when creating databricks.sql.client (#182)

It claims that setting enable_v3_retries=True when creating an sql connection will enable the new retry mechanism. I hoped that this would silence the warning. I added the argument, but the warnings persisted. By digging through the code, I found that the correct form of the argument to set is _enable_v3_retries=True with an underscore at the beginning, not enable_v3_retries=True.

After making this change, the warnings have been silenced.

i.e., creating the sql connection this way properly sets the retry policy and silences the warnings:

sql.connect(
    server_hostname=hostname,
    http_path=http_path,
    access_token=token,
    _enable_v3_retries=True,
)
susodapop pushed a commit that referenced this issue Sep 18, 2023
Signed-off-by: Jesse Whitehouse <[email protected]>
susodapop pushed a commit that referenced this issue Sep 18, 2023
Closes #219

Signed-off-by: Jesse Whitehouse <[email protected]>
@susodapop
Copy link
Contributor

Good catch! This has been fixed on main.

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 a pull request may close this issue.

2 participants