Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HariGS-DB opened this issue May 28, 2024 · 1 comment
Closed

Comments

@HariGS-DB
Copy link

HariGS-DB commented May 28, 2024

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

github-merge-queue bot pushed a commit that referenced this issue Jul 3, 2024
## Changes
<!-- Summary of your changes that are easy to understand -->
Added a check for trailing slash in the host url. Fixes (#661)

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->

- [ ] `make test` run locally
- [ ] `make fmt` applied
- [ ] relevant integration tests applied

---------

Signed-off-by: Parth Bansal <parth.bansal@databricks.com>
@HariGS-DB
Copy link
Author

confirmed working and closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant