refactor: Migrate IP Block API handlers to use WithTx transaction helper#474
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughRefactors IPBlock handlers to use higher-level transaction helpers ( ChangesTransaction Management Abstraction
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-05-04 04:15:57 UTC | Commit: af3bef3 |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
thossain-nv
left a comment
There was a problem hiding this comment.
Looks good, thank you @chet
Apply `WithTx` (from NVIDIA#462) to the Create/Update/Delete `ipblock` handlers, where: - Create uses `WithTx` with closure-captured `ipb`/`ssd` vars (since the returned tuple includes a `StatusDetail` alongside the `IPBlock`). - Update uses `WithTxResult` returning the `IPBlock` with closure-captured status details. - Delete uses `WithTx` for the `IPBlock` row delete plus IPAM entry cleanup. Signed-off-by: Chet Nichols III <chetn@nvidia.com>
Description
Apply
WithTx(from #462) to the Create/Update/Deleteipblockhandlers, where:WithTxwith closure-capturedipb/ssdvars (since the returned tuple includes aStatusDetailalongside theIPBlock).WithTxResultreturning theIPBlockwith closure-captured status details.WithTxfor theIPBlockrow delete plus IPAM entry cleanup.Keeping these PRs smaller and tightly scoped so they're:
Signed-off-by: Chet Nichols III chetn@nvidia.com
Type of Change
Services Affected
Related Issues (Optional)
Breaking Changes
Testing
Additional Notes