diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 98853a3..7525649 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -31,6 +31,21 @@ jobs: docker network inspect flight-ci-e2e --format 'containers on flight-ci-e2e: {{range .Containers}}{{.Name}} {{end}}' echo "E2E_BASE_URL=http://app:3000" >> "$GITHUB_ENV" + # Non-fatal DNS diagnostics (runner outbound DNS is flaky — EAI_AGAIN seen in CI): + # logs job-container vs daemon-side resolver config + per-host lookups so the next + # failure shows which layer is broken. Every probe is guarded; this step never fails. + - name: DNS diagnostics + run: | + set -u + echo '=== job container ===' + cat /etc/resolv.conf || echo 'resolv.conf FAILED' + for h in registry.npmjs.org cdn.playwright.dev github.com docker.io; do + getent hosts "$h" >/dev/null 2>&1 && echo "getent $h OK" || echo "getent $h FAILED" + done + curl -so /dev/null --max-time 10 -w 'registry.npmjs.org https %{time_total}s\n' https://registry.npmjs.org || echo 'curl registry FAILED' + echo '=== daemon-side (default bridge) ===' + timeout 90 docker run --rm alpine sh -c 'cat /etc/resolv.conf; nslookup registry.npmjs.org >/dev/null 2>&1 && echo "daemon-bridge DNS OK" || echo "daemon-bridge DNS FAILED"' || echo 'daemon-side probe FAILED' + - name: Setup Node uses: actions/setup-node@v4 with: @@ -38,17 +53,9 @@ jobs: # bun drives installs (repo ships bun.lock, no package-lock.json); pinned to the # same major as oven/bun in the Dockerfile. - # Retried: the runner's outbound network/DNS is flaky (transient EAI_AGAIN seen in CI). - name: Install bun run: | - set -u - ok=0 - for i in 1 2 3; do - if npm i -g bun@1.4.2; then ok=1; break; fi - echo "::warning::bun install attempt $i/3 failed (likely transient network) — retrying in 5s" >&2 - sleep 5 - done - [ "$ok" = "1" ] || { echo "::error::bun install failed after 3 attempts" >&2; exit 1; } + npm i -g bun@1.4.2 bun --version # Job-level dep cache via the runner's built-in cache server. continue-on-error on @@ -62,17 +69,8 @@ jobs: $HOME/.bun/install/cache key: ${{ runner.os }}-deps-bun-${{ hashFiles('bun.lock') }} - # Retried: the runner's outbound network/DNS is flaky (transient EAI_AGAIN seen in CI). - name: Install dependencies - run: | - set -u - ok=0 - for i in 1 2 3; do - if bun install --frozen-lockfile; then ok=1; break; fi - echo "::warning::dependency install attempt $i/3 failed (likely transient network) — retrying in 5s" >&2 - sleep 5 - done - [ "$ok" = "1" ] || { echo "::error::dependency install failed after 3 attempts" >&2; exit 1; } + run: bun install --frozen-lockfile - name: Save deps cache uses: actions/cache@v4 @@ -95,19 +93,6 @@ jobs: - name: Install browsers (local) run: npx playwright install --with-deps chromium - # Pre-build the e2e image with retries (flaky runner network); the E2E step's own - # build then becomes a fast no-op. Plain progress keeps BuildKit output visible. - - name: Build e2e image (retries) - run: | - set -u - ok=0 - for i in 1 2 3; do - if docker compose -f docker-compose.ci.yml -p flight-ci build --progress=plain; then ok=1; break; fi - echo "::warning::e2e image build attempt $i/3 failed (likely transient network) — retrying in 5s" >&2 - sleep 5 - done - [ "$ok" = "1" ] || { echo "::error::e2e image build failed after 3 attempts" >&2; exit 1; } - # E2E against an isolated stack on the shared daemon — never the production instance. # docker-compose.ci.yml joins the flight-ci-e2e network prepared above; project name # flight-ci keeps it distinct from production. E2E_DEPLOY_CMD makes the config's diff --git a/CHANGELOG.md b/CHANGELOG.md index 86c10e3..ade69eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - **@playwright/test pinned as devDependency** (`1.63.0`, matching the shared remote browser server image and the global install) so CI is self-contained; still excluded from the runtime image via .dockerignore (comment updated), prod-deps stage unaffected - `AGENTS.md`: "Change process" + "E2E tests" rewritten for the PR workflow — feature branch off master → commits with CHANGELOG entry + version bump → PR to master → CI (build→unit→e2e) green → merge → tag on master → manual production deploy via `docker compose up -d --build`; no direct pushes to master, CI never deploys - **CI build reliability + caching** (after first dind runs): the e2e image is now built with `--progress=plain` before `up -d` so BuildKit step output lands in job logs instead of being hidden by auto progress; Dockerfile bun installs use a BuildKit cache mount (`/root/.bun/install/cache`) that persists on the runner's shared daemon, and CI restores/saves node_modules + the bun cache via actions/cache around dependency install (both steps `continue-on-error` — safe while the runner's cache server is being fixed) -- **CI retry wrappers for the flaky runner network/DNS** (transient EAI_AGAIN failures seen in runs #10/#11): bun install, dependency install and the e2e image build each retry up to 3× with 5s between attempts before failing; the image is pre-built by a dedicated retried step so the E2E step's own build becomes a fast no-op +- **CI DNS diagnostics, retries removed** (transient EAI_AGAIN failures seen in runs #10/#11): retry wrappers around bun/dep install and the e2e image build were dropped — the flaky runner DNS is a config problem to be fixed on the runner side, not papered over; instead a non-fatal "DNS diagnostics" step logs job-container vs daemon-side resolver config plus per-host lookups (registry.npmjs.org, cdn.playwright.dev, github.com, docker.io) so the next flaky run shows exactly which layer is broken - Verified: unit suite 234 green locally; e2e not run locally by design (would deploy to production) — first real pass happens in the PR's CI run ## v0.12.2 — 2026-09-18 14:06