goharbor / goharbor/harbor-cli
[bug]: replication log rejects advertised positional execution and task IDs
- Dominant language
- Go
- Stars
- 163
- Forks
- 211
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
## Description
The replication log command advertises support for positional EXECUTION_ID and TASK_ID arguments, but the command currently rejects them due to incorrect Cobra argument validation.
This change updates the command to properly accept and validate up to two positional arguments, matching the documented CLI behavior.
## Steps to Reproduce
1. Run command: `harbor replication log 123 456`
2. Observe error: `Error: accepts at most 0 arg(s), received`
## Expected Behavior
The command should accept positional EXECUTION_ID and TASK_ID arguments as documented.
## Actual Behavior
Cobra argument validation rejects positional arguments before the command execution flow runs.
## Environment
- OS: macOS / Darwin arm64
- Tool version: Harbor CLI current main branch
- Go version: go1.26.2 darwin/arm64
## Additional Context
The command usage and generated docs currently advertise:
harbor replication log [EXECUTION_ID] [TASK_ID]. However, the command was configured with: Args: cobra.MaximumNArgs(0) which prevents positional arguments from being used at runtime.
Contributor guide
Assessment
This issue has not been assessed yet.