cmdio: relocate helpers into dedicated files; build Secret/Select on Run*#5221
Merged
Conversation
…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
denik
approved these changes
May 8, 2026
Contributor
denik
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compat.gois gone.Log/LogStringmove tolog.go, andreadLine/Ask/AskYesOrNomove toask.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/SelectOrderedmove fromio.gotoselect.goand are reimplemented on top ofRunSelect. A newHideSelectedoption onSelectOptionspreserves the existing post-prompt display behavior.Secretmoves fromio.gotoprompt.goand becomes a thin wrapper overRunPrompt. A newHideEnteredoption onPromptOptionscarries the masked-input post-submission behavior.Result
The
github.com/manifoldco/promptuiimport is confined tolibs/cmdio/prompt.goandlibs/cmdio/select.go; every other prompt and selection helper in the package builds on those two entry points.Test plan
databricks bundle runfrom a bundle with multiple resources triggers the resource picker (cmdio.Select).databricks secrets put-secret <scope> <key>triggers the masked secret prompt (cmdio.Secret).