feat: rename --show-all to --page-all and support it in page-size#238
feat: rename --show-all to --page-all and support it in page-size#238BartoszBlizniak merged 8 commits intomasterfrom
--show-all to --page-all and support it in page-size#238Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR renames the --show-all flag to --page-all (keeping --show-all as a deprecated alias for backwards compatibility) and introduces support for using -1 or * as values for --page-size to enable "show all results" behavior. The version is bumped from 1.9.4 to 1.9.5.
- Parameter and function signature updates across all affected modules (pagination, validators, commands, utilities)
- New
IntOrWildcardcustom Click type to accept integers or*wildcard (converted to-1) - Enhanced validation logic to handle wildcard usage and enforce mutual exclusivity with explicit pagination parameters
- Comprehensive test updates to reflect the new naming convention
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cloudsmith_cli/data/VERSION | Version bump to 1.9.5 |
| .bumpversion.cfg | Updated version configuration to 1.9.5 |
| cloudsmith_cli/core/pagination.py | Renamed show_all parameter to page_all throughout, updated comments and docstrings |
| cloudsmith_cli/cli/validators.py | Added IntOrWildcard type, renamed enforce_show_all_exclusive to enforce_page_all_exclusive, enhanced validation for wildcard usage |
| cloudsmith_cli/cli/decorators.py | Updated --page-all option with --show-all alias, changed --page-size to use IntOrWildcard type, added wildcard handling logic |
| cloudsmith_cli/cli/utils.py | Renamed show_all parameter to page_all in pretty_print_list_info |
| cloudsmith_cli/cli/commands/upstream.py | Updated function signatures and calls to use page_all instead of show_all |
| cloudsmith_cli/cli/commands/repos.py | Updated function signatures and calls to use page_all instead of show_all |
| cloudsmith_cli/cli/commands/policy/vulnerability.py | Updated function signatures and calls to use page_all instead of show_all |
| cloudsmith_cli/cli/commands/policy/license.py | Updated function signatures and calls to use page_all instead of show_all |
| cloudsmith_cli/cli/commands/list_.py | Updated function signatures and calls to use page_all instead of show_all |
| cloudsmith_cli/cli/tests/commands/test_upstream.py | Updated test cases to use --page-all instead of --show-all |
| cloudsmith_cli/cli/tests/commands/test_repos.py | Updated test cases to use --page-all and added test for --page-size -1 |
| cloudsmith_cli/cli/tests/commands/test_package_commands.py | Updated test case to use --page-all instead of --show-all |
| cloudsmith_cli/cli/tests/commands/policy/test_vulnerability.py | Updated test cases and added test for --page-size * wildcard usage |
| cloudsmith_cli/cli/tests/commands/policy/test_licence.py | Updated test cases to use --page-all instead of --show-all |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chrisimcevoy
left a comment
There was a problem hiding this comment.
Can we add tests which exercise the alias?
Eagle eye - added to licesnse test |
|
Latest changes include:
I've also noticed a race condition when parallel testing the deny rules where instance would perform tests against the same org, due to forcing uniqueness on the query string for deny rules, this resulted in |
This PR changes occurrences of
--show-allflag to--page-all, renaming internal references and tests to reflect this change. This change was introduced in response to internal feedback to maintain consistency in the language used in commands across the pagination features.--show-allcommand is now an alias for--page-allto ensure backward compatability from previous release.This change also introduces the possibility to pass either
-1or*(which will convert it to-1behind the scenes) to--page-size(or its shortcut-l).