Skip to content

fix(e2e): screenshot the data-quality page once it has loaded - #33662

Merged
chirag-madlani merged 3 commits into
mainfrom
fix/visual-regression-data-quality-baseline
Sep 21, 2026
Merged

chirag-madlani merged 3 commits into
mainfrom
fix/visual-regression-data-quality-baseline

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

The bug

data-quality.png was recorded mid-load. The committed baseline is the page's skeleton placeholders — grey blocks where the three Data Health cards go. The test only passed while the next run happened to be equally slow, and CI has been red on it at 16708 pixels.

Expected (committed) vs actual, from the failing run's artifact:

baseline actual
three grey skeleton blocks under "Data Health" three rendered donuts, "Tables 322"

That also explains the 55px shift I originally mistook for a layout change: skeleton blocks and loaded cards are different heights.

Fix

1. Wait for skeletons. gotoForScreenshot calls waitForPageLoaded, which clears loader spinners. A widget rendering <Skeleton /> while its query is in flight shows no spinner, so the page reads as settled while half of it is grey. Matched on animate-pulse rather than a testid because core-components' Skeleton exposes none, and the substring match sidesteps escaping the tw: prefix.

2. Mask the donuts. Loading the page fully exposes the second problem: the Data Health cards count whatever assets the environment holds — 322 tables in CI, 486 locally — so they cannot be baselined. Masked, the same way this file already handles services-container tbody, search-results-count and the rest. Page chrome, tabs, filter row and the Data Dimensions section stay under test.

3. Re-recorded the baseline in the image CI uses, mcr.microsoft.com/playwright:v1.57.0-jammy, so the PNG is comparable rather than a macOS rendering.

Verification

The skeleton wait applies to every page in the suite, so I ran the whole project before and after against the same server:

failed passed
unmodified main bots, explore, glossary, teams, users 8
this branch bots, explore, glossary, teams, users 9

Identical failure sets — those five are local-data mismatches, unrelated to this change. The skeleton wait never timed out (0 occurrences). data-quality is the only difference: it now passes.

Replaces #33650

That PR added an update_snapshots dispatch flag on the premise that baselines could only be regenerated in CI. That premise was wrong — the CI image runs locally — and the flag would have papered over the real bug rather than fixing it. Closed.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no outstanding correctness, security, or repository-rule issues.

Summary

This PR stabilizes the Data Quality visual-regression snapshot by waiting for skeleton placeholders to disappear, masking only environment-dependent chart data, and updating the CI-compatible baseline.

  • Adds a shared skeleton-resolution wait before visual screenshots.
  • Masks Data Health donut charts and volatile counts while preserving card, heading, icon, and legend-label coverage.
  • Re-records the Data Quality baseline in the Playwright CI image.
  • The change since the previous review narrows the masks as requested; the previous finding is resolved.

Reviews (5) · Last reviewed commit: "Merge branch 'main' into fix/visual-regr..."

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

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 20, 2026
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 00754eaf90393d7a5d7f6d130a0377d578511e2f in Playwright run 35579825383, attempt 1.

✅ 4540 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 1 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 0m 35s

⏱️ Max setup 4m 43s · max shard execution 22m 13s · max shard-job elapsed before upload 25m 19s · reporting 23s

