Skip to content

Commit

Permalink
Fix databricks configure if new profile is specified (#1030)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
pietern authored Nov 30, 2023
1 parent 65458cb commit 4a228e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4a228e6

Please sign in to comment.