Repository navigation
fix(e2e): retry intercepted fetches that lose a pooled connection (1.7 backport) - #1346
Conversation
) The stabilization countdown test failed now and then with "route.fetch: socket hang up" on GET /api/v1/containers. route.fetch() runs on Playwright's Node HTTP client, which pools keep-alive connections and never expires them. The server closes an idle connection 6 s after its last response (Node's 5 s keep-alive timeout plus its 1 s buffer). The containers page loads its list twice at once, so the second fetch takes the pooled connection the previous test's pair left idle, and #325 leaves it idle for 4.7 to 6.2 s. When that lands on 6 s the server drops the connection with the request on it. Intercepted fetches now go through a helper that sets maxRetries, which resends after a connection reset the way a browser already does. A support test drops a reused connection to cover the resend and keeps specs off a bare route.fetch(). (cherry picked from commit 94b71a2)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughAdds Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to The backport is mergeable after normal checks; no actionable issue is established by the supplied evidence. 🚥 Pre-merge checks | ✅ 2✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Backport of #1332 to 1.7. The Playwright suite fails now and then with
route.fetch: socket hang up: the server closes an idle keep-alive connection six seconds after its last response, Playwright's request client never expires pooled ones, and a fetch that reuses one right on that boundary gets dropped.It failed the first
v1.7.0-rc.20cut. Run 37846590189 onmainhad 1 of 33 fail atv16-modes-pins.spec.ts:284, the cut stopped at its Playwright wait, and a rerun of the same job passed. The GA cut pushes tomainagain, so it would be exposed to the same flake.Same change as 1.8: intercepted fetches go through
fetchIntercepted, which setsmaxRetries. Two conflicts resolved by hand.v16-modes-pins.spec.tskeeps 1.7's own fixture lookup and only gains the helper import, since 1.7 has nocontainer-fixturehelper. The changelog bullet goes under Unreleased.Tests:
e2e/tests/route-fetch.test.js2/2, full pre-push gate green. Test-only, nothing underapp/orui/changes.Changelog
fetchIntercepted(route)withmaxRetries: 2for intercepted Playwright requests.route.fetch()calls in Playwright specs.Concerns
Test status
e2e/tests/route-fetch.test.jspassed 2/2 and the full pre-push gate passed.