cli icon indicating copy to clipboard operation
cli copied to clipboard

Cannot configure an auth profile with a cluster when my workspace has multiple clusters with the same name

Open ilia-db opened this issue 1 year ago • 2 comments

Describe the issue

Cannot configure an auth profile with a cluster using databricks auth login --host https://***.databricks.com --configure-cluster when my workspace has multiple clusters with the same name.

It seems like the CLI converts clusters to a map using cluster name as an id, which fails when there are multiple such names. Databricks doesn't prevent users from creating multiple clusters with the same name.

Steps to reproduce the behavior

  1. Create multiple clusters with the same name in your workspace
  2. Run databricks auth login --host https://***.databricks.com --configure-cluster

Expected Behavior

I should be able to create a profile and chose a cluster

Actual Behavior

Profile config is not created, and I get this error:

databricks auth login --host https://***.cloud.databricks.com --configure-cluster
✔ Databricks Profile Name: ***
⢿ Loading list of clusters to select fromError: failed to load clusters list. Original error: duplicate .ClusterName: ***

OS and CLI version

macOS, CLI from the latest main commit

Is this a regression?

No

Debug Logs

N/A

ilia-db avatar Nov 09 '23 15:11 ilia-db

facing same, did you get solution @ilia-db

crepantherx avatar Jul 13 '24 06:07 crepantherx

For now, renaming the clusters or providing value directly to --configure-cluster is the only option

andrewnester avatar Jul 29 '24 14:07 andrewnester