Skip to content

Changelog shows incorrect parameter name for specifying retry policy #219

@LukasDBakerIkea

Description

@LukasDBakerIkea

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,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions