v0.11.2
- Allow login URLs as profile
hostwhen configuring the workspace/admin client for CLI commands (#250). The handling of theDATABRICKS_HOSTenvironment variable has been modified to ensure consistent normalization of the host URL with the Databricks Go SDK, resolving a host normalization issue that previously arose from differences in SDK implementations. Two new methods,fix_databricks_hostand_patch_databricks_host, have been introduced to emulate the Go SDK's host normalization and update the environment variable if necessary. Thefix_databricks_hostmethod normalizes the host URL by parsing it and creating a new URL instance with empty path, parameters, query, and fragment if the netloc is empty, while the_patch_databricks_hostmethod checks and updates theDATABRICKS_HOSTenvironment variable accordingly. This change enables the Python SDK to receive a normalized host URL, allowing the labs CLI integration to work correctly, and updates theneeds_workspace_clientandis_accountchecks to use the normalized host URL when creating workspace or account clients. Additionally, several unit tests have been added to verify the correctness of the normalization and patching functionality for different host value types and client scenarios.
Contributors: @asnare