Repository navigation
fix(cli): accept --all on environments, organizations, and profiles list - #120
Open
thebrandonlucas wants to merge 2 commits into
Open
thebrandonlucas wants to merge 2 commits into
thebrandonlucas wants to merge 2 commits into
Conversation
tee8z
previously approved these changes
Oct 26, 2026
tee8z
left a comment
Contributor
There was a problem hiding this comment.
Looks good. One all_at_once_arg() serves the registry lists and the local lists. The tree walk in all_is_accepted_by_every_list_command keeps a future list from missing --all, and the second test covers the rejection path. The changelog and the Paging docs are updated.
thebrandonlucas
marked this pull request as ready for review
October 29, 2026 12:26
…ltage-cli-accept-all-on-environments-list-and-stop # Conflicts: # CHANGELOG.md
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.
Problem
voltage environments list --org ORG --allfailed with exit code 2:unexpected argument '--all' found. #94 made API lists without paging, such aswallets list, accept--alland ignore it. The local lists are clap-derived subcommands, not registry operations, so #94 did not reach them.organizations listandprofiles listhad the same failure.Change
environments list --allorganizations list --allprofiles list --allprofiles get NAME --all,context --allsrc/cli.rs: the--allargument from feat(cli): accept --all on lists that return every item at once #94 moves intoall_at_once_arg(). The registry lists and the two localListvariants (ListCommand::List,ProfileCommand::List) use it. The help text is now "No effect: this list shows every item at once", which is also true for the localprofiles list.all_is_accepted_by_every_list_commandwalks the whole command tree and fails if anylistsubcommand has no--all, so a new list cannot miss it.all_is_ignored_by_local_lists_and_rejected_by_other_local_commandstests the three local lists and the rejection path for local commands that are not lists. Both tests fail without the fix.CHANGELOG.md(Unreleased) anddocs/guides/requests.md(Paging) are updated.About
--wallet <UUID>in the usage lineThat usage line is not a real requirement. When clap suggests a similar flag (
--all→--wallet),Parser::did_you_mean_errorin clap_builder 4.6.7 adds the suggested argument to the matches "to build a proper usage string". So the usage line names the suggestion as if it were given.voltage environments list --walleshows the same line. Now that--allis accepted, this command no longer prints that suggestion. The clap behavior for other typos is out of scope here.Closes #119
Linear: DEV-2954
Checks
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo machete --with-metadata,cargo test --locked(199 unit + 149 integration tests pass),python3 scripts/check-coverage.py: all pass.environments list --allandorganizations list --allnow get past parsing and stop at the missing credential (exit 3).profiles get x --allis still rejected.scripts/crap-report.sh, cargo-llvm-cov 0.8.5, knots 1.16.0): 0 violations. The highest score is 18.10 (src/api.rswait_for_payment, unchanged). No function scores 20 or more.endpointinsrc/cli.rsis at 18.00 and this PR does not change it.voltage-pr-reviewself-review led to one fix: the help text no longer says "response", becauseprofiles listis local.