refac: Update harbor package and health check - #616
Conversation
Signed-off-by: vg006 <devvg006@gmail.com>
|
Warning Review limit reached
Next review available in: 32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Harbor health check moved from ChangesHarbor health integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #616 +/- ##
=======================================
Coverage ? 20.21%
=======================================
Files ? 130
Lines ? 14084
Branches ? 0
=======================================
Hits ? 2847
Misses ? 10959
Partials ? 278
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: vg006 <devvg006@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: vg006 <devvg006@gmail.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/groundcontrol/harbor/health.go (1)
24-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd health-check tests for healthy, unhealthy, ignored, request-error, five-second timeout, and
SKIP_HARBOR_HEALTH_CHECKcases.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/groundcontrol/harbor/health.go` around lines 24 - 75, Add focused tests for CheckHealth and checkHealth covering healthy components, unhealthy components, ignored components, request errors, the default five-second timeout, and SKIP_HARBOR_HEALTH_CHECK=true. Use the existing Harbor health client/API seams and environment configuration symbols to verify each outcome without changing production behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/groundcontrol/harbor/health.go`:
- Around line 24-75: Add focused tests for CheckHealth and checkHealth covering
healthy components, unhealthy components, ignored components, request errors,
the default five-second timeout, and SKIP_HARBOR_HEALTH_CHECK=true. Use the
existing Harbor health client/API seams and environment configuration symbols to
verify each outcome without changing production behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1b41f353-995a-4535-8233-316039fe7335
📒 Files selected for processing (4)
cmd/groundcontrol/server/main.gointernal/groundcontrol/harbor/health.gointernal/groundcontrol/harborhealth/check.gointernal/groundcontrol/harborhealth/types.go
💤 Files with no reviewable changes (2)
- internal/groundcontrol/harborhealth/check.go
- internal/groundcontrol/harborhealth/types.go
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/groundcontrol/harbor/health.go">
<violation number="1" location="internal/groundcontrol/harbor/health.go:31">
P2: This change silently disables TLS certificate verification for the Harbor health check. NewClientSet with Insecure unset leaves the transport nil, and go-client's ToV2Config falls back to InsecureTransport (InsecureSkipVerify: true), whereas the previous v2client.New call used go-openapi's default secure transport. Set ClientSetConfig.Insecure explicitly to preserve the earlier verifying behavior.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Signed-off-by: vg006 <devvg006@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Description
This PR removes the
harborhealthpackage under Ground Control and merges it into the existingharborpackage. This gives us to reuse the existinggo-clientSDK for communicating with Harbor. So the same client could be used for health check operations.Summary by CodeRabbit
New Features
Bug Fixes