Failover controller to support multicluster watches for reservations#625
Failover controller to support multicluster watches for reservations#625
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Test Coverage ReportTest Coverage 📊: 68.5% |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/scheduling/reservations/failover/controller.go (1)
777-779: Add context to setup error return.Line 778 currently returns the raw error. Wrapping it with setup context will make controller startup failures easier to triage in logs.
Proposed change
if err != nil { - return err + return fmt.Errorf("failed to register multicluster reservation watch: %w", err) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/scheduling/reservations/failover/controller.go` around lines 777 - 779, The current error return in the controller startup path just returns err; update the error handling around the if err != nil { return err } in the controller setup/startup function to wrap the error with contextual text (e.g., "controller setup failed" or "failed to initialize controller") using fmt.Errorf or the project's error wrapping helper, so logs show the setup context when startup fails.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@internal/scheduling/reservations/failover/controller.go`:
- Around line 777-779: The current error return in the controller startup path
just returns err; update the error handling around the if err != nil { return
err } in the controller setup/startup function to wrap the error with contextual
text (e.g., "controller setup failed" or "failed to initialize controller")
using fmt.Errorf or the project's error wrapping helper, so logs show the setup
context when startup fails.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 109147f9-af90-465f-b161-9b6f17181e93
📒 Files selected for processing (1)
internal/scheduling/reservations/failover/controller.go
No description provided.