feat: CR safeguards, throttle CRD creation, adding limit#884
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds configurable slot-creation pacing and per-commitment slot limits to reservation creation, refactors flavor-selection, integrates a monitor for slot-limit rejections, exposes Helm values, and extends tests for the new behaviors. ChangesReservation Slot Creation Throttling and Limits
Sequence DiagramsequenceDiagram
participant CommittedResourceController
participant ReservationManager
participant API_Server
participant CRControllerMonitor
CommittedResourceController->>ReservationManager: ApplyCommitmentState(ctx, cr)
ReservationManager->>ReservationManager: countNewSlots(deltaMemoryBytes)
alt newSlots > MaxSlots
ReservationManager-->>CommittedResourceController: SlotLimitExceededError
CommittedResourceController->>CRControllerMonitor: RecordSlotLimitRejection(flavorGroup, az)
else within limit
loop create slots
ReservationManager->>API_Server: Create Reservation CRD (flavor, memory, cpu)
API_Server-->>ReservationManager: Created
alt SlotCreationDelay > 0 and more slots
ReservationManager->>ReservationManager: wait SlotCreationDelay or ctx.Done()
end
end
ReservationManager-->>CommittedResourceController: success
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Test Coverage ReportTest Coverage 📊: 69.7% |
Two safeguards to prevent a burst of Reservation CRD creates from overwhelming the scheduler on large commitments.