Skip to content

ci(playwright): surface logs when a fast-env container exits during startup - #33177

Merged
ShaileshParmar11 merged 1 commit into
mainfrom
ci-playwright-fast-env-exited-container
Sep 11, 2026
Merged

ShaileshParmar11 merged 1 commit into
mainfrom
ci-playwright-fast-env-exited-container

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Merge-queue run 34515976437 dropped #32710 because shard chromium-20 failed in Restore fast Playwright environment before any test ran:

Container openmetadata_opensearch  Started
invalid container name or ID: value is empty
##[error]Process completed with exit code 1.

OpenSearch exited ~2s after docker compose up. docker compose ps -q only lists running containers, so the lookup returned an empty id, docker inspect "" aborted the script under set -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 reports unhealthy, falls into the existing docker logs + "did not become healthy" branch, and the next occurrence tells us the actual cause.

Test plan

  • Local repro (Docker 29.6 / Compose v5.3) with a service that exits immediately: ps -q → empty, ps -a -q → container id; docker inspect on 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 + shellcheck clean on the changed lines.

Notes

🤖 Generated with Claude Code

…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>
Copilot AI lite review requested due to automatic review settings September 11, 2026 05:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 11, 2026
@gitar-bot

gitar-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Improves container diagnostics in Playwright CI by using ps -a -q to capture exited containers during startup, enabling the script to surface logs that reveal why services like OpenSearch failed. No issues found.

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 4aaa469412e6dbd0849e345a8d60df9721b180ce in Playwright run 34564458149, attempt 1.

✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Common shard skew was 15.33% (convergence target: at most 15%).
  • Browser traffic was 226.24 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.24 per UI scenario (1292 boots / 578 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 127 0 0 0 0 0
✅ Shard chromium-02 138 0 0 0 0 0
✅ Shard chromium-03 134 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@ShaileshParmar11 ShaileshParmar11 added the skip-pr-checks Bypass PR metadata validation check label Sep 11, 2026
@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit 84eae38 Sep 11, 2026
181 of 182 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the ci-playwright-fast-env-exited-container branch September 11, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants