ci(playwright): surface logs when a fast-env container exits during startup - #33177
Conversation
…tartup `docker compose ps -q` lists only running containers, so a service that exits right after `up` yields an empty id. `docker inspect ""` then aborts the script under `set -e` before the existing `docker logs` branch runs, and the cleanup trap removes the container, losing the only evidence of why it died. Seen on merge-queue run 34515976437 (chromium-20): OpenSearch exited ~2s after start and the step failed with "invalid container name or ID: value is empty". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ ApprovedImproves container diagnostics in Playwright CI by using OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 44m 31s ⏱️ Max setup 4m 26s · max shard execution 13m 3s · max shard-job elapsed before upload 17m 30s · reporting 3s 🌐 226.24 requests/attempt · 2.24 app boots/UI scenario · 15.33% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Summary
Merge-queue run 34515976437 dropped #32710 because shard
chromium-20failed in Restore fast Playwright environment before any test ran:OpenSearch exited ~2s after
docker compose up.docker compose ps -qonly lists running containers, so the lookup returned an empty id,docker inspect ""aborted the script underset -e, and the cleanup trap then removed the containers — so why OpenSearch exited was never captured.Fix
ps -a -q, so an exited container still resolves. It then reportsunhealthy, falls into the existingdocker logs+ "did not become healthy" branch, and the next occurrence tells us the actual cause.Test plan
ps -q→ empty,ps -a -q→ container id;docker inspecton it →unhealthy,docker logs→ the container's output.pytest .github/scripts/tests/test_playwright_ci_planning.py .github/scripts/tests/test_playwright_cache_assets.py— 127 passed.bash -n+shellcheckclean on the changed lines.Notes
FIXTURE_PREFIXES(playwright_cache_fingerprint.py), so this changes the fixture fingerprint → one golden-fixture rebuild after merge.timeout) before its logs are dumped. Could break early on.State.Running == falseif that turns out to matter.ci(playwright): …convention (as in ci(playwright): route shared-helper changes to the specs that import them #33086 / ci(playwright): tighten fixture-cache fingerprint to seed-affecting paths #33061 / ci(playwright): retry shard-results upload under -retry name to sidestep 409 conflict #33046); metadata check bypassed viaskip-pr-checks.🤖 Generated with Claude Code