🌐 224.00 requests/attempt · 2.23 app boots/UI scenario · 45.39% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 45.39% (convergence target: at most 15%).
  • Browser traffic was 224 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (10763 boots / 4828 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 130 0 0 0 0 0
✅ Shard chromium-01 143 0 0 1 0 0
✅ Shard chromium-02 140 0 0 0 0 0
✅ Shard chromium-03 178 0 0 0 0 0
✅ Shard chromium-04 187 0 0 0 0 0
✅ Shard chromium-05 166 0 0 0 0 0
🟡 Shard chromium-06 162 0 1 0 0 0
✅ Shard chromium-07 174 0 0 0 0 0
✅ Shard chromium-08 192 0 0 0 0 0
✅ Shard chromium-09 154 0 0 0 0 0
🟡 Shard chromium-10 169 0 1 0 0 0
✅ Shard chromium-11 160 0 0 0 0 0
✅ Shard chromium-12 191 0 0 0 0 0
✅ Shard chromium-13 169 0 0 0 0 0
✅ Shard chromium-14 185 0 0 0 0 0
🟡 Shard chromium-15 161 0 1 0 0 0
✅ Shard chromium-16 208 0 0 0 0 0
🟡 Shard chromium-17 177 0 1 0 0 0
✅ Shard chromium-18 178 0 0 0 0 0
✅ Shard chromium-19 166 0 0 0 0 0
🟡 Shard chromium-20 177 0 1 0 0 0
✅ Shard chromium-21 167 0 0 0 0 0
✅ Shard chromium-22 165 0 0 0 0 0
✅ Shard chromium-23 196 0 0 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 80 0 0 0 0 0
✅ Shard import-export-02 70 0 0 0 0 0
✅ Shard ingestion-01 46 0 0 0 0 0
✅ Shard ingestion-02 53 0 0 0 0 0
✅ Shard reindex-01 40 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 5 flaky test(s) (passed on retry)
  • Pages/DataProducts.spec.ts › Create Data Product and Manage Assets (shard chromium-06, 1 retry)
  • Pages/Entity.spec.ts › Tier Add, Update and Remove (shard chromium-10, 1 retry)
  • Features/AccessControlSettings.spec.ts › should show all 4 landing cards and navigate to each panel (shard chromium-15, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard chromium-17, 1 retry)
  • Features/PersonaAIContext.spec.ts › configures every entity type, behavior, section, filter, and setting (shard chromium-20, 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

`data-quality.png` was recorded mid-load. The committed baseline is the page's
skeleton placeholders — grey blocks where the three Data Health cards go — so
the test only passed while the next run was equally slow, and CI has been red on
it at 16708 pixels.

`gotoForScreenshot` calls `waitForPageLoaded`, which clears loader *spinners*.
A widget that renders `<Skeleton />` while its query is in flight shows no
spinner, so the page reads as settled while half of it is still grey. Wait for
the skeletons too. Matched on `animate-pulse` rather than a testid because
core-components' `Skeleton` exposes none, and the substring match sidesteps
escaping the `tw:` prefix.

Loading the page fully then exposes the second problem: the Data Health donuts
count whatever assets the environment holds — 322 tables in CI, 486 here — so
they cannot be baselined. Masked, like the other per-environment regions in this
file. The page chrome, tabs, filter row and the Data Dimensions section stay
under test.

Baseline re-recorded in the image CI uses,
mcr.microsoft.com/playwright:v1.57.0-jammy, so the PNG is comparable rather than
a macOS rendering.

The skeleton wait applies to every page in the suite, so the whole project was
run before and after against the same server: the same five pages fail either
way on local data (bots, explore, glossary, teams, users), the wait never timed
out, and data-quality is the only difference — it now passes.
Review feedback, and it was right: masking each card whole also hid its icon,
heading and chrome, so a regression in those would have passed unnoticed.

Only two things vary by environment — the donut and the individual legend
counts. The chart carries `id="<name>-pie-chart"` and each count carries
`data-testid="legend-count-<name>"`, and the legend sits beside the chart rather
than inside it, so both can be named directly. The cards, their icons and
headings, and the legend's dots and labels are back under test.

Re-recorded in mcr.microsoft.com/playwright:v1.57.0-jammy and re-run without
--update to confirm it compares clean.
@gitar-bot

gitar-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
Code Review ✅ No issues found

🟡 Medium risk · Shared screenshot navigation now waits on every animate-pulse element across the suite.

Fixes the data-quality visual regression baseline by waiting for Tailwind skeleton placeholders to load before capturing the screenshot and masking the environment-dependent Data Health cards. The baseline is now recorded from the CI Playwright environment with fully-loaded content instead of mid-load skeleton placeholders.

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

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.

2 participants