Fix: Add routing for FlavorGroupCapacity CRD#824
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds FlavorGroupCapacityResourceRouter, registers it in DefaultResourceRouters for the cortex.cloud/v1alpha1 FlavorGroupCapacity GVK, and adds table-driven tests verifying availability-zone label presence, non-empty spec.availabilityZone, type checking (value or pointer), matching logic, and nil-safety. ChangesFlavorGroupCapacity Resource Router
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@pkg/multicluster/routers.go`:
- Line 137: The error string returned for FlavorGroupCapacity must start with a
lowercase letter; update the returned error in the routers.go return statement
to use a lowercase message such as "flavor group capacity does not have
availability zone in spec" (keeping the rest of the wording consistent with
peers like "committed resource does not have availability zone in spec") so the
error follows the linting guideline; locate the return that currently returns
errors.New("FlavorGroupCapacity does not have availability zone in spec") and
replace the message text accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 764eb5bc-2c81-45d7-bb74-9a544c0eedab
📒 Files selected for processing (2)
pkg/multicluster/routers.gopkg/multicluster/routers_test.go
Test Coverage ReportTest Coverage 📊: 69.0% |
No description provided.