You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Azure CLI authentication with host parameter only, the following warning is shown that could be confusing:
WARNING:databricks.sdk:azure_workspace_resource_id field not provided. It is recommended to specify this field in the Databricks configuration to avoid authentication errors.
Technically speaking, azure_workspace_resource_id is required only when user is outside of the workspace (typically on first run), after that - it's not required.
Reproduction
Configure Azure CLI authentication with host only, and without azure_workspace_resource_id, and you'll get a warning
Expected behavior
Warning shouldn't be printed
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
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: [e.g. 0.1.0]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
nfx
linked a pull request
Dec 20, 2023
that will
close
this issue
It is only required in that scenario, but the logging helps prevent a very annoying class of errors where the SDK fetches the token for the wrong tenant from the Azure CLI. This can only be prevented if the tenant ID or subscription ID is provided. This is a warning because it is sometimes safe and sometimes not depending on the configuration of your azure CLI, and if you don't specify anything else, we don't know whether the default tenant matches the workspace's tenant.
At the very least, we could also allow users to specify the tenant ID explicitly instead of the resource ID. However, without either, we depend on defaults configured in the Azure CLI, which result in an exceptionally poor UX, so we caution users who use Azure CLI auth without this extra metadata.
Actually, now that I think about it, there might be an unauthenticated endpoint that can tell us the tenant that a workspace belongs to. If we have that, we can look up the tenant that way, and users won't have to specify this field.
Description
When using Azure CLI authentication with
host
parameter only, the following warning is shown that could be confusing:Technically speaking,
azure_workspace_resource_id
is required only when user is outside of the workspace (typically on first run), after that - it's not required.Reproduction
Configure Azure CLI authentication with host only, and without
azure_workspace_resource_id
, and you'll get a warningExpected behavior
Warning shouldn't be printed
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
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
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: