cli icon indicating copy to clipboard operation
cli copied to clipboard

Databricks CLI auth login command removes cluster id

Open frbaxter-kr opened this issue 1 year ago • 5 comments

Describe the issue

Starting with Databricks CLI v0.233.0, doing a "databricks auth login" removes data from my profile entry.

Steps to reproduce the behavior

My profile before: [test] cluster_id = 0816-163139-kqxcega3 host = https://adb-9999999999999999.1.azuredatabricks.net auth_type = databricks-cli

$ databricks auth login

My profile after: [test] host = https://adb-9999999999999999.1.azuredatabricks.net auth_type = databricks-cli

Expected Behavior

Doing a login should not delete profile information, it should only authenticate.

Actual Behavior

My profile was ruined.

OS and CLI version

Databricks CLI v0.233.0

Is this a regression?

Yes, all versions before this worked correctly.

Debug Logs

N/A

frbaxter-kr avatar Nov 11 '24 21:11 frbaxter-kr

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 Jan 08 '25 00:01 github-actions[bot]

I run into same issue today with Databricks CLI v0.248.0. Is there any fix or workaround for this?

I know there is a way with --configure-cluster. However, this prompts instead of just use what was defined in .databrickscfg cluster_id.

dabruehl avatar Apr 17 '25 09:04 dabruehl

@andrewnester any update on this issue or workarounds?

dabruehl avatar Apr 29 '25 11:04 dabruehl

@dabruehl have you tried to pass the cluster id as input for the command, something like this?

databricks auth login --host [email protected] --configure-cluster <<< "my_cluster_id"

andrewnester avatar Apr 29 '25 12:04 andrewnester

@andrewnester thx for your input.

cluster ID does not work. It needs to be the cluster name in lower case (because of the search)

databricks auth login --host [email protected] --configure-cluster <<< "my_cluster_name_in_lower_case"

I still have the same questions as @frbaxter-kr. Why does login change the databrickscfg file? It just needs to login.

dabruehl avatar Apr 29 '25 14:04 dabruehl

Have the same issue. cluster_id is removed every time doing databricks auth login -p <profile>.

Databricks CLI v0.252.0

magnussommarsjo avatar May 22 '25 06:05 magnussommarsjo

We worked around this issue by writing a wrapper around the Databricks CLI. It's a shame they don't care about this bug, it's really confusing for our users. I also hate the INI file format when everybody else in the world is using yaml for configuration. The INI file format won't allow spaces or case sensitivity the way it has been implemented.

The Databricks CLI does a lot, but it's really clunky and could be so much better.

frbaxter-kr avatar May 22 '25 18:05 frbaxter-kr