Interrupt Bridge HTTP backoff when the context is cancelled - #88
Hanabi9248 wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesRetry cancellation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Cancellation can interrupt the retry delay, and no merge-blocking issue is identified from the supplied evidence. 🚥 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 |
|
Could a maintainer review this cancellation change and approve the pending workflows when convenient? The bridge package tests and go vet pass locally; the regression checks that a 100 ms deadline interrupts a 3-second retry delay. The three upstream workflows are still awaiting approval, so I have not treated them as passed. Please let me know if anything else is needed before considering a merge. |
Checklist:
Type of Changes:
Current behavior
With
BridgeIdentifiersenabled, a failed installation request can keep the reconciler waiting after its context is cancelled. The HTTP request uses the context, butwait.ExponentialBackoffdoes not interrupt the delay between attempts. The existing cancellation test checks the eventual error without bounding that delay.New behavior
Use
ExponentialBackoffWithContextso cancellation also interrupts the retry delay. Request headers, idempotency keys and response cleanup are unchanged. The new local HTTP-server regression uses a 100 ms deadline and a 3-second backoff: the original code returns after about 3 seconds and fails; the fix returns at the deadline.Validation
go test ./internal/bridge -count=1— passed (7 top-level tests).go vet ./internal/bridgeandgit diff --check— passed.BridgeIdentifiersremains disabled by default.Summary by CodeRabbit