Skip to content

Backport 2.0: Data Quality dropdown deflakes (#32506, #32969) - #33014

Merged
ShaileshParmar11 merged 2 commits into
2.0from
backport/32506-2.0
Sep 9, 2026
Merged

ShaileshParmar11 merged 2 commits into
2.0from
backport/32506-2.0

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes

Backports the two Data Quality dropdown deflakes from main to 2.0. Both sites exist unhardened on 2.0; one is failing the nightly upgrade suite today, the other is latent.

Commit Backport of Site Status on 2.0
1 #32506 DataQuality.spec.ts page-size dropdown + TestLibrary.spec.ts DQ Dimension select failing the nightly
2 #32969 (Fixes #32968) TestLibrary.spec.ts entity-type select, 5 call sites latent — not seen in the nightly, but the same merge-queue exposure main had

1. DataQuality.spec.ts — page-size dropdown (#32506)

One of the hard (non-flaky) failures in run 34296793051 (kind / postgresql / full, 1.11.13 ➡ 2.0) — lost all 3 attempts:

Locator: .ant-dropdown:not(.ant-dropdown-hidden) .ant-dropdown-menu
Expected: visible
Timeout: 15000ms — element(s) not found
  1490 | await pageSizeDropdown.hover();
> 1491 | await expect(pageSizeMenu).toBeVisible();

element(s) not found, not "hidden" — Ant only mounts the dropdown portal on first open, so the menu never opened at all.

Root cause

NextPrevious renders the page-size control as an Ant Dropdown with no trigger prop (antd default is ['hover']) over a button that swallows its own click:

<Dropdown menu={{ items: pageSizeOptions.map(...) }}>
  <Button data-testid="page-size-selection-dropdown" onClick={(e) => e.preventDefault()}>

The menu therefore opens on mouseenter only. The preceding step navigates next → previous, and the resulting list re-render shifts the footer out from under the pointer that hover() just parked there. No new mouseenter fires, and a single un-retried hover() has nothing left to reopen it.

NextPrevious.tsx is identical on main and 2.0 apart from an unrelated a11y attribute — this is a test-hardening gap, not a product difference.

Why main is green and 2.0 is not

#32506 fixed exactly this call site on main on 2026-09-03 and was never backported. Nightly history for this test:

Date 2.0 (pg / mysql) main (pg / mysql)
09-05 flaky / fail —
09-06 fail / fail —
09-07 pass / pass pass / pass
09-08 flaky / pass pass / pass
09-09 fail / pass —

6 of the last 10 2.0 full runs affected; main clean on the first attempt in every run since the fix landed.

Why PR checks never caught it

  • PR-time Playwright runs a targeted plan (only specs affected by the changed files); the nightly runs the full suite, so a spec outside a PR's change set never runs at PR time.
  • The failing lane is PostgreSQL + kind + a 1.11.13 ➡ 2.0 migration at full parallelism. A hover-to-open Ant Dropdown is load-sensitive and survives the lighter PR environment.

Why the hover-then-click retry rather than a plain click()

2.0 already carries this exact pattern for this same control in playwright/utils/common.ts (two call sites) — only this inline site was left unconverted. Keeping the backport identical to main stops the branches drifting further; a bare click() would add a third variant of the same interaction.

2. TestLibrary.spec.ts — entity-type select (#32969)

React Aria's listbox is a non-modal popover, and a press on a trigger that does not already hold focus both opens it and — via the focus transition that same press produces — dismisses it a frame later. That leaves ~160ms to pick an option, with nothing to reopen the listbox afterwards, so a loaded runner that misses the window retries the option click until the test times out. Focusing the trigger first removes the transition.

2.0 has all five call sites in the pre-fix form; the backport collapses them onto the same selectEntityType() helper main now uses. Honest framing: this one is not what is failing the 2.0 nightly — the only two TestLibrary flakes in the last 10 AUT runs (one per branch) were add-test-definition-button page-load timeouts, an unrelated issue. It is included because the latent defect is identical, because 2.0 PRs go through the same merge queue where this blocked #32524 on main, and because both commits touch TestLibrary.spec.ts — landing them separately would just create a conflict between two open 2.0 PRs.

Conflict resolution

Commit 1 cherry-picked clean. Commit 2 hit three conflicts, all the same shape: 2.0 spells the pre-fix entity-type click slightly differently at each site (page.locator('[id="root/entityType"]') at one, getByTestId('entity-type') at the others). Resolved by taking the incoming selectEntityType(page, 'TABLE') at all three — which is what #32969 did to those same sites on main, including the [id="root/entityType"] one. The resulting helper block is byte-identical to main's, and all five call sites now match.

Type of change

  • Bug fix

High-level design

N/A — test-only backport, two files.

Tests

Use cases covered

Test-only change; no product code touched. Verification for the underlying fixes is in #32506 and #32969 — notably, #32506 proved the page-size open by neutralising the hover() so only the click fallback could open the menu, and #32969 measured the listbox lifetime (~160ms on a cold click vs ~1.3s focus-first).

Unit tests

Not applicable.

Backend integration tests

Not applicable (no backend changes).

Ingestion integration tests

Not applicable (no ingestion changes).

Playwright (UI) tests

This PR is the Playwright change.

  • playwright/e2e/Features/DataQuality/DataQuality.spec.ts
  • playwright/e2e/Features/DataQuality/TestLibrary.spec.ts

Manual testing performed

Static gates run against 2.0's own toolchain (not borrowed from main — 2.0 pins eslint ^9.18 vs main's ^9.39):

Check Result
eslint (2.0 config) 0 errors, 0 warnings on both files
prettier --check pass
tsc -p playwright/tsconfig.json 0 errors in the two changed files; total unchanged at 169 pre-existing baseline errors elsewhere

The E2E itself was not re-run locally — reproducing needs the full migrated stack, which is the point of the bug. The fixes are field-proven upstream: main has been green on the page-size test in every nightly since #32506 landed.

UI screen recording / screenshots:

Not applicable — test-only change.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

…icked (#32506)

Two Data Quality E2E tests opened a dropdown in a single un-retried step and
hung to their timeout when it closed underneath them.

TestLibrary "external test definitions with read-only fields" — the DQ
Dimension select. #32283 hardened the two selects in the create step with
selectOptionWithMouse, but this one in the edit step was left as-is and is the
one failing in CI. Its listbox is a non-modal React Aria popover, so
useCloseOnScroll dismisses it on any scroll of a container holding the trigger,
including the scroll Playwright emits to bring the field into view, delivered a
frame after the popup opened. expect(option).toBeVisible() still passes during
the close animation and the click that follows then waits on a detached node
with nothing to reopen the list. Measured on a local stack: a 1px scroll of the
drawer's form column closes the listbox, the same nudge on a sibling pane does
not.

DataQuality "Pagination functionality in test cases list" — NextPrevious wraps
the page-size button in an Ant Dropdown, which opens on hover, so a list
re-render that shifts the footer out from under the pointer leaves the menu
closed for good. Failed 3/3 attempts on two separate runs. Applies the
hover-then-click retry already used for this control in utils/common.ts, and
moves the menu off Ant Design class selectors onto role-based locators.

Verified against a local stack: the DQ Dimension step failed 2/10 on the
original with the CI signature and passes 6/6 after. The page-size open was
verified by neutralising the hover so only the click fallback could open the
menu.

Co-authored-by: Claude Opus 5 <[email protected]>
(cherry picked from commit a9b9b93)
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner September 9, 2026 05:53
@ShaileshParmar11 ShaileshParmar11 added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

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.

#32969)

React Aria's listbox is a non-modal popover, and a press on a trigger that
does not already hold focus both opens it and dismisses it a frame later via
the focus transition that same press produces. That left the four cold-click
call sites roughly 160ms to pick an option, with nothing to reopen the listbox
afterwards, so a loaded runner that missed the window retried the option click
until the test timed out and ejected the PR from the merge queue.

Collapse all five entity-type selections into one selectEntityType helper built
on the focus-first sequence the site at :635 already used and which passed in
the same CI run that failed the other two.

Co-authored-by: Claude Opus 5 <[email protected]>

(cherry picked from commit db52a04)
@ShaileshParmar11 ShaileshParmar11 changed the title Backport 2.0: reopen dropdowns that close before the option is clicked (#32506) Backport 2.0: Data Quality dropdown deflakes (#32506, #32969) Sep 9, 2026
@gitar-bot

gitar-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Backport of Playwright test hardening to fix a flaky dropdown interaction in the data quality pagination test on the 2.0 branch. The fix adds a retry mechanism to reopen the page-size dropdown if it closes before the option is clicked, matching the pattern already used elsewhere in the test suite and proven on main. 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 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 321c0f661290fbee809faf5f1c4b91992ae23981 in Playwright run 34317178753, attempt 1.

✅ 70 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) 46m 28s

⏱️ Max setup 3m 13s · max shard execution 6m 18s · max shard-job elapsed before upload 9m 38s · reporting 3s

🌐 145.71 requests/attempt · 1.60 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Application boot ratio was 1.6 per UI scenario (115 boots / 72 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 61 0 0 0 0 0
✅ Shard ingestion-01 9 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 merged commit 2cc68c5 into 2.0 Sep 9, 2026
76 of 79 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the backport/32506-2.0 branch September 9, 2026 06:52

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