Skip to content

Prompt users on instance operations#2547

Draft
cjreynol wants to merge 14 commits into
google:mainfrom
cjreynol:prompt_for_instance_operations
Draft

Prompt users on instance operations#2547
cjreynol wants to merge 14 commits into
google:mainfrom
cjreynol:prompt_for_instance_operations

Conversation

@cjreynol
Copy link
Copy Markdown
Collaborator

When an instance-focused operation (logs) is not given selectors, then have cvd prompt the user to select an instance rather than failing. This matches what we do for group-focused operations (remove).

Bug: 511316553

@cjreynol cjreynol self-assigned this May 12, 2026
@cjreynol cjreynol force-pushed the prompt_for_instance_operations branch 2 times, most recently from 4e8b947 to 0367db2 Compare May 13, 2026 00:38
@cjreynol cjreynol force-pushed the prompt_for_instance_operations branch 3 times, most recently from 8a0abdd to 9af976a Compare June 3, 2026 00:11
cjreynol added 14 commits June 3, 2026 12:03
To behave like `FindGroupOrDefault`, to help set up prompting for
instances.

Bug: 511316553
Likely it was intended to support setting the filter based on the value
of the environment variable, but there does not seem to be a problem
with the value being unused.  The flags are still available, so no
filtering functionality is lost
The previous logic was relying upon knowing the behavior of the helpers
to be aware the `Result` returned was signaling too many groups being
returned.  That is somewhat overloading the meaning of a `Result`, and
not clear to potential future refactors that specific behavior was being
relied upon.  The new logic is explicit about the various cases.

Bug: 511316553
The same idea as the previous `SelectGroup` commit, stop relying on
implicit behavior from helpers and trying to signal certain caes through
`Result` returning, and be explicit about the various cases.

Bug: 511316553
Need to refactor some of the logic in `PromptUserForGroup` to allow it
to be re-used for instance selection.

Bug: 511316553
And remove the ability to type in group/instance names during selection
steps.
@cjreynol cjreynol force-pushed the prompt_for_instance_operations branch from f496d80 to a294e4e Compare June 3, 2026 19:07
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.

1 participant