Skip to content

Fixes #30653: stabilize four flaky lineage/persona/customize Playwright specs - #30648

Closed
chirag-madlani wants to merge 7 commits into
mainfrom
fix-flaky-lineage-persona-tests
Closed

chirag-madlani wants to merge 7 commits into
mainfrom
fix-flaky-lineage-persona-tests

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

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 on remove-default-button opened a confirmation modal, but waitForResponse('/api/v1/personas/*') was set up before the modal rendered and could match unrelated GETs. Wait for the modal, filter the response to PATCH /personas/{id}, and register the wait right before the Yes click. Same hardening applied to setPersonaAsDefault.
  • playwright/support/entity/DashboardDataModelClass.ts (LineageFilters.spec.ts:426 — beforeAll 409 "Entity already exists"): the dashboard service POST inside the parallel Promise.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 — customization and the sibling case at line 352): the click on add-widget-button sometimes landed on a still-settling react-grid-layout tile and the widget picker never opened. Wrapped the click + widget-info-tabs visibility check in expect.toPass({ timeout: 30000 }) so we retry the click every 5 s until the picker's inner content appears. (Note: cannot check add-widget-modal itself — that testid lands on the 0×0 antd .ant-modal-root wrapper 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-search visitEntityPage (the known Suggestions-race at utils/entity.ts:80) when entityResponseData.fullyQualifiedName was missing. Added a last-resort FQN reconstruction from service.name / database.name / schema.name / entity.name followed by GET /tables/name/{fqn} so we always stay on the deterministic direct-navigation path.

Type of change:

  • Bug fix

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.ts set/remove default persona no longer races the confirmation-modal PATCH.
  • LineageFilters.spec.ts beforeAll succeeds even when the dashboard service already exists.
  • CustomizeDetailPage.spec.ts widget-picker reliably opens for Glossary Term / Domain / Data Product / all entity customization steps.
  • Pages/Lineage/PlatformLineage.spec.ts TableClass.visitEntityPage never 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.ts
  • openmetadata-ui/src/main/resources/ui/playwright/support/entity/DashboardDataModelClass.ts
  • openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  • openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts

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

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue via Fixes #30653 above.
  • I have commented on my code, particularly in hard-to-understand areas.

Summary by Gitar

  • Test stabilization & robustness:
    • Added explicit ES indexing poll for 60 subdomains before pagination checks in SubDomainPagination.spec.ts

This will update automatically on new commits.

Greptile Summary

Stabilizes four Playwright test paths by:

  • Retrying widget-picker interactions until the picker content is visible.
  • Reusing an existing dashboard service after a creation conflict.
  • Recovering missing table metadata through a direct FQN lookup.
  • Waiting specifically for persona PATCH responses after confirmation modals render.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts Retries the add-widget interaction while the grid layout settles, without changing product behavior.
openmetadata-ui/src/main/resources/ui/playwright/support/entity/DashboardDataModelClass.ts Makes dashboard-service fixture creation idempotent by retrieving an existing service after a conflict.
openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts Adds direct table lookup using a reconstructed FQN when response metadata is unavailable.
openmetadata-ui/src/main/resources/ui/playwright/utils/persona.ts Synchronizes default-persona actions with modal visibility and the specific PATCH response.

Reviews (6): Last reviewed commit: "Revert "test(playwright): wait for ES to..." | Re-trigger Greptile

- 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.
Copilot AI review requested due to automatic review settings July 29, 2026 12:40
@chirag-madlani
chirag-madlani requested a review from a team as a code owner July 29, 2026 12:40

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

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 55b136061397311977bbb6c61c1b7e5c405baa51 in Playwright run 30529849766, attempt 1.

✅ 561 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 5 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) 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:

  • Browser traffic was 208.53 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.79 per UI scenario (1686 boots / 605 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 112 0 0 3 0 0
✅ Shard chromium-02 110 0 0 0 0 0
✅ Shard chromium-03 96 0 0 0 0 0
🟡 Shard chromium-04 105 0 1 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 23 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 10 0 0 0 0 0
✅ Shard search-rbac-01 27 0 0 2 0 0
🟡 1 flaky test(s) (passed on retry)
  • Pages/Entity.spec.ts › Domain Propagation (shard chromium-04, 1 retry)

📦 Download artifacts

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.
Copilot AI review requested due to automatic review settings July 29, 2026 13:43

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.

@chirag-madlani chirag-madlani changed the title test(playwright): fix four flaky lineage/persona/customize specs Fixes #30653: stabilize four flaky lineage/persona/customize Playwright specs Jul 29, 2026
@chirag-madlani
chirag-madlani enabled auto-merge July 29, 2026 14:05
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.
Copilot AI review requested due to automatic review settings July 30, 2026 09:01

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.

Copilot AI review requested due to automatic review settings July 30, 2026 09:13

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.

@gitar-bot

gitar-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Stabilizes 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.

Options

Display: compact → Showing less information.

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

Compact
gitar display:verbose         

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

This branch was previously deployed

1 inactive deployment
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Playwright specs: LineageFilters, PersonaFlow, CustomizeDetailPage, PlatformLineage

5 participants