goharbor / goharbor/harbor-cli
[bug]: --page-size 0 does not fetch all results for some list commands
- Dominant language
- Go
- Stars
- 163
- Forks
- 211
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
## Description
`--page-size 0` is documented as “fetch all” for some list commands, but the behavior is inconsistent. Some commands fetch all pages correctly, while others only make a single API request with `page_size=0`, so results may be incomplete when more than one page exists.
Affected commands:
- `harbor replication policies list --page-size 0`
- `harbor replication executions list --page-size 0`
- `harbor quota list --page-size 0`
## Steps to Reproduce
1. Run command: `harbor replication policies list --page-size 0`
2. With a Harbor instance that has more than one page of replication policies
3. Observe that not all pages are fetched
## Expected Behavior
When --page-size 0 is used, the CLI should fetch all pages by repeatedly requesting pages until the final page is reached, consistent with commands like harbor project list and harbor user list.
## Actual Behavior
Some commands pass page_size=0 directly to the API and only perform one request, so the displayed output can miss additional pages.
## Environment
- OS: macOS
- Tool version: Harbor CLI main branch
- Other relevant details: Reproduces when the target Harbor resource has more than one page of results
## Additional Context
Logs, screenshots, or other useful information.
Contributor guide
Assessment
This issue has not been assessed yet.