cli icon indicating copy to clipboard operation
cli copied to clipboard

[ISSUE] `databricks auth login` - Invalid Databricks Account configuration when host does not specify scheme

Open 840 opened this issue 1 year ago • 7 comments

Describe the issue

When using databricks auth login for configuring an account configuration, if you do not specify https in the --host flag, it will be deemed as an invalid Databricks account configuration in subsequent commands that use the profile, even though the initial authentication succeeded.

Steps to reproduce the behavior

  1. databricks auth login --host accounts.cloud.databricks.com --account-id <uuid>
  2. databricks account workspaces list
  3. Select the registered profile you've created in step 1.
  4. Error: invalid Databricks Account configuration

Expected Behavior

It should work even if you do not specify https scheme.

Actual Behavior

image

OS and CLI version

MacOS 14.3.1 Databricks CLI v0.218.1

Is this a regression?

No

Debug Logs

11:33:18  INFO start pid=41167 version=0.218.1 args="databricks, --profile, account-test, account, workspaces, list, --log-level=debug"
11:33:18 DEBUG Loading account-test profile from /Users/<redacted>/.databrickscfg pid=41167 sdk=true
Error: invalid Databricks Account configuration
11:33:18 ERROR failed execution pid=41167 exit_code=1 error="invalid Databricks Account configuration"

840 avatar Apr 26 '24 11:04 840

encountered the same issue - manually prefixing "https://" to the host key in ~/.databrickscfg works around the issue

[DEFAULT]

[ACCOUNT-341a3819-260d-4cba-945d-d4ae646f866a]
host       = https://accounts.gcp.databricks.com
account_id = xxx
auth_type  = databricks-cli

yuribak avatar May 15 '24 17:05 yuribak

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Feb 10 '25 00:02 github-actions[bot]