77 "os"
88
99 "github.com/databricks/cli/cmd/root"
10- "github.com/databricks/cli/cmd/workspace/clusters"
11- "github.com/databricks/cli/cmd/workspace/warehouses"
1210 "github.com/databricks/cli/libs/cmdio"
11+ "github.com/databricks/cli/libs/databrickscfg/cfgpickers"
1312 "github.com/databricks/cli/libs/log"
1413 "github.com/databricks/databricks-sdk-go"
1514 "github.com/databricks/databricks-sdk-go/config"
@@ -70,7 +69,8 @@ func (lc *loginConfig) askCluster(ctx context.Context, w *databricks.WorkspaceCl
7069 if ! cmdio .IsInteractive (ctx ) {
7170 return ErrNotInTTY
7271 }
73- clusterID , err := clusters .AskForCompatibleCluster (ctx , w , lc .Installer .MinRuntimeVersion )
72+ clusterID , err := cfgpickers .AskForCluster (ctx , w ,
73+ cfgpickers .WithDatabricksConnect (lc .Installer .MinRuntimeVersion ))
7474 if err != nil {
7575 return fmt .Errorf ("select: %w" , err )
7676 }
@@ -90,7 +90,8 @@ func (lc *loginConfig) askWarehouse(ctx context.Context, w *databricks.Workspace
9090 if ! cmdio .IsInteractive (ctx ) {
9191 return ErrNotInTTY
9292 }
93- lc .WarehouseID , err = warehouses .AskForCompatibleWarehouses (ctx , w , lc .Installer .WarehouseTypes )
93+ lc .WarehouseID , err = cfgpickers .AskForWarehouse (ctx , w ,
94+ cfgpickers .WithWarehouseTypes (lc .Installer .WarehouseTypes ... ))
9495 return
9596}
9697
0 commit comments