Skip to content

cmdio: relocate helpers into dedicated files; build Secret/Select on Run*#5221

Merged
pietern merged 1 commit into
mainfrom
cmdio-organize-files
May 8, 2026
Merged

cmdio: relocate helpers into dedicated files; build Secret/Select on Run*#5221
pietern merged 1 commit into
mainfrom
cmdio-organize-files

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented May 8, 2026

Summary

  • compat.go is gone. Log/LogString move to log.go, and readLine/Ask/AskYesOrNo move to ask.go. The "compatibility layer" doc comments (a transitional shim from Migrate progress logger functions to use cmdio directly #3818) are replaced with descriptions of what each function does, since these are now their permanent home.
  • Tuple/Select/SelectOrdered move from io.go to select.go and are reimplemented on top of RunSelect. A new HideSelected option on SelectOptions preserves the existing post-prompt display behavior.
  • Secret moves from io.go to prompt.go and becomes a thin wrapper over RunPrompt. A new HideEntered option on PromptOptions carries the masked-input post-submission behavior.

Result

The github.com/manifoldco/promptui import is confined to libs/cmdio/prompt.go and libs/cmdio/select.go; every other prompt and selection helper in the package builds on those two entry points.

Test plan

  • Manual: databricks bundle run from a bundle with multiple resources triggers the resource picker (cmdio.Select).
  • Manual: databricks secrets put-secret <scope> <key> triggers the masked secret prompt (cmdio.Secret).

…Run*

compat.go is gone. Log/LogString move to log.go, and
readLine/Ask/AskYesOrNo move to ask.go. The "compatibility layer" doc
comments are replaced with descriptions of what each function does,
since these are now their permanent home.

Tuple/Select/SelectOrdered move from io.go to select.go and are
reimplemented on top of RunSelect. A new HideSelected option on
SelectOptions preserves the existing post-prompt display behavior.

Secret moves from io.go to prompt.go and becomes a thin wrapper over
RunPrompt. A new HideEntered option on PromptOptions carries the
masked-input post-submission behavior.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is May 8, 2026 11:50 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is May 8, 2026 11:50 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@denik denik left a comment

Choose a reason for hiding this comment

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

Manual: databricks bundle run from a bundle with multiple resources triggers the resource picker (cmdio.Select).

Would be nice to put this into acceptance test.

@pietern pietern merged commit 55f2cab into main May 8, 2026
23 of 24 checks passed
@pietern pietern deleted the cmdio-organize-files branch May 8, 2026 12:11
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.

2 participants