From 4a228e6f1218f9c5ef8cc8c7e69a8d25d546bead Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 30 Nov 2023 10:51:52 +0100 Subject: [PATCH] Fix `databricks configure` if new profile is specified (#1030) ## Changes The code included the to-be-created profile in the configuration and that triggered the SDK to try and load it. Instead, we must use the specified host and token directly. ## Tests Manually. More integration test coverage tbd. --- cmd/configure/configure.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/configure/configure.go b/cmd/configure/configure.go index 1c4d2e6b..cfc44187 100644 --- a/cmd/configure/configure.go +++ b/cmd/configure/configure.go @@ -42,7 +42,11 @@ func configureInteractive(cmd *cobra.Command, flags *configureFlags, cfg *config // Ask user to specify a cluster if not already set. if flags.ConfigureCluster && cfg.ClusterID == "" { - w, err := databricks.NewWorkspaceClient((*databricks.Config)(cfg)) + // Create workspace client with configuration without the profile name set. + w, err := databricks.NewWorkspaceClient(&databricks.Config{ + Host: cfg.Host, + Token: cfg.Token, + }) if err != nil { return err }