Skip to content

Remove no-op promptui.SearchPrompt assignment in warehouse picker#5168

Merged
pietern merged 1 commit into
mainfrom
drop-promptui-global
May 4, 2026
Merged

Remove no-op promptui.SearchPrompt assignment in warehouse picker#5168
pietern merged 1 commit into
mainfrom
drop-promptui-global

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented May 4, 2026

Summary

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

promptui.SearchPrompt = "Search: "

This assigns the package-level global to its own default. promptui declares it here 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

  • go build ./libs/databrickscfg/cfgpickers/
  • No behavior change expected — value matches promptui's default

This pull request and its description were written by Isaac.

The line `promptui.SearchPrompt = "Search: "` in `SelectWarehouse`
assigns the package-level global to its own default value (see
`promptui/select.go`: `var SearchPrompt = "Search: "`), so it has no
effect. It was introduced in #4170 (the only write to this global in
the repo) alongside the warehouse picker added in #956. Drop the line
and the now-unused promptui import.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is May 4, 2026 09:44 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is May 4, 2026 09:44 — with GitHub Actions Inactive
@pietern pietern changed the title Remove no-op promptui.SearchPrompt assignment in warehouse picker Remove no-op promptui.SearchPrompt assignment in warehouse picker May 4, 2026
@pietern pietern enabled auto-merge May 4, 2026 09:54
Copy link
Copy Markdown
Member

@simonfaltum simonfaltum left a comment

Choose a reason for hiding this comment

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

LGTM

@pietern pietern disabled auto-merge May 4, 2026 12:09
@pietern pietern merged commit e602a92 into main May 4, 2026
26 of 27 checks passed
@pietern pietern deleted the drop-promptui-global branch May 4, 2026 12:10
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants