Skip to content

ci(playwright): gate visual regression on what it can actually see - #33648

Merged
ShaileshParmar11 merged 1 commit into
mainfrom
fix/visual-regression-paths-gate
Sep 20, 2026
Merged

ShaileshParmar11 merged 1 commit into
mainfrom
fix/visual-regression-paths-gate

Conversation

@chirag-madlani

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

Copy link
Copy Markdown
Collaborator

What

playwright-visual-regression gates on openmetadata-ui/**, which also covers openmetadata-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 on staticPages.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-filter matches 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 against picomatch before writing this.

The Playwright entries are the suite's own inputs, not 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 keep triggering.

Verification

Ran the committed patterns through picomatch (the matcher paths-filter uses) against all 8788 files under openmetadata-ui/ on main:

  • 577 stop triggering — every one a feature spec, doc, lint rule, spec sheet or build script
  • app source, public/, index.html, package.json, yarn.lock, vite.config.ts, pom.xml, playwright.config.ts, the VisualRegression/ specs and their __snapshots__/ baselines, auth.setup.ts, entity-data.setup.ts, support/, utils/ all still trigger

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

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

RetriggerConfidence Score: 5/5

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.

  • Keeps application source, public assets, build configuration, package metadata, and snapshot specifications in scope.
  • Keeps the visual project’s setup files and shared Playwright dependencies in scope.
  • Excludes unrelated feature specifications, documentation, lint configuration, and other files the suite cannot observe.
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]
Loading

Reviews (1) · Last reviewed commit: "ci(playwright): gate visual regression o..."

`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]>
@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
@gitar-bot

gitar-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk

Refines the visual regression workflow trigger to gate on observable inputs — app source, support/, utils/, constant/, fixtures/, test-data/, and the Playwright specs themselves — instead of the broad openmetadata-ui/** pattern that also covers unrelated feature specs and build files. This eliminates ~25-minute screenshot runs on test-only PRs that cannot observe the changes, fixing wasted runner time and snapshot drift from unrelated modifications. 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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit f53d3eeb9dc63b7aac99a82e7cebbed50e9de10f in Playwright run 35489402258, attempt 1.

✅ 557 passed · ❌ 0 failed · 🟡 0 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) 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:

  • Common shard skew was 18.98% (convergence target: at most 15%).
  • Browser traffic was 232.04 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.24 per UI scenario (1292 boots / 578 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 134 0 0 0 0 0
✅ Shard chromium-02 129 0 0 0 0 0
✅ Shard chromium-03 136 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 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

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Sep 20, 2026
Merged via the queue into main with commit 846c5ad Sep 20, 2026
105 of 107 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the fix/visual-regression-paths-gate branch September 20, 2026 07:52
github-actions Bot pushed a commit to aokimoon/OpenMetadata that referenced this pull request Sep 25, 2026
…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.

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.

3 participants