mirror of
https://github.com/apache/superset.git
synced 2026-05-27 02:35:13 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
7
.github/workflows/bashlib.sh
vendored
7
.github/workflows/bashlib.sh
vendored
@@ -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:<port>` 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}/
|
||||
|
||||
Reference in New Issue
Block a user