databricks-sdk-py icon indicating copy to clipboard operation
databricks-sdk-py copied to clipboard

Add retry timeout when fetching oidc_endpoints

Open rossgray opened this issue 3 months ago • 1 comments

What changes are proposed in this pull request?

Fixes https://github.com/databricks/databricks-sdk-py/issues/1046

Currently any retry_timeout_seconds passed into the Config is not passed along to other methods or properties, such as oidc_endpoints. This is an issue because it can lead to the instantiation of the Config class taking 5 minutes if an invalid host is provided (this is the default timeout).

This PR ensures the retry_timeout_seconds is respected when fetching account and workspace endpoints.

How is this tested?

Prior to this PR, this code will fail after 5 minutes:

from databricks.sdk.core import Config

config = Config(
    host="invalid",
    client_id="invalid",
    client_secret="invalid",
    retry_timeout_seconds=30,
)
ValueError: default auth: oauth-m2m: Timed out after 0:05:00. Config: host=https://invalid, client_id=invalid, client_secret=***, retry_timeout_seconds=30

After this change, it will fail after 30 seconds as expected:

ValueError: default auth: oauth-m2m: Timed out after 0:00:30. Config: host=https://invalid, client_id=invalid, client_secret=***, retry_timeout_seconds=30

rossgray avatar Oct 23 '25 13:10 rossgray

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger: go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1085
  • Commit SHA: 62d2a07765b0b4f82b37e0da02690ebb0cecf5d9

Checks will be approved automatically on success.

github-actions[bot] avatar Oct 23 '25 17:10 github-actions[bot]