Skip to content

replace commands that use Run to use RunE#679

Merged
bupd merged 26 commits into
goharbor:mainfrom
bhavyaKhatri2703:refactor/replace-Run-commands-with-RunE
Mar 31, 2026
Merged

replace commands that use Run to use RunE#679
bupd merged 26 commits into
goharbor:mainfrom
bhavyaKhatri2703:refactor/replace-Run-commands-with-RunE

Conversation

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor

fixes #675
replaced older commands from Run to RunE with errors being returned properly instead of jusing log.

@bhavyaKhatri2703 bhavyaKhatri2703 force-pushed the refactor/replace-Run-commands-with-RunE branch from 24f5850 to f13e913 Compare February 6, 2026 10:13
@rshdhere

rshdhere commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@bhavyaKhatri2703 I see your commit messages. it's looking good, but follow contributing.md which has proper format for commit messages

ig dont need for this PR but do consider it in the upcoming PRs

@rshdhere

rshdhere commented Feb 6, 2026

Copy link
Copy Markdown
Contributor
image here's a reference for you, from the official contributing md file. you dont have to force-push it again if you follow this

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

understood thanks for sharing @rshdhere

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

can someone help me with these checks?

@codecov

codecov Bot commented Feb 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 2.09790% with 140 lines in your changes missing coverage. Please review.
✅ Project coverage is 7.80%. Comparing base (60ad0bd) to head (a6c14ed).
⚠️ Report is 121 commits behind head on main.

Files with missing lines Patch % Lines
cmd/harbor/root/tag/immutable/list.go 0.00% 15 Missing ⚠️
cmd/harbor/root/project/robot/update.go 0.00% 10 Missing ⚠️
cmd/harbor/root/project/robot/refresh.go 0.00% 8 Missing ⚠️
cmd/harbor/root/project/robot/view.go 0.00% 8 Missing ⚠️
cmd/harbor/root/user/delete.go 0.00% 7 Missing ⚠️
cmd/harbor/root/user/password.go 0.00% 6 Missing and 1 partial ⚠️
cmd/harbor/root/context/switch.go 0.00% 5 Missing and 1 partial ⚠️
cmd/harbor/root/quota/list.go 0.00% 6 Missing ⚠️
cmd/harbor/root/quota/update.go 0.00% 6 Missing ⚠️
cmd/harbor/root/repository/view.go 0.00% 6 Missing ⚠️
... and 16 more
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #679      +/-   ##
=========================================
- Coverage   10.99%   7.80%   -3.19%     
=========================================
  Files         173     270      +97     
  Lines        8671   13166    +4495     
=========================================
+ Hits          953    1028      +75     
- Misses       7612   12025    +4413     
- Partials      106     113       +7     

☔ 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.

@NucleoFusion

Copy link
Copy Markdown
Contributor

So right now, lint is failing. Which probably will be fixed if you run this

dagger call run-doc export --path=./doc

@NucleoFusion

Copy link
Copy Markdown
Contributor

Also, could you remove changes to the artifact directory? It seems to have some different format errors as well.
So It would be better if I address the refactor and the RunE usage in a seperate PR (that I will create). and not have any merge conflicts here

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

Also, could you remove changes to the artifact directory? It seems to have some different format errors as well. So It would be better if I address the refactor and the RunE usage in a seperate PR (that I will create). and not have any merge conflicts here

done

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

So right now, lint is failing. Which probably will be fixed if you run this

dagger call run-doc export --path=./doc

done

@NucleoFusion NucleoFusion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@bhavyaKhatri2703 please resolve conflicts

Thanks for the contribution.

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

@bhavyaKhatri2703 please resolve conflicts

Thanks for the contribution.

@bupd resolved, thanks

I think lint is failing maybe because of issues in main

@bupd

bupd commented Mar 3, 2026

Copy link
Copy Markdown
Member

@bhavyaKhatri2703 lint issue in main is fixed - please resolve conflicts

Thanks for the contribution

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please rebase onto main

Thanks

@bupd bupd added the Changes Requesed feedback that must be addressed before merging. label Mar 3, 2026
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703 bhavyaKhatri2703 force-pushed the refactor/replace-Run-commands-with-RunE branch from 76761fc to 71bf620 Compare March 3, 2026 15:59
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703 bhavyaKhatri2703 requested a review from bupd March 3, 2026 16:54
@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

@bupd pls have a look now , thanks.

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like irrelevant doc changes have been made please fix that

Thanks

Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: Bhavya Khatri <khatribhavya2703@gmail.com>
@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

can someone help me with docs generation?
when i generate docs via dagger call run-doc export --path=./doc
it introduces these whitespace changes d8e4fe0

When i try to revert them back manually lints get failed.

@NucleoFusion

Copy link
Copy Markdown
Contributor

@bhavyaKhatri2703 let the doc changes be, just run run-doc and push it.
run-doc is supposed to change to tell the lint checker that docs have been changed

Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

@bupd let me know if there are still unwanted changes?

@bhavyaKhatri2703 bhavyaKhatri2703 requested a review from bupd March 9, 2026 17:37
bhavyaKhatri2703 and others added 2 commits March 15, 2026 19:26

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please fix the ci - test-code pipeline is failing

otherwise LGTM

@bhavyaKhatri2703 Thanks for the contribution

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

Please fix the ci - test-code pipeline is failing

otherwise LGTM

@bhavyaKhatri2703 Thanks for the contribution

fixed now.

@qcserestipy qcserestipy self-requested a review March 25, 2026 15:55

@qcserestipy qcserestipy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@bupd bupd merged commit ad44911 into goharbor:main Mar 31, 2026
6 of 8 checks passed
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.

refactor: Replace commands that use Run to use the RunE from cobra

5 participants