Repository navigation
ci(playwright): gate visual regression on what it can actually see - #33648
Conversation
`openmetadata-ui/**` also covers `playwright/e2e/**`, so changing any feature spec booked a ~25 minute screenshot run that could not observe the change. The cost is not just the runner time: because almost nothing else triggers this workflow, test-only PRs became the only ones exposed to unrelated snapshot drift. #33216 changes no `src/` file at all and is currently red on `staticPages.spec.ts:101 data-quality` — 16708 pixels it cannot have moved. Replaced with an allowlist of the inputs the suite can see. Not `openmetadata-ui/**` plus `!` exclusions: dorny/paths-filter matches a file if *any* pattern matches, so a trailing negation cannot subtract from a broad pattern above it — it just matches everything the broad one did not. The Playwright entries are the suite's own inputs rather than exceptions to the rule. The `visual-regression` project declares `dependencies: ['setup', 'entity-data-setup']`, and its specs import from support/, utils/, constant/, fixtures/ and test-data/ — all of which stay. Checked against all 8788 files under openmetadata-ui/ on main: 577 stop triggering, and every one is a feature spec, doc, lint rule, spec sheet or build script. Of the four PRs in the current flake stack, the one that touches only feature specs stops triggering; the three that touch support/ and utils/ still do, which is correct — those are live inputs to the run. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
❌ 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 |
Code Review ✅ Approved🟡 Medium risk Refines the visual regression workflow trigger to gate on observable inputs — app source, OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 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) 23m 50s ⏱️ Max setup 4m 36s · max shard execution 14m 24s · max shard-job elapsed before upload 17m 37s · reporting 4s 🌐 232.04 requests/attempt · 2.24 app boots/UI scenario · 18.98% 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 |
…l regression on core-components changes (open-metadata#33950) * fix(ui): keep DQ chart-widget card text primary and run visual regression on core-components changes open-metadata#33808 dropped the default text colour from core Typography, so text in card-wide Links (Data Dimensions, test-case status, incident type widgets) inherited the link blue. Pin those cards back to text-primary. The regression slipped through because the visual-regression path filter (open-metadata#33648) did not include openmetadata-ui-core-components/**, so the job was skipped on open-metadata#33808 and its merge-queue runs. * fix(ui-core): keep Typography text primary inside links instead of per-widget overrides Move the fix for open-metadata#33808's link-blue text into core: one layered rule gives .prose primary text inside any <a>, so card-wide links across the app stop painting titles and values blue. Outside links Typography still inherits, and a color prop or tw:text-* class still wins. Drops the DQ-only chart-widgets.less override. * test(visual): refresh explore.png baseline for open-metadata#33816's smaller card icon open-metadata#33816 shrank the Explore result-card entity icon from 24px to 20px after the explore.png baseline was captured, so every PR that runs the visual suite fails explore by ~13k px. New baseline is the CI render from run 35998577113 (same pinned Playwright container); it differs from another PR's render by 9 px.
What
playwright-visual-regressiongates onopenmetadata-ui/**, which also coversopenmetadata-ui/src/main/resources/ui/playwright/e2e/**. Changing any feature spec therefore books a ~25 minute screenshot run that cannot observe the change.The wasted runner time is the smaller half. Because almost nothing else triggers this workflow, test-only PRs end up the only ones exposed to unrelated snapshot drift. #33216 changes zero
src/files and is currently red onstaticPages.spec.ts:101 data-quality— 16708 pixels it cannot have moved.How
An allowlist of the inputs the suite can actually see.
Not
openmetadata-ui/**plus!exclusions:dorny/paths-filtermatches a file if any pattern matches, so a trailing negation cannot subtract from a broad pattern above it — it matches everything the broad one did not. I verified that againstpicomatchbefore writing this.The Playwright entries are the suite's own inputs, not exceptions to the rule. The
visual-regressionproject declaresdependencies: ['setup', 'entity-data-setup'], and its specs import fromsupport/,utils/,constant/,fixtures/andtest-data/— all of which keep triggering.Verification
Ran the committed patterns through
picomatch(the matcherpaths-filteruses) against all 8788 files underopenmetadata-ui/on main:public/,index.html,package.json,yarn.lock,vite.config.ts,pom.xml,playwright.config.ts, theVisualRegression/specs and their__snapshots__/baselines,auth.setup.ts,entity-data.setup.ts,support/,utils/all still triggerAgainst the four PRs in the current flake stack: the one that touches only feature specs stops triggering; the three that touch
support/andutils/still do, which is correct — those are live inputs to the run.Note
The same coarseness exists on the RDF workflow, but its filter is already an explicit file list, so it is accurate. No change needed there.
🤖 Generated with Claude Code
The PR appears safe to merge; the narrowed filter retains the currently observable inputs of the visual-regression suite.
Summary
This PR narrows the visual-regression workflow’s path filter from the entire UI tree to the files that can affect the visual suite.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Changed file] --> B{Matches visual-suite allowlist?} B -->|Yes| C[Run playwright-visual-regression] B -->|No| D[Skip visual-regression workflow] C --> E[Setup and entity-data-setup] E --> F[Run VisualRegression specs] F --> G[Compare screenshots with baselines]Reviews (1) · Last reviewed commit: "ci(playwright): gate visual regression o..."