From 87ca59c4559ccda1f9ef47125ffe55562bbf6e19 Mon Sep 17 00:00:00 2001 From: Joe Li Date: Wed, 20 May 2026 14:30:54 -0700 Subject: [PATCH] fix(embedded-e2e): force IPv4 base URL for Playwright CI `flask run` binds IPv4 only, but Node's DNS resolution for `localhost` on the GH runner can return `::1` (IPv6) first, surfacing as `connect ECONNREFUSED ::1:8081` once happy-eyeballs flips after the first read-reset. The embedded suite is uniquely exposed because it drives heavy Node-side API calls (CSRF + guest token) where the regular Playwright suite is browser-driven. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/bashlib.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bashlib.sh b/.github/workflows/bashlib.sh index 39dacd216ed..e53574fd11e 100644 --- a/.github/workflows/bashlib.sh +++ b/.github/workflows/bashlib.sh @@ -237,7 +237,12 @@ playwright-run() { cd "$GITHUB_WORKSPACE" local flasklog="${HOME}/flask-playwright.log" local port=8081 - PLAYWRIGHT_BASE_URL="http://localhost:${port}" + # Use 127.0.0.1 explicitly: `flask run` binds IPv4 only, and Node's DNS + # resolution for `localhost` can return `::1` first (IPv6), which then + # refuses against the IPv4 listener and surfaces as + # `connect ECONNREFUSED ::1:` in API helpers driven from Node + # (e.g., the embedded test app's exposed token fetcher). + PLAYWRIGHT_BASE_URL="http://127.0.0.1:${port}" if [ -n "$APP_ROOT" ]; then export SUPERSET_APP_ROOT=$APP_ROOT PLAYWRIGHT_BASE_URL=${PLAYWRIGHT_BASE_URL}${APP_ROOT}/