Repository navigation
Fixes #30653: stabilize four flaky lineage/persona/customize Playwright specs - #30648
chirag-madlani wants to merge 7 commits into
Conversation
- persona.ts: wait for confirmation modal, scope waitForResponse to PATCH
/personas/{id}, and move it right before the "Yes" click so the response
race in set/remove default persona cannot fire before the listener attaches.
- DashboardDataModelClass.create: on 409 from the dashboard service POST,
GET the existing service and reuse it so a rare uuid collision or leftover
service no longer breaks the LineageFilters beforeAll.
- CustomizeDetailPage.spec: wrap the add-widget click + modal visibility in
expect.toPass so a click that lands on a still-settling grid tile is
retried until add-widget-modal actually appears.
- TableClass.visitEntityPage: reconstruct the FQN from service/db/schema/
entity names and refetch by name when fullyQualifiedName is missing, so
we never fall through to the flaky global-search visitEntityPage path.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
✅ Playwright Results — workflow succeededValidated commit ✅ 561 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 5 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) 42m 6s ⏱️ Max setup 3m 10s · max shard execution 16m 12s · max shard-job elapsed before upload 19m 52s · reporting 5s 🌐 208.53 requests/attempt · 2.79 app boots/UI scenario · 12.65% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
The previous retry checked add-widget-modal's visibility, but that testid lands on the antd .ant-modal-root wrapper which is 0x0 — toBeVisible on it always reports hidden, so expect.toPass would keep clicking (breaking the modal state) until the 30s timeout. Check widget-info-tabs (the tabbed content inside the modal) instead.
The subdomains tab label reads its count from an ES aggregation filtered
by parent.fullyQualifiedName.keyword. With 60 subdomains created in a
parallel Promise.all, ES was frequently still indexing when the test
opened the UI, so the tab rendered a stale count (as low as 1) and
toContainText('60') hit the 15s timeout. Poll the same aggregation the
UI uses until the total reaches 60 (up to 60s) before releasing the
beforeAll, and fail fast with a clear message if indexing lags.
…I check" This reverts commit 08ce53b.
Code Review ✅ ApprovedStabilizes four flaky Playwright E2E test specs by hardening race conditions in persona deletion, dashboard service fixtures, widget customization modal clicks, and table FQN navigation. 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 |
Describe your changes:
Fixes #30653
Stabilizes four Playwright specs surfaced as flaky in CI run 30444748574. Each fix targets the exact race identified in the failure trace:
playwright/utils/persona.ts(PersonaFlow.spec.ts:306 — Admin removes the default persona): the click onremove-default-buttonopened a confirmation modal, butwaitForResponse('/api/v1/personas/*')was set up before the modal rendered and could match unrelated GETs. Wait for the modal, filter the response toPATCH /personas/{id}, and register the wait right before the Yes click. Same hardening applied tosetPersonaAsDefault.playwright/support/entity/DashboardDataModelClass.ts(LineageFilters.spec.ts:426 — beforeAll 409 "Entity already exists"): the dashboard service POST inside the parallelPromise.all(entities.map(entity => entity.create(...)))intermittently 409'd. Made service creation idempotent — on 409, GET the existing service by name and reuse it.playwright/e2e/Features/CustomizeDetailPage.spec.ts(Glossary Term — customizationand the sibling case at line 352): the click onadd-widget-buttonsometimes landed on a still-settlingreact-grid-layouttile and the widget picker never opened. Wrapped the click +widget-info-tabsvisibility check inexpect.toPass({ timeout: 30000 })so we retry the click every 5 s until the picker's inner content appears. (Note: cannot checkadd-widget-modalitself — that testid lands on the 0×0 antd.ant-modal-rootwrapper which always reports hidden.)playwright/support/entity/TableClass.ts(Pages/Lineage/PlatformLineage.spec.ts:168 — Verify platform view switching):beforeEach → table.visitEntityPage(page)was falling through to the flaky global-searchvisitEntityPage(the known Suggestions-race atutils/entity.ts:80) whenentityResponseData.fullyQualifiedNamewas missing. Added a last-resort FQN reconstruction fromservice.name / database.name / schema.name / entity.namefollowed by GET/tables/name/{fqn}so we always stay on the deterministic direct-navigation path.Type of change:
High-level design:
N/A — targeted test-flake fixes; each change is localized to the file that produced the trace and no product code was touched.
Tests:
Use cases covered
PersonaFlow.spec.tsset/remove default persona no longer races the confirmation-modal PATCH.LineageFilters.spec.tsbeforeAll succeeds even when the dashboard service already exists.CustomizeDetailPage.spec.tswidget-picker reliably opens for Glossary Term / Domain / Data Product / all entity customization steps.Pages/Lineage/PlatformLineage.spec.tsTableClass.visitEntityPagenever falls back to the global search box.Unit tests
Not applicable — Playwright test-suite hardening only.
Backend integration tests
Not applicable — no backend changes.
Ingestion integration tests
Not applicable — no ingestion changes.
Playwright (UI) tests
Files updated:
openmetadata-ui/src/main/resources/ui/playwright/utils/persona.tsopenmetadata-ui/src/main/resources/ui/playwright/support/entity/DashboardDataModelClass.tsopenmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.tsopenmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.tsLocal checks:
yarn lint:playwright→ 0 errors;tsc -p playwright/tsconfig.json→ 0 new errors on touched files. Real validation is CI re-running the four specs green without retries.Manual testing performed
Not applicable — these are E2E test files; behavior is verified by the Playwright shards in CI.
UI screen recording / screenshots:
Not applicable — no product-code changes.
Checklist:
Fixes #30653above.Summary by Gitar
SubDomainPagination.spec.tsThis will update automatically on new commits.
Greptile Summary
Stabilizes four Playwright test paths by:
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (6): Last reviewed commit: "Revert "test(playwright): wait for ES to..." | Re-trigger Greptile