Skip to content

replace commands that use Run to use RunE#679

Open
bhavyaKhatri2703 wants to merge 9 commits intogoharbor:mainfrom
bhavyaKhatri2703:refactor/replace-Run-commands-with-RunE
Open

replace commands that use Run to use RunE#679
bhavyaKhatri2703 wants to merge 9 commits intogoharbor:mainfrom
bhavyaKhatri2703:refactor/replace-Run-commands-with-RunE

Conversation

@bhavyaKhatri2703
Copy link

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

Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703 bhavyaKhatri2703 force-pushed the refactor/replace-Run-commands-with-RunE branch from 24f5850 to f13e913 Compare February 6, 2026 10:13
@rshdhere
Copy link

rshdhere commented Feb 6, 2026

@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
Copy link

rshdhere commented Feb 6, 2026

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
Author

understood thanks for sharing @rshdhere

Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: Bhavya Khatri <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703
Copy link
Author

can someone help me with these checks?

Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 1.77515% with 166 lines in your changes missing coverage. Please review.
✅ Project coverage is 7.25%. Comparing base (60ad0bd) to head (76761fc).
⚠️ Report is 95 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/logs.go 0.00% 11 Missing ⚠️
cmd/harbor/root/user/delete.go 0.00% 10 Missing ⚠️
cmd/harbor/root/project/robot/refresh.go 0.00% 8 Missing ⚠️
cmd/harbor/root/project/robot/update.go 0.00% 8 Missing ⚠️
cmd/harbor/root/user/elevate.go 0.00% 8 Missing ⚠️
cmd/harbor/root/robot/refresh.go 0.00% 7 Missing ⚠️
cmd/harbor/root/context/switch.go 0.00% 5 Missing and 1 partial ⚠️
cmd/harbor/root/project/robot/view.go 0.00% 6 Missing ⚠️
cmd/harbor/root/quota/list.go 0.00% 6 Missing ⚠️
... and 20 more
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #679      +/-   ##
=========================================
- Coverage   10.99%   7.25%   -3.74%     
=========================================
  Files         173     260      +87     
  Lines        8671   12909    +4238     
=========================================
- Hits          953     936      -17     
- Misses       7612   11865    +4253     
- Partials      106     108       +2     

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

Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703
Copy link
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

Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703
Copy link
Author

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

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

done

Copy link
Contributor

@NucleoFusion NucleoFusion left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Collaborator

@bupd bupd left a comment

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.

Signed-off-by: Bhavya Khatri <khatribhavya2703@gmail.com>
Signed-off-by: bhavyakhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703
Copy link
Author

@bhavyaKhatri2703 please resolve conflicts

Thanks for the contribution.

@bupd resolved, thanks

I think lint is failing maybe because of issues in main

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

Labels

None yet

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

4 participants