Skip to content

fix(replication): support positional log arguments#940

Open
rambhardwajj wants to merge 1 commit into
goharbor:mainfrom
rambhardwajj:fix/replication-log-positional-args
Open

fix(replication): support positional log arguments#940
rambhardwajj wants to merge 1 commit into
goharbor:mainfrom
rambhardwajj:fix/replication-log-positional-args

Conversation

@rambhardwajj
Copy link
Copy Markdown

Description

This pull request fixes the replication log command by allowing positional EXECUTION_ID and TASK_ID arguments as documented.

Previously, the command rejected positional arguments due to incorrect Cobra validation (MaximumNArgs(0)), creating a mismatch between the CLI behavior and its documentation.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation update
  • Chore / maintenance

Changes

  • Updated harbor replication log to accept the advertised positional EXECUTION_ID and TASK_ID arguments.
  • Added validation for invalid positional IDs and conflicts when IDs are provided both as flags and arguments.
  • Added focused tests for replication log positional argument handling.
  • Regenerated CLI Markdown and man page documentation with Dagger.

Signed-off-by: Ram Bhardwaj <rambhardwaj101000@gmail.com>
@qcserestipy
Copy link
Copy Markdown
Collaborator

Thank you for spotting the inconsistency in the usage docs. Instead of changing this much code please just change Use: "log [EXECUTION_ID] [TASK_ID]" since those are treated through flags. Minimal changes are always preferred and would not change already existing behavior.

Copy link
Copy Markdown
Collaborator

@qcserestipy qcserestipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just update docs

@qcserestipy qcserestipy added the Changes Requesed feedback that must be addressed before merging. label May 25, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.72%. Comparing base (60ad0bd) to head (23bb799).
⚠️ Report is 163 commits behind head on main.

Files with missing lines Patch % Lines
cmd/harbor/root/replication/logs.go 90.90% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #940      +/-   ##
=========================================
- Coverage   10.99%   8.72%   -2.27%     
=========================================
  Files         173     288     +115     
  Lines        8671   14461    +5790     
=========================================
+ Hits          953    1262     +309     
- Misses       7612   13081    +5469     
- Partials      106     118      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes Requesed feedback that must be addressed before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: replication log rejects advertised positional execution and task IDs

2 participants