fix(proxy): preserve preview activity updates#983
Conversation
11e3d68 to
fd6b1ff
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe proxy's last-activity update logic now uses a bounded, cancellation-ignoring context created via context.WithTimeout with a new activityUpdateTimeout constant, applied to cache checks, the BoxAPI update call, and cache set. A new test verifies the update completes despite request cancellation. ChangesActivity update timeout handling
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant GetProxyTarget
participant updateLastActivity
participant Cache
participant BoxAPI
Client->>GetProxyTarget: request (context ctx)
GetProxyTarget->>updateLastActivity: spawn goroutine with WithoutCancel(ctx)
Client--)GetProxyTarget: cancel request context
updateLastActivity->>updateLastActivity: create updateCtx = WithTimeout(activityUpdateTimeout)
updateLastActivity->>Cache: Has(updateCtx)
updateLastActivity->>BoxAPI: UpdateLastActivity(updateCtx)
updateLastActivity->>Cache: Set(updateCtx)
🚥 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 |
fd6b1ff to
6000dbf
Compare
📦 BoxLite review — looks good ·
|
Preserve preview activity updates after request completion while bounding each detached update attempt to 10 seconds.
Test plan:
cd apps && go test ./proxy/pkg/proxycd apps && go test -race ./proxy/pkg/proxymake lint:fixSummary by CodeRabbit