Repository navigation
fix(playwright): stabilize IncidentManager test-suite pipeline trigger (2.0) - #30713
Conversation
❌ 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 |
❌ UI Checkstyle Failed❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
✅ Playwright Results — workflow succeededValidated commit ✅ 539 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 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) 45m 52s ⏱️ Max setup 2m 58s · max shard execution 15m 4s · max shard-job elapsed before upload 19m 8s · reporting 4s 🌐 202.41 requests/attempt · 2.85 app boots/UI scenario · 24.00% 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 |
Backport of the IncidentManager flakiness fix from main (#30655) to 2.0. The helper that triggers a test-suite ingestion pipeline and waits for success had three problems that surface as flaky/timed-out runs in CI: - It asserted on the previous run's status because it did not distinguish a genuinely new run from the stale latest record. It now records a baseline before triggering and waits for a run that differs by runId or timestamp. - It could deadlock when neither the baseline nor the polled record carried a runId (the field is optional in the generated schema), so the new-run check treats a different runId OR a newer timestamp as sufficient. - Airflow 3.x accepts a trigger (HTTP 200) even before its dag-processor has serialized the freshly deployed DAG. That trigger produces an empty DagRun that finishes instantly and never writes a pipelineStatus, so the helper polled the full 300s and timed out. It now waits up to 60s for a run to materialize and re-triggers (up to three times) when none does, since the empty run is only detectable by its absence. Only the Playwright helper is ported; the impact-map/CI-lane changes from the main branch are specific to main's test-selection setup (the ImportExport lane does not exist on 2.0). 2.0 already runs IncidentManager.spec.ts in the Ingestion lane, so the fix is exercised as-is. Validated on a real Airflow 3.2.2 stack: the empty-DAG race reproduced deterministically and the re-trigger recovered to success; full IncidentManager spec 10/10, 0 flaky. Co-Authored-By: Claude <noreply@anthropic.com>
18e77a6 to
c505bb3
Compare
Code Review ✅ ApprovedStabilizes the IncidentManager test-suite pipeline trigger in Playwright by establishing a status baseline and adding retry logic for unmaterialized DAG runs. 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 | Powered by Gitar — free for open source |
Backport of the IncidentManager Playwright flakiness fix to 2.0. The main-branch PR is #30655; merging there will take time, so this ports the fix directly.
Problem
triggerTestSuitePipelineAndWaitForSuccess(used by IncidentManager E2E setup and re-run steps) timed out at the 300s poll in CI, failing the ingestion lane. Root cause, confirmed on a real Airflow 3.2.2 stack: Airflow 3.x accepts a trigger (HTTP 200) even before its dag-processor has serialized the freshly deployed DAG. That trigger creates an empty DagRun that finishes in ~0.03s, runs no task, and never writes apipelineStatus— so the helper polls forever. The prior "retry until the trigger is accepted" assumption does not hold, because the trigger is accepted regardless of serialization state.Fix (Playwright helper only)
runIdor newertimestamp(avoids asserting on the stale previous run, and avoids a deadlock whenrunIdis absent — it is optional in the generated schema).Scope
Only
playwright/utils/incidentManager.tsis ported. The impact-map / CI-lane changes on the main PR are specific to main's test-selection setup (theImportExportlane does not exist on 2.0). 2.0 already runsIncidentManager.spec.tsin the Ingestion lane, so the fix is exercised as-is.Validation
flaky: 0, IncidentManager allattempts=1 ['passed'].🤖 Generated with Claude Code
Greptile Summary
This PR revises the IncidentManager Playwright pipeline helper to:
Confidence Score: 4/5
The PR is not yet safe to merge because current IncidentManager hooks and tests can time out before the new pipeline recovery sequence finishes.
The helper can spend up to three 60-second windows waiting for a run to materialize and then enter a 300-second success poll, while current callers include hooks and tests whose effective budgets are only 180 seconds and a setup hook capped at 420 seconds.
Files Needing Attention: openmetadata-ui/src/main/resources/ui/playwright/utils/incidentManager.ts; openmetadata-ui/src/main/resources/ui/playwright/e2e/IncidentManager.spec.ts
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Read previous run baseline] --> B[Trigger pipeline] B --> C{New status materializes<br/>within 60 seconds?} C -->|No, attempts remain| B C -->|No, attempts exhausted| D[Throw no-run error] C -->|Yes| E[Poll new run for success] E -->|Success| F[Return] E -->|300-second timeout| G[Fail assertion]Reviews (2): Last reviewed commit: "fix(playwright): stabilize IncidentManag..." | Re-trigger Greptile