Skip to content

Improved usability of databricks auth login ... --configure-cluster flow by displaying cluster type and runtime version#956

Merged
nfx merged 7 commits into
mainfrom
compatible/clusters
Nov 9, 2023
Merged

Improved usability of databricks auth login ... --configure-cluster flow by displaying cluster type and runtime version#956
nfx merged 7 commits into
mainfrom
compatible/clusters

Conversation

@nfx
Copy link
Copy Markdown
Contributor

@nfx nfx commented Nov 6, 2023

This PR adds selectors for Databricks-connect compatible clusters and SQL warehouses

Tested in #914

@nfx nfx requested a review from pietern November 6, 2023 20:32
@nfx nfx added the CLI CLI related issues label Nov 7, 2023
@nfx nfx enabled auto-merge November 7, 2023 23:58
Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

As utility functions these belong under the libs package, IMO.

Comment thread cmd/workspace/clusters/uc.go Outdated
Comment thread cmd/workspace/clusters/uc.go
@nfx nfx requested a review from pietern November 8, 2023 16:24
Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

You moved this to databrickscfg, but how is this related?

These are pickers, so what about libs/pickers?

@nfx nfx requested a review from pietern November 9, 2023 11:14
@nfx
Copy link
Copy Markdown
Contributor Author

nfx commented Nov 9, 2023

@pietern this is in databrickscfg, because cluster_id / warehouse_id is in ~/.databrickscfg.

Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

How is that related? They use zero common code.

@nfx
Copy link
Copy Markdown
Contributor Author

nfx commented Nov 9, 2023

@pietern it is related. see go/sdk/config/cluster

@nfx
Copy link
Copy Markdown
Contributor Author

nfx commented Nov 9, 2023

@pietern check go/sdk/config/cluster, ec75364 and tell if we still want to have libs/pickers

@nfx nfx requested a review from pietern November 9, 2023 12:16
@nfx nfx changed the title Expose selectors for UC clusters and SQL warehouses Improved usability of databricks auth login ... --configure-cluster flow by displaying cluster type and runtime version Nov 9, 2023
Comment thread libs/databrickscfg/cfgpickers/clusters.go Outdated
Comment thread libs/databrickscfg/profiles.go Outdated
@nfx nfx requested a review from pietern November 9, 2023 16:32
Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

I noticed one functional change -- when running auth login, and there being only a single compatible cluster, the user no longer sees a prompt. That misses out on a bit of educational value, and may have unintended consequences (i.e. not knowing that the profile has a cluster attached, and running stuff remotely inadvertently).

@nfx nfx added this pull request to the merge queue Nov 9, 2023
Merged via the queue into main with commit 3284a8c Nov 9, 2023
@nfx nfx deleted the compatible/clusters branch November 9, 2023 16:47
pietern added a commit that referenced this pull request Nov 29, 2023
This release includes the new `databricks labs` command to install, manage, and run Databricks Labs projects.

