Skip to content

Commit bdb7387

Browse files
committed
Add retry timeout when fetching oidc_endpoints
1 parent 0bc2d75 commit bdb7387

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

databricks/sdk/config.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import requests
1212

1313
from . import useragent
14-
from ._base_client import _fix_host_if_needed
14+
from ._base_client import _BaseClient, _fix_host_if_needed
1515
from .clock import Clock, RealClock
1616
from .credentials_provider import (CredentialsStrategy, DefaultCredentials,
1717
OAuthCredentialsProvider)
@@ -392,8 +392,12 @@ def oidc_endpoints(self) -> Optional[OidcEndpoints]:
392392
if self.is_azure and self.azure_client_id:
393393
return get_azure_entra_id_workspace_endpoints(self.host)
394394
if self.is_account_client and self.account_id:
395-
return get_account_endpoints(self.host, self.account_id)
396-
return get_workspace_endpoints(self.host)
395+
return get_account_endpoints(
396+
self.host,
397+
self.account_id,
398+
client=_BaseClient(retry_timeout_seconds=self.retry_timeout_seconds)
399+
)
400+
return get_workspace_endpoints(self.host, client=_BaseClient(retry_timeout_seconds=self.retry_timeout_seconds))
397401

398402
def debug_string(self) -> str:
399403
"""Returns log-friendly representation of configured attributes"""

0 commit comments

Comments
 (0)