fix: reject invalid page values in selected list commands#779
Open
PrasunaEnumarthy wants to merge 2 commits intogoharbor:mainfrom
Open
fix: reject invalid page values in selected list commands#779PrasunaEnumarthy wants to merge 2 commits intogoharbor:mainfrom
PrasunaEnumarthy wants to merge 2 commits intogoharbor:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #779 +/- ##
=========================================
- Coverage 10.99% 7.79% -3.20%
=========================================
Files 173 270 +97
Lines 8671 13175 +4504
=========================================
+ Hits 953 1027 +74
- Misses 7612 12035 +4423
- Partials 106 113 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
qcserestipy
requested changes
Apr 1, 2026
Author
|
Thanks, I’ll expand the validation to all commands that accept |
Signed-off-by: PrasunaEnumarthy <eswari.prasuna@gmail.com>
Signed-off-by: PrasunaEnumarthy <eswari.prasuna@gmail.com>
2a70a76 to
4766d04
Compare
Author
|
Thanks, I’ve updated the PR to add the '--page >= 1' validation to all commands that define go test ./cmd/harbor/root/artifact ./cmd/harbor/root/project ./cmd/harbor/root/registry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This pull request adds early validation for invalid
--pagevalues in selected list commands.Previously, some commands accepted invalid values such as
--page 0or negative page numbers and passed them to the API, which could lead to inconsistent behavior.This change ensures that invalid page values are rejected before making API calls, improving CLI reliability and consistency.
Type of Change
Please select the relevant type.
Changes
--page < 1in:harbor artifact listharbor project listharbor registry listharbor project logsfor consistency