CLI:
 * Add `--debug` as shortcut for `--log-level debug` ([#964](#964)).
 * Improved usability of `databricks auth login ... --configure-cluster` ([#956](#956)).
 * Make `databricks configure` save only explicit fields ([#973](#973)).
 * Add `databricks labs` command group ([#914](#914)).
 * Tolerate missing .databrickscfg file during `databricks auth login` ([#1003](#1003)).
 * Add `--configure-cluster` flag to configure command ([#1005](#1005)).
 * Fix bug where the account or workspace client could be `nil` ([#1020](#1020)).

Bundles:
 * Do not allow empty descriptions for bundle template inputs ([#967](#967)).
 * Added support for top-level permissions ([#928](#928)).
 * Allow jobs to be manually unpaused in development mode ([#885](#885)).
 * Fix template initialization from current working directory ([#976](#976)).
 * Add `--tag` and `--branch` options to bundle init command ([#975](#975)).
 * Work around DLT issue with `$PYTHONPATH` not being set correctly ([#999](#999)).
 * Enable `spark_jar_task` with local JAR libraries ([#993](#993)).
 * Pass `USERPROFILE` environment variable to Terraform ([#1001](#1001)).
 * Improve error message when path is not a bundle template ([#985](#985)).
 * Correctly overwrite local state if remote state is newer ([#1008](#1008)).
 * Add mlops-stacks to the default `databricks bundle init` prompt ([#988](#988)).
 * Do not add wheel content hash in uploaded Python wheel path ([#1015](#1015)).
 * Do not replace pipeline libraries if there are no matches for pattern ([#1021](#1021)).

Internal:
 * Update CLI version in the VS Code extension during release ([#1014](#1014)).

API Changes:
 * Changed `databricks functions create` command . New request type is .
 * Changed `databricks metastores create` command with new required argument order.
 * Removed `databricks metastores enable-optimization` command.
 * Removed `databricks account o-auth-enrollment` command group.
 * Removed `databricks apps delete` command.
 * Removed `databricks apps get` command.
 * Added `databricks apps delete-app` command.
 * Added `databricks apps get-app` command.
 * Added `databricks apps get-app-deployment-status` command.
 * Added `databricks apps get-apps` command.
 * Added `databricks apps get-events` command.
 * Added `databricks account network-connectivity` command group.

OpenAPI commit 22f09783eb8a84d52026f856be3b2068f9498db3 (2023-11-23)

Dependency updates:
 * Bump golang.org/x/term from 0.13.0 to 0.14.0 ([#981](#981)).
 * Bump github.com/hashicorp/terraform-json from 0.17.1 to 0.18.0 ([#979](#979)).
 * Bump golang.org/x/oauth2 from 0.13.0 to 0.14.0 ([#982](#982)).
 * Bump github.com/databricks/databricks-sdk-go from 0.24.0 to 0.25.0 ([#980](#980)).
 * Bump github.com/databricks/databricks-sdk-go from 0.25.0 to 0.26.0 ([#1019](#1019)).
@pietern pietern mentioned this pull request Nov 29, 2023
github-merge-queue Bot pushed a commit that referenced this pull request Nov 29, 2023
This release includes the new `databricks labs` command to install,
manage, and run Databricks Labs projects.

CLI:
* Add `--debug` as shortcut for `--log-level debug`
([#964](#964)).
* Improved usability of `databricks auth login ... --configure-cluster`
([#956](#956)).
* Make `databricks configure` save only explicit fields
([#973](#973)).
* Add `databricks labs` command group
([#914](#914)).
* Tolerate missing .databrickscfg file during `databricks auth login`
([#1003](#1003)).
* Add `--configure-cluster` flag to configure command
([#1005](#1005)).
* Fix bug where the account or workspace client could be `nil`
([#1020](#1020)).

Bundles:
* Do not allow empty descriptions for bundle template inputs
([#967](#967)).
* Added support for top-level permissions
([#928](#928)).
* Allow jobs to be manually unpaused in development mode
([#885](#885)).
* Fix template initialization from current working directory
([#976](#976)).
* Add `--tag` and `--branch` options to bundle init command
([#975](#975)).
* Work around DLT issue with `$PYTHONPATH` not being set correctly
([#999](#999)).
* Enable `spark_jar_task` with local JAR libraries
([#993](#993)).
* Pass `USERPROFILE` environment variable to Terraform
([#1001](#1001)).
* Improve error message when path is not a bundle template
([#985](#985)).
* Correctly overwrite local state if remote state is newer
([#1008](#1008)).
* Add mlops-stacks to the default `databricks bundle init` prompt
([#988](#988)).
* Do not add wheel content hash in uploaded Python wheel path
([#1015](#1015)).
* Do not replace pipeline libraries if there are no matches for pattern
([#1021](#1021)).

Internal:
* Update CLI version in the VS Code extension during release
([#1014](#1014)).

API Changes:
 * Changed `databricks functions create` command.
* Changed `databricks metastores create` command with new required
argument order.
 * Removed `databricks metastores enable-optimization` command.
 * Removed `databricks account o-auth-enrollment` command group.
 * Removed `databricks apps delete` command.
 * Removed `databricks apps get` command.
 * Added `databricks apps delete-app` command.
 * Added `databricks apps get-app` command.
 * Added `databricks apps get-app-deployment-status` command.
 * Added `databricks apps get-apps` command.
 * Added `databricks apps get-events` command.
 * Added `databricks account network-connectivity` command group.

OpenAPI commit 22f09783eb8a84d52026f856be3b2068f9498db3 (2023-11-23)

Dependency updates:
* Bump golang.org/x/term from 0.13.0 to 0.14.0
([#981](#981)).
* Bump github.com/hashicorp/terraform-json from 0.17.1 to 0.18.0
([#979](#979)).
* Bump golang.org/x/oauth2 from 0.13.0 to 0.14.0
([#982](#982)).
* Bump github.com/databricks/databricks-sdk-go from 0.24.0 to 0.25.0
([#980](#980)).
* Bump github.com/databricks/databricks-sdk-go from 0.25.0 to 0.26.0
([#1019](#1019)).
pietern added a commit that referenced this pull request May 4, 2026
…5168)

## Summary

`SelectWarehouse` in `libs/databrickscfg/cfgpickers/warehouses.go` contains:

```go
promptui.SearchPrompt = "Search: "
```

This assigns the package-level global to its own default. promptui
declares it
[here](https://github.com/manifoldco/promptui/blob/v0.9.0/select.go#L184)
as `var SearchPrompt = "Search: "` — byte-identical to what we set. The
line is the only write to `promptui.SearchPrompt` in the repo.

It was introduced in #4170 alongside the template-init warehouse picker.
The original warehouse picker (`AskForWarehouse`, added in #956) never
had it, which suggests it's copy-paste residue rather than a deliberate
override.

## Test plan

- [x] `go build ./libs/databrickscfg/cfgpickers/`
- [x] No behavior change expected — value matches promptui's default

This pull request and its description were written by Isaac.
denik pushed a commit that referenced this pull request May 20, 2026
… flow by displaying cluster type and runtime version (#956)

This PR adds selectors for Databricks-connect compatible clusters and
SQL warehouses

Tested in #914
denik pushed a commit that referenced this pull request May 20, 2026
This release includes the new `databricks labs` command to install,
manage, and run Databricks Labs projects.

CLI:
* Add `--debug` as shortcut for `--log-level debug`
([#964](#964)).
* Improved usability of `databricks auth login ... --configure-cluster`
([#956](#956)).
* Make `databricks configure` save only explicit fields
([#973](#973)).
* Add `databricks labs` command group
([#914](#914)).
* Tolerate missing .databrickscfg file during `databricks auth login`
([#1003](#1003)).
* Add `--configure-cluster` flag to configure command
([#1005](#1005)).
* Fix bug where the account or workspace client could be `nil`
([#1020](#1020)).

Bundles:
* Do not allow empty descriptions for bundle template inputs
([#967](#967)).
* Added support for top-level permissions
([#928](#928)).
* Allow jobs to be manually unpaused in development mode
([#885](#885)).
* Fix template initialization from current working directory
([#976](#976)).
* Add `--tag` and `--branch` options to bundle init command
([#975](#975)).
* Work around DLT issue with `$PYTHONPATH` not being set correctly
([#999](#999)).
* Enable `spark_jar_task` with local JAR libraries
([#993](#993)).
* Pass `USERPROFILE` environment variable to Terraform
([#1001](#1001)).
* Improve error message when path is not a bundle template
([#985](#985)).
* Correctly overwrite local state if remote state is newer
([#1008](#1008)).
* Add mlops-stacks to the default `databricks bundle init` prompt
([#988](#988)).
* Do not add wheel content hash in uploaded Python wheel path
([#1015](#1015)).
* Do not replace pipeline libraries if there are no matches for pattern
([#1021](#1021)).

Internal:
* Update CLI version in the VS Code extension during release
([#1014](#1014)).

API Changes:
 * Changed `databricks functions create` command.
* Changed `databricks metastores create` command with new required
argument order.
 * Removed `databricks metastores enable-optimization` command.
 * Removed `databricks account o-auth-enrollment` command group.
 * Removed `databricks apps delete` command.
 * Removed `databricks apps get` command.
 * Added `databricks apps delete-app` command.
 * Added `databricks apps get-app` command.
 * Added `databricks apps get-app-deployment-status` command.
 * Added `databricks apps get-apps` command.
 * Added `databricks apps get-events` command.
 * Added `databricks account network-connectivity` command group.

OpenAPI commit 22f09783eb8a84d52026f856be3b2068f9498db3 (2023-11-23)

Dependency updates:
* Bump golang.org/x/term from 0.13.0 to 0.14.0
([#981](#981)).
* Bump github.com/hashicorp/terraform-json from 0.17.1 to 0.18.0
([#979](#979)).
* Bump golang.org/x/oauth2 from 0.13.0 to 0.14.0
([#982](#982)).
* Bump github.com/databricks/databricks-sdk-go from 0.24.0 to 0.25.0
([#980](#980)).
* Bump github.com/databricks/databricks-sdk-go from 0.25.0 to 0.26.0
([#1019](#1019)).
denik pushed a commit that referenced this pull request May 20, 2026
…5168)

## Summary

`SelectWarehouse` in `libs/databrickscfg/cfgpickers/warehouses.go` contains:

```go
promptui.SearchPrompt = "Search: "
```

This assigns the package-level global to its own default. promptui
declares it
[here](https://github.com/manifoldco/promptui/blob/v0.9.0/select.go#L184)
as `var SearchPrompt = "Search: "` — byte-identical to what we set. The
line is the only write to `promptui.SearchPrompt` in the repo.

It was introduced in #4170 alongside the template-init warehouse picker.
The original warehouse picker (`AskForWarehouse`, added in #956) never
had it, which suggests it's copy-paste residue rather than a deliberate
override.

## Test plan

- [x] `go build ./libs/databrickscfg/cfgpickers/`
- [x] No behavior change expected — value matches promptui's default

This pull request and its description were written by Isaac.
TanishqDatabricks pushed a commit to TanishqDatabricks/cli that referenced this pull request May 22, 2026
…atabricks#5168)

## Summary

`SelectWarehouse` in `libs/databrickscfg/cfgpickers/warehouses.go` contains:

```go
promptui.SearchPrompt = "Search: "
```

This assigns the package-level global to its own default. promptui
declares it
[here](https://github.com/manifoldco/promptui/blob/v0.9.0/select.go#L184)
as `var SearchPrompt = "Search: "` — byte-identical to what we set. The
line is the only write to `promptui.SearchPrompt` in the repo.

It was introduced in databricks#4170 alongside the template-init warehouse picker.
The original warehouse picker (`AskForWarehouse`, added in databricks#956) never
had it, which suggests it's copy-paste residue rather than a deliberate
override.

## Test plan

- [x] `go build ./libs/databrickscfg/cfgpickers/`
- [x] No behavior change expected — value matches promptui's default

This pull request and its description were written by Isaac.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI CLI related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants