ci(playwright): capture full server log + OpenSearch stats on E2E failure#30249
Conversation
…lure The failure-diagnostics step (#30120) dumps `docker compose logs --tail 5000`. On a ~2h shard the OpenMetadata server is chatty enough that 5000 lines only covers the last ~1 minute (job teardown), so the failing test's actual window — including the index writes and search queries we need to debug flaky "entity not found in search" failures — is truncated away. Add, alongside the existing tailed all-services log: - the full (untailed) openmetadata-server log, and - OpenSearch `_cat/thread_pool` (cumulative write/refresh/search rejected + completed counters, which survive the tail window) and `_cat/indices` (per-index docs.count + refresh stats). This makes the chart custom-property flakiness — where the server log is exactly what's missing — diagnosable on the next failure. Co-Authored-By: Claude Opus 4.8 (1M context) <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 |
🔴 Playwright Results — 16 pipeline/setup failure(s)✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped Pipeline and setup failures
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedIncreases server log visibility for E2E failures by capturing full logs and OpenSearch thread pool/index statistics. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
| docker compose -f docker/development/docker-compose-postgres.yml \ | ||
| logs --no-color --no-log-prefix openmetadata-server \ | ||
| > "$DIAGNOSTICS_DIR/openmetadata-server-full.log" 2>&1 || true |
There was a problem hiding this comment.
Unbounded Log Can Exhaust Disk
On a noisy multi-hour shard, this command copies the server's entire Docker log into a second unbounded file on the runner. If that consumes the remaining disk, the log can be truncated and the later OpenSearch files or artifact upload can fail, leaving the failed run without the diagnostics this step is meant to preserve; stream compression or another bounded capture strategy would avoid duplicating the full log on disk.
Describe your changes:
Follow-up to the failure-diagnostics step added in #30120.
That step dumps
docker compose logs --tail 5000on failure. On a ~2h shard the OpenMetadata server is chatty enough that 5000 lines only covers the last ~1 minute (the job-teardown window). I confirmed this on a real chart-test failure: the captureddocker-compose.logserver section spanned only19:09–19:10(teardown), while the failing test ran ~20 min earlier — so the index writes and search queries needed to debug it were truncated away. (OpenSearch's own log, being far less chatty, did span the whole run and showed it healthy — no rejections/OOM/GC — which is why the server log is the missing piece.)This adds, alongside the existing tailed all-services log:
openmetadata-serverlog, and_cat/thread_pool(cumulativerejected/completedcounters for write/refresh/search — these survive the tail window and reveal any rejections over the whole run) and_cat/indices(per-indexdocs.count+ refresh stats).This makes the recurring chart custom-property E2E flakiness — where the server log is exactly what's missing — diagnosable on the next failure.
Type of change:
Tests:
CI-only change (adds artifacts on
failure()); no product code touched.Checklist:
🤖 Generated with Claude Code
Greptile Summary
This PR expands failure diagnostics for PostgreSQL Playwright runs. The main changes are:
openmetadata-serverlog.Confidence Score: 5/5
The workflow looks mergeable after hardening the full-log capture against runner disk exhaustion.
.github/workflows/playwright-postgresql-e2e.yml
Important Files Changed
Reviews (1): Last reviewed commit: "ci(playwright): capture full server log ..." | Re-trigger Greptile
Context used (3)