Calls v1: Fix silent handleReconnect failures [MM-70184] - #1283
Calls v1: Fix silent handleReconnect failures [MM-70184]#1283bgardner8008 wants to merge 1 commit into
Conversation
When handleReconnect fails, the client now receives wsEventError so it can fall back to a clean rejoin instead of silently retrying until its 30s reconnect budget expires. Also switches getCallState to read from the writer DB (fromWriter=true), matching MM-69201's fix for the same replica-lag class of failure that caused "no call ongoing" / "session not found" errors during pod rolls.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughReconnect handling now loads enabled call state. Invalid reconnect requests are tested. Reconnect failures now send reliable ChangesReconnect handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change reports reconnect failures to clients and reads reconnect state from the writer database, improving recovery behavior without any supplied current-head merge-blocking risk; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1283 +/- ##
==========================================
+ Coverage 28.26% 35.50% +7.24%
==========================================
Files 240 250 +10
Lines 13862 14294 +432
Branches 1643 1730 +87
==========================================
+ Hits 3918 5075 +1157
+ Misses 9501 8598 -903
- Partials 443 621 +178
🚀 New features to boost your workflow:
|
Summary
wsEventErrorback to the client whenhandleReconnectfails, so the client can fall back to a clean rejoin instead of silently retrying until its 30s reconnect budget expires and the session is orphaned.getCallStateinhandleReconnectto read from the writer DB (fromWriter=true), fixing the replica-lag variant of the failure ("no call ongoing" / "session not found") that was the most common cause observed on the community hub during rolling deploys.See MM-70184 for the full analysis, hub log evidence, and companion ticket MM-70185.
Test plan
TestHandleReconnect(5 subtests) covers thehandleReconnecterror paths directly: forbidden, no call ongoing, session not found, session belonging to a different user, and already-reconnected.TestWebSocketMessageHasBeenPostedReconnectErrorverifies thatwsEventErroris published to the client's connection ID when the reconnect goroutine fails.make golangci-lintclean; fullgo test ./server/...passes.