Skip to content

fix(playwright): resolve flaky E2E tests in lineage and knowledge center - #33307

Merged
Rohit0301 merged 5 commits into
mainfrom
dataAssetLineage-delete-pipeline-flaky-fix
Sep 15, 2026
Merged

Rohit0301 merged 5 commits into
mainfrom
dataAssetLineage-delete-pipeline-flaky-fix

Conversation

@Rohit0301

Copy link
Copy Markdown
Contributor

Describe your changes:

I fixed several flaky Playwright E2E tests across the lineage and knowledge center features:

  • lineage.ts: Fixed flaky deleteEdge helper by waiting for the confirmation modal to fully detach and the scene API response to complete before proceeding; simplified the onboarding dialog guard from a cookie-lookup to a plain isVisible() check.
  • KnowledgeCenter.ts: Fixed a race condition in the body-update utility by setting up the waitForResponse listener before calling page.fill() (previously the response could arrive before the listener was registered).
  • ContextCenterArticles.spec.ts: Rewrote the "other user edit is visible" test to poll the API until the data consumer's editor state is reflected, then verify via the version history panel instead of checking the editor header DOM, making the assertion resilient to UI rendering delays.

Type of change:

  • Bug fix

High-level design:

N/A — small Playwright test fixes with no production code changes.

Tests:

Use cases covered

  • Lineage: deleting an edge no longer races against the scene reload
  • KnowledgeCenter: body-update utility correctly awaits the PATCH response
  • ContextCenterArticles: article edit by another user is verified through version history with proper API polling

Unit tests

  • Not applicable (Playwright E2E test changes only; no production logic changed)

Backend integration tests

  • Not applicable (no backend API changes)

Ingestion integration tests

  • Not applicable (no ingestion changes)

Playwright (UI) tests

  • Updated existing Playwright tests to eliminate flakiness
  • Files updated:
    • openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts
    • openmetadata-ui/src/main/resources/ui/playwright/utils/KnowledgeCenter.ts
    • openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts

Manual testing performed

  • Reviewed all three diffs to confirm correct wait ordering and assertion logic
  • Changes are purely in test helpers and a spec file; no production code was modified

UI screen recording / screenshots:

Not applicable — no UI production code changes.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

- Fix race condition in KnowledgeCenter utils by waiting for API response after fill
- Fix flaky lineage delete-edge test by awaiting modal detach and scene API response
- Simplify onboarding dialog check to use isVisible() instead of cookie lookup
- Fix flaky ContextCenterArticles test by polling API for editor state and verifying via version history

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@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.

@Rohit0301 Rohit0301 self-assigned this Sep 15, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Sep 15, 2026
@github-actions github-actions Bot added the UI UI specific issues label Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 774 → 775
- 1 added, 0 removed, 0 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityVersionTimeLine/EntityVersionTimeLine.tsx

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

Rohit0301 and others added 2 commits September 15, 2026 13:25
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit a2029ef1535d4699eacaed0d9d81e5f74ef9ac41 in Playwright run 34956357827, attempt 2.

✅ 1203 passed · ❌ 0 failed · 🟡 3 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) 1h 20m 0s

⏱️ Max setup 4m 38s · max shard execution 19m 52s · max shard-job elapsed before upload 23m 24s · reporting 7s

🌐 215.53 requests/attempt · 2.18 app boots/UI scenario · 15.60% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 15.6% (convergence target: at most 15%).
  • Browser traffic was 215.53 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.18 per UI scenario (2768 boots / 1271 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 146 0 1 0 0 0
🟡 Shard chromium-02 136 0 1 0 0 0
✅ Shard chromium-03 146 0 0 0 0 0
✅ Shard chromium-04 154 0 0 0 0 0
✅ Shard chromium-05 151 0 0 0 0 0
✅ Shard chromium-06 136 0 0 0 0 0
🟡 Shard chromium-07 175 0 1 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 import-export-01 1 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
🟡 3 flaky test(s) (passed on retry)
  • Pages/CustomProperties.spec.tsString (shard chromium-01, 1 retry)
  • Pages/ExplorePageRightPanel.spec.tsShould verify deleted user not visible in owner selection for database (shard chromium-02, 1 retry)
  • Pages/ExplorePageRightPanel.spec.tsShould perform CRUD and Removal operations for topic (shard chromium-07, 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

@Rohit0301
Rohit0301 enabled auto-merge September 15, 2026 08:57
…rArticles

Move response.status() === 200 check out of the waitForResponse filter and
assert response.ok() after awaiting, so a non-200 fails fast with a clear
error instead of silently timing out.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gitar-bot

gitar-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes flaky Playwright E2E tests in lineage and knowledge center by correcting wait ordering and assertion strategies: deleteEdge now waits for modal detachment and scene API completion, KnowledgeCenter sets up response listeners before triggering updates, and ContextCenterArticles verifies edits via version history polling instead of DOM checks. No issues found.

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Auto-approval Not enabled · Set up

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

@Rohit0301
Rohit0301 added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit 50885ce Sep 15, 2026
133 of 136 checks passed
@Rohit0301
Rohit0301 deleted the dataAssetLineage-delete-pipeline-flaky-fix branch September 15, 2026 12:49
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.

2 participants