Skip to content

fix(e2e): retry intercepted fetches that lose a pooled connection (1.7 backport) - #1346

Merged
scttbnsn merged 1 commit into
dev/v1.7from
test/v1.7-playwright-route-fetch-retry
Oct 8, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.7from
test/v1.7-playwright-route-fetch-retry

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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.20 cut. Run 37846590189 on main had 1 of 33 fail at v16-modes-pins.spec.ts:284, the cut stopped at its Playwright wait, and a rerun of the same job passed. The GA cut pushes to main again, so it would be exposed to the same flake.

Same change as 1.8: intercepted fetches go through fetchIntercepted, which sets maxRetries. Two conflicts resolved by hand. v16-modes-pins.spec.ts keeps 1.7's own fixture lookup and only gains the helper import, since 1.7 has no container-fixture helper. The changelog bullet goes under Unreleased.

Tests: e2e/tests/route-fetch.test.js 2/2, full pre-push gate green. Test-only, nothing under app/ or ui/ changes.

Changelog

  • ✨ Added fetchIntercepted(route) with maxRetries: 2 for intercepted Playwright requests.
  • 🔧 Updated the v1.6 mobile and pins specs to use the helper.
  • 🐛 Added tests for retrying after a pooled connection closes and for preventing direct route.fetch() calls in Playwright specs.

Concerns

  • None identified from the supplied diff.

Test status

  • The author reports that e2e/tests/route-fetch.test.js passed 2/2 and the full pre-push gate passed.

)

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)
@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
drydock-website Ready Ready Preview Oct 8, 2026 10:54pm UTC
drydockdemo-website Ready Ready Preview Oct 8, 2026 10:54pm UTC

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: CodesWhat/drydock/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7180fd06-cee4-4feb-b340-aa8bfc036f1f
📥 Commits

Reviewing files that changed from the base of the PR and between 2344274 and 7736f72.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (4)
  • e2e/playwright/helpers/route-fetch.mjs
  • e2e/playwright/v16-mobile.spec.ts
  • e2e/playwright/v16-modes-pins.spec.ts
  • e2e/tests/route-fetch.test.js

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

Adds fetchIntercepted(route) with maxRetries set to 2. Updates two v1.6 Playwright specs to use the helper. Adds tests for a reused-connection failure and successful helper fetches, plus a source scan for direct route.fetch() calls.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 7736f

The backport is mergeable after normal checks; no actionable issue is established by the supplied evidence.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn merged commit a65119e into dev/v1.7 Oct 8, 2026
@scttbnsn
scttbnsn deleted the test/v1.7-playwright-route-fetch-retry branch October 8, 2026 23:17

This branch was successfully deployed

2 active deployments
Preview – drydock-website — 7736f725 Deployed Oct 8, 2026 by vercel[bot]
Preview – drydockdemo-website — 7736f725 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant