Skip to content

[ISSUE] Incorrectly set config.is_aws flag when host has trailing "/" #661

@HariGS-DB

Description

@HariGS-DB

Description
When running databricks sdk on azure workspaces using databricks cli authentication. The config.is_aws flag is set to True.
This occurs when the databricks profile host doesn't have https:// in the beginning and a trailing "/" at the end for a azure workspace

Reproduction
Create a databricks profile like below:
azure workspace url
host = adb-/
auth_type = databricks-cli

run code :
ws = WorkspaceClient(auth_type = "databricks-cli", profile="PROFILE_NAME")
assert ws.config.is_azure

Expected behaviour
ws.config.is_azure should be set to True and ws.config.is_aws should be set to False

Is it a regression?
Dont know

Other Information

  • OS: [e.g. macOS]
  • Version: [e.g. 0.28.0]

Additional context
Add any other context about the problem here.
related ucx issue
databrickslabs/ucx#1757

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions