Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix databricks configure if new profile is specified #1030

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

pietern
Copy link
Contributor

@pietern pietern commented Nov 30, 2023

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.

…ified

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.
@@ -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{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other fields from cfg which we might potentially need?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because we only set Host and Token in the rest of the command.

When we do a more involved auth wizard, we should carry over all relevant attributes except the profile.

@pietern pietern added this pull request to the merge queue Nov 30, 2023
@andrewnester andrewnester removed this pull request from the merge queue due to a manual request Nov 30, 2023
@pietern pietern added this pull request to the merge queue Nov 30, 2023
Merged via the queue into main with commit 4a228e6 Nov 30, 2023
4 checks passed
@pietern pietern deleted the configure-cluster-fix branch November 30, 2023 09:58
pietern added a commit that referenced this pull request Nov 30, 2023
This is a bugfix release to address issues with v0.210.0.

CLI:
 * Fix `panic: $HOME is not set` ([#1027](#1027)).
 * Fix `databricks configure` if new profile is specified ([#1030](#1030)).
 * Filter out system clusters for `--configure-cluster` ([#1031](#1031)).

Bundles:
 * Fixed panic when job has trigger and in development mode ([#1026](#1026)).

Internal:
 * Use `fetch-tags` option in release workflows ([#1025](#1025)).
@pietern pietern mentioned this pull request Nov 30, 2023
github-merge-queue bot pushed a commit that referenced this pull request Nov 30, 2023
This is a bugfix release to address issues with v0.210.0.

CLI:
* Fix `panic: $HOME is not set`
([#1027](#1027)).
* Fix `databricks configure` if new profile is specified
([#1030](#1030)).
* Filter out system clusters for `--configure-cluster`
([#1031](#1031)).

Bundles:
* Fixed panic when job has trigger and in development mode
([#1026](#1026)).

Internal:
* Use `fetch-tags` option in release workflows
([#1025](#1025)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants