Skip to content

[bug]: --page-size 0 does not fetch all results for some list commands #945

@rambhardwajj

Description

@rambhardwajj

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 <policy-id> --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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions