Skip to content

[ISSUE] UserWarning: The 'retry_after_secs' parameter of DatabricksError is deprecated and will be removed in a future version. when retrying on 429 #963

Open
@harupy

Description

@harupy

Description

SDK emits the following error when retrying on 429:

UserWarning: The 'retry_after_secs' parameter of DatabricksError is deprecated and will be removed in a future version.

Reproduction
A minimal code sample demonstrating the bug.

import requests
import databricks.sdk
from unittest import mock
from databricks.sdk import WorkspaceClient
import warnings

warnings.filterwarnings('always', category=UserWarning, message=r".*retry_after_secs.*")

w = WorkspaceClient()

o = requests.Session.request

def p(*args, **kwargs):
    resp = o(*args, **kwargs)
    resp.status_code = 429
    return resp

with mock.patch("requests.Session.request", p):
    next(w.clusters.list())

Expected behavior
A clear and concise description of what you expected to happen.

No warning.

Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?

No

Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here.

Other Information

  • OS: [e.g. macOS]
  • Version: databricks-sdk 0.52.0

Additional context
Add any other context about the problem here.

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