Skip to content

Commit 3b5ab96

Browse files
committed
formatted
1 parent 14aa770 commit 3b5ab96

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

databricks/sdk/credentials_provider.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ def wrapper(cfg: "Config") -> Optional[OAuthCredentialsProvider]:
118118
# Early environment detection - check before config validation
119119
if env_vars and not all(os.environ.get(var) for var in env_vars):
120120
# Provide specific error message for Azure DevOps OIDC SYSTEM_ACCESSTOKEN
121-
if name == "azdo-oidc" and "SYSTEM_ACCESSTOKEN" in env_vars and not os.environ.get("SYSTEM_ACCESSTOKEN"):
122-
logger.debug("Azure DevOps OIDC: SYSTEM_ACCESSTOKEN env var not found. If calling from Azure DevOps Pipeline, please set this env var following https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken")
121+
if (
122+
name == "azdo-oidc"
123+
and "SYSTEM_ACCESSTOKEN" in env_vars
124+
and not os.environ.get("SYSTEM_ACCESSTOKEN")
125+
):
126+
logger.debug(
127+
"Azure DevOps OIDC: SYSTEM_ACCESSTOKEN env var not found. If calling from Azure DevOps Pipeline, please set this env var following https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken"
128+
)
123129
else:
124130
logger.debug(f"{name}: required environment variables not present, skipping")
125131
return None

0 commit comments

Comments
 (0)