Skip to content

Fixes #33689: Playwright specs asserting build-specific details - #33679

Merged
ShaileshParmar11 merged 3 commits into
mainfrom
claude/test-failure-rca-4fe675
Sep 21, 2026
Merged

ShaileshParmar11 merged 3 commits into
mainfrom
claude/test-failure-rca-4fe675

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #33689

Two Playwright specs failed in the Collate AUT full run (35518918577). Both failed 3/3 retries with identical errors — neither is flaky, and in both cases the product is behaving correctly and the assertion is wrong.

TestCaseDetailsPage.spec.ts — hardcoded OSS route literal

Expected: "/test-suites/pw-bundle-suite-8eed3738"
Received: "/observability/test-suites/pw-bundle-suite-8eed3738"

The link is built by observabilityRouterClassBase.getTestSuitePath(). In OSS that returns ROUTES.TEST_SUITES_WITH_FQN and setEmbeddedMode is an explicit no-op annotated "overridden in Collate" — so OSS always yields the unprefixed path the assertion pins. Collate in AI app mode (the spec calls enableAiAppMode) serves the route namespaced under /observability, matching what its route table actually mounts. The exact-string match could therefore only ever hold on OSS, which is why OSS PR checks are structurally incapable of catching it.

Fixed by matching the suffix — exactly what the table-suite assertion two lines above already does (/\/profiler\/data-quality$/). The inconsistency between the two adjacent assertions was the original defect.

TaskComments.spec.ts — bounding-box comparison measured a scroll, not a reflow

- Expected  y: 675.28125
+ Received  y: 666.28125     (x, width, height identical)

Not a reflow at all. From the trace, the scroll container .right-container.three-panel-layout goes __playwright_scroll_top_ 44 → 53 across the hover — exactly the 9px reported — while every DOM node in both snapshots is an unchanged back-reference. hover() runs Playwright's actionability check, which scrolls the target into view; boundingBox() is viewport-relative, so a pure scroll reads as a layout shift.

The invariant the test meant to guard is intact and structurally enforced: .reply-card .feed-actions.ant-space is position: static, so the bar is permanently in flow, and :hover only flips opacity/pointer-events — neither can reflow anything. That is a computed-style fact, so it is asserted as one, alongside the opacity assertions in the keyboard test that already pin the same mechanism. The geometry test is removed.

The original test's rationale — "jsdom has no layout engine, so it could not have caught an actual reflow" — does not require geometry here: Playwright's toHaveCSS reads the computed value from a real engine, which is what jsdom could not do.

Type of change:

  • Bug fix

High-level design:

N/A — small change (2 files, +19 / −73).

Tests:

Use cases covered

  • A test case's bundle-suite link resolves correctly regardless of whether the observability routes are namespaced by a downstream router override.
  • Revealing the comment delete affordance on hover does not reflow the comment body.

Unit tests

Not applicable — this PR only changes Playwright specs.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

This PR is the Playwright change.

  • playwright/e2e/Features/DataQuality/TestCaseDetailsPage.spec.ts — assertion corrected.
  • playwright/e2e/Features/Tasks/TaskComments.spec.ts — geometry test removed; toHaveCSS('position', 'static') added to 'the comment actions are reachable and operable by keyboard alone', which retains the regression signal (a revert to position: absolute or a display-based reveal fails immediately).

Manual testing performed

  1. Downloaded the failing run's Playwright report and trace and read the DOM snapshots directly to establish both root causes (scroll-top delta; router override).
  2. yarn lint:playwright — exit 0, 0 errors (219 pre-existing tree-wide warnings, none on either edited file).
  3. organize-imports-cli → eslint --fix → prettier on both files; re-check reports no diff.
  4. tsc --project playwright/tsconfig.json — TestCaseDetailsPage.spec.ts clean; TaskComments.spec.ts reports only a pre-existing TS6133: 'taskId' is declared but its value is never read at line 46, untouched by this diff (the playwright project has 348 pre-existing tsc errors overall).

The specs themselves were not executed locally — they need the full stack. Both are in the selection any PR touching them triggers, so this run will exercise them.

UI screen recording / screenshots:

Not applicable — no product code changed.

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 UI changes: not applicable, no product code changed.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no actionable new correctness, security, or repository-rule violations identified.

Summary

This PR corrects two Collate-specific Playwright test failures:

  • Matches bundle test-suite links by route suffix so downstream observability prefixes are supported.
  • Replaces viewport-relative geometry comparison with computed-style checks across hover.
  • Regenerates the Playwright impact map after removing the standalone geometry test.

Reviews (2) · Last reviewed commit: "Cover the hover half of the comment acti..."

Both failed 3/3 retries in the Collate AUT full run (35518918577); neither
is flaky, and both are test defects rather than product bugs.

TestCaseDetailsPage: the bundle-suite link assertion pinned the OSS route
literal `/test-suites/<fqn>`. `observabilityRouterClassBase.getTestSuitePath`
is a no-op base in OSS but is overridden downstream, and Collate in AI app
mode serves the route namespaced under `/observability`, so the exact-string
match could only ever hold on OSS. Match the suffix instead, which is what
the table-suite assertion two lines above already does.

TaskComments: the hover test compared `boundingBox()` across `hover()`.
Bounding boxes are viewport-relative, and Playwright's actionability check
scrolls the target into view before hovering - the trace shows the scroll
container going from scrollTop 44 to 53, exactly the 9px the assertion
reported as a reflow, with every DOM node in both snapshots an unchanged
back-reference. Nothing moved. The invariant it meant to guard is that the
actions bar stays in flow and is revealed by opacity alone, which is a
computed-style fact - assert it as one, next to the opacity assertions that
already pin the same mechanism, and drop the geometry test.
Copilot AI lite review requested due to automatic review settings September 21, 2026 06:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 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 21, 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: 796 → 796
- 0 added, 0 removed, 3 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/RichTextEditorPreviewNew.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/RichTextEditorPreviewerV1.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/TaskDescriptionPreviewer.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

Copilot AI review requested due to automatic review settings September 21, 2026 06:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Review pointed out that the retained `position: static` assertion sits in
the keyboard test, which parks the pointer and never hovers, so a future
`:hover` rule changing display, height, margin or padding could reflow the
comment body with nothing to catch it. That gap is real - it predates this
branch, since the deleted geometry check compared viewport-relative boxes
and so reported scroll rather than reflow either way.

Cover it where the card is already hovered: sample the actions bar's
layout-affecting computed styles at rest, hover, and assert they are
unchanged. Computed styles rather than boxes are immune to the scroll that
`hover()` performs, and fail on the cause rather than on whichever box the
reflow happens to move. Longhands rather than the margin/padding shorthands
so an empty computed value cannot pass by comparing '' to ''.
Copilot AI review requested due to automatic review settings September 21, 2026 06:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
Code Review ✅ No issues found

🟡 Medium risk · Playwright assertions and hover-coverage changes are bounded to test behavior.

Fixes two Playwright specs that failed only on the Collate build: corrects TestCaseDetailsPage.spec.ts to match route suffixes instead of hardcoded OSS paths, and replaces the viewport-sensitive geometry check in TaskComments.spec.ts with a computed-style assertion that guards the no-reflow invariant. 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 f7c1d67999d822948be27aad992e667362131100 in Playwright run 35570507001, attempt 1.

✅ 577 passed · ❌ 0 failed · 🟡 1 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) 34m 21s

⏱️ Max setup 4m 32s · max shard execution 17m 54s · max shard-job elapsed before upload 21m 24s · reporting 5s

🌐 233.01 requests/attempt · 2.23 app boots/UI scenario · 37.34% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 37.34% (convergence target: at most 15%).
  • Browser traffic was 233.01 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (1335 boots / 600 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 129 0 0 0 0 0
✅ Shard chromium-02 149 0 0 0 0 0
🟡 Shard chromium-03 141 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 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
🟡 1 flaky test(s) (passed on retry)
  • Pages/Entity.spec.ts › Tag and Glossary Term preservation in column detail panel (shard chromium-03, 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

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit 76cff1a Sep 21, 2026
109 of 112 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the claude/test-failure-rca-4fe675 branch September 21, 2026 09:34
ShaileshParmar11 added a commit that referenced this pull request Sep 21, 2026
… mode

#33679 relaxed this assertion to a suffix match because `getTestSuitePath`
was a no-op in OSS and only Collate's override namespaced the route. This
branch makes OSS namespace it too, in AI app mode, which `openDetailsPage`
enables — so the comment's reasoning no longer matches the code.

The regex is already correct for both builds. Only the comment changes.
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Sep 22, 2026
… routes in AI app mode (open-metadata#33681)

* Fixes open-metadata#33502: Keep observability links on /observability routes in AI app mode

ObservabilityRouterClassBase returned classic paths regardless of app mode, so
in-app navigation from the AI Data Quality page (tabs, test case links,
breadcrumbs) fell back to classic pages rendered inside the AI shell.

- isEmbeddedMode() now mirrors AppRouter's AI-shell check (AI_APP_MODE or an
  active app-mode session).
- Data quality, incident manager, test suite, test case, version and dimension
  paths get the /observability prefix in that mode; each matches a route in
  observability.module.tsx. Alert paths already live under /observability.
- A path method a subclass overrides is left unprefixed so Collate's override,
  which still prefixes on top of super, does not produce a double prefix.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Fixes open-metadata#33502: note that OSS also namespaces the test suite path in AI mode

open-metadata#33679 relaxed this assertion to a suffix match because `getTestSuitePath`
was a no-op in OSS and only Collate's override namespaced the route. This
branch makes OSS namespace it too, in AI app mode, which `openDetailsPage`
enables — so the comment's reasoning no longer matches the code.

The regex is already correct for both builds. Only the comment changes.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
anuj-kumary pushed a commit that referenced this pull request Sep 22, 2026
… app mode (#33681)

* Fixes #33502: Keep observability links on /observability routes in AI app mode

ObservabilityRouterClassBase returned classic paths regardless of app mode, so
in-app navigation from the AI Data Quality page (tabs, test case links,
breadcrumbs) fell back to classic pages rendered inside the AI shell.

- isEmbeddedMode() now mirrors AppRouter's AI-shell check (AI_APP_MODE or an
  active app-mode session).
- Data quality, incident manager, test suite, test case, version and dimension
  paths get the /observability prefix in that mode; each matches a route in
  observability.module.tsx. Alert paths already live under /observability.
- A path method a subclass overrides is left unprefixed so Collate's override,
  which still prefixes on top of super, does not produce a double prefix.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Fixes #33502: note that OSS also namespaces the test suite path in AI mode

#33679 relaxed this assertion to a suffix match because `getTestSuitePath`
was a no-op in OSS and only Collate's override namespaced the route. This
branch makes OSS namespace it too, in AI app mode, which `openDetailsPage`
enables — so the comment's reasoning no longer matches the code.

The regex is already correct for both builds. Only the comment changes.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Sep 22, 2026
… assertion in non-existent glossary test (open-metadata#33760)

* fix(playwright): replace flaky isVisible chain with deterministic 404 assertion for non-existent glossary test

The original test checked six conditions with isVisible({ timeout })
which does not retry — it snapshotted the current DOM state instantly.
The .left-panel-card skeleton renders before the API response arrives,
so the test short-circuited to true on that last condition and passed
as a false positive. On slower runs nothing had rendered yet and all
six checks returned false, causing the intermittent failure.

Replace with:
- page.waitForResponse() hoisted before page.goto() to intercept
  /api/v1/glossaries/name/* and assert HTTP 404
- expect().toBeVisible() on data-testid="empty-placeholder" (the
  actual element GlossaryPage renders via EmptyPlaceholder when
  isGlossaryNotFound is true) with a 10 s auto-retry timeout

Also removes the suppressed waitForAllLoadersToDisappear().catch(()=>{})
which masked the incomplete page state.

* remove narrating comments per review

* chore(playwright): prune 2 stale no-positional-locators suppressions after .first() removal

* chore(playwright): lower corpus no-positional-locator total 1183→1181 after removing 2 .first() calls

* fix(checkstyle): restore 2-space indent and trailing comma in import block

* Fixes open-metadata#33502: Keep observability links on /observability routes in AI app mode (open-metadata#33681)

* Fixes open-metadata#33502: Keep observability links on /observability routes in AI app mode

ObservabilityRouterClassBase returned classic paths regardless of app mode, so
in-app navigation from the AI Data Quality page (tabs, test case links,
breadcrumbs) fell back to classic pages rendered inside the AI shell.

- isEmbeddedMode() now mirrors AppRouter's AI-shell check (AI_APP_MODE or an
  active app-mode session).
- Data quality, incident manager, test suite, test case, version and dimension
  paths get the /observability prefix in that mode; each matches a route in
  observability.module.tsx. Alert paths already live under /observability.
- A path method a subclass overrides is left unprefixed so Collate's override,
  which still prefixes on top of super, does not produce a double prefix.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Fixes open-metadata#33502: note that OSS also namespaces the test suite path in AI mode

open-metadata#33679 relaxed this assertion to a suffix match because `getTestSuitePath`
was a no-op in OSS and only Collate's override namespaced the route. This
branch makes OSS namespace it too, in AI app mode, which `openDetailsPage`
enables — so the comment's reasoning no longer matches the code.

The regex is already correct for both builds. Only the comment changes.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fixes open-metadata#33502: Move the AI-mode observability e2e suite from Collate to OSS (open-metadata#33683)

* test(ui): move the AI-mode observability e2e suite from Collate to OSS

The AI shell and the observability module live in OSS since open-metadata#31911, and
open-metadata#33502 moved the /observability link prefixing there too, so the e2e
coverage for those pages belongs in OSS rather than collate-ui.

Seven specs move into playwright/e2e/Features/AIMode/, alongside the
CustomPropertiesPanel spec migrated earlier. Their imports already
pointed almost entirely at the OSS tree, so the move is mostly dropping
the src/openmetadata-ui/playwright/ prefix.

Two helpers the specs needed come across into e2e/Utils/appMode.ts:
redirectToAiModeHomePage and expandAiSubPanel. Both shed their
AskCollate-only parts — the chat query-cache clear and the
chatConversations bootstrap wait — and ObservabilityPermissions now
waits on the ask-sidebar to confirm the shell booted instead.

Pipeline observability pages are still Collate-only (observability.module
routes them through the app-mode fallback), so those blocks stay behind:
the whole Pipeline describe in ClickPaths, the Pipeline page-rendering
and breadcrumb rows, and the pipeline detail-URL test.

OSS's playwright guardrails are stricter than Collate's, and the
suppressions baseline may not grow, so the positional locators that came
across carry justified inline disables naming why the position is the
assertion. One Buffer.compare became a base64 comparison, which this
repo's @types/node accepts.

* chore(playwright): auto-refresh impact-map.generated.json

* test(ui): seed timing-baseline for the moved AI-mode observability specs

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (open-metadata#30812). The
seven newly-moved files had no history at all, so Observability (17),
TestCaseBreadcrumb (6) and TestCaseEdit (5) tripped the >=5-test hard
fail and the rest warned.

Durations are real, not estimates: captured from a local
`--project=chromium --workers=1 --reporter=json` run against a live
stack, in which all 39 of these tests passed. Only passing results are
recorded, with outcome: expected.

* test(ui): assert the alert modal and settle permissions before absence checks

Two review findings on the migrated specs, both carried over verbatim from
Collate rather than introduced by the move.

Add Alert opened nothing observable: the test asserted the URL, the AI
sidebar and the text "Add Alert", all of which are already true before the
click — "Add Alert" labels the trigger as well as the modal. Measured on a
running stack: before the click the page has 0 `role="dialog"` nodes and no
`alert-name-input`, while the text is already present. Assert the dialog and
two of its fields instead, which a broken open handler cannot satisfy. The
positional-locator suppression that the text match needed goes away with it.

The permission absence checks could pass before permissions loaded.
`SubPanel` filters a gated item on
`Boolean(permissions?.[resource]?.[operation])`, which is equally false when
access is denied and while the provider still holds its empty initial value,
so a permission-loading regression would have kept the suite green. Settle
the boot-time `GET /api/v1/permissions` in the fixture, hoisted above
`login()` — that navigation boots the app and issues the fetch, confirmed by
the suite passing in 13s rather than hanging on the listener.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Move the query-builder and filter glossary fields onto GlossaryTermPicker (open-metadata#33736)

* feat(ui): move the query-builder glossary fields onto GlossaryTermPicker

Migrates the remaining glossary-term selectors: the Workflow Builder
condition values, the Data Quality dashboard filter, and the three
query-builder fields (advanced search, JSONLogic related terms, and the
data contract semantics rule).

The query-builder fields mark themselves with `withGlossaryTermField`
rather than being matched by path, because the JSONLogic builders reach
glossary terms, classification tags and tier through the same
`tags.tagFQN` subfield. The widgets swap only the rendered control and
still hand RAQB the same FQN string, so operators and the ES/JSONLogic
serialisation are unchanged.

`fqnsToGlossaryTags`/`glossaryTagsToFqns` centralise the FQN mapping the
CSV editor already needed.

* fix(ui): keep the DQ glossary filter as a chip, with the shared tree inside

The filter bar renders every filter as a labelled button chip, and its
regression test asserts that. Rendering the picker's input trigger there
broke both that check and the flow that drives the chip's search box.

Give the picker the button trigger and staged commit the other filters
use, so the chip affordance is unchanged and only the dropdown contents
become the shared tree.

* fix(ui): key the DQ glossary filter testid off the label, as the specs do

The dashboard's E2E locators are label-based (search-dropdown-Tag,
search-dropdown-Glossary Term); switching to searchKey broke the
domain-tab filter-bar check.

* fix(ui): decide the glossary control in the widget config, not the widget

OMSelectWidget returned its async ComboBox before reaching the glossary
check, so a glossary field — which sets asyncFetch and useAsyncSearch —
kept the flat select for single-value operators and the migration never
took effect there.

Branching in the OMConfig factories fixes that for both operators and
keeps either widget's complexity unchanged. Adds a test that pins which
control each factory returns.

Also forwards the dashboard chip's isOpen/onOpenChange so the filter bar
can still close it, and extracts the widget's nested ternary.

* test(ui): assert the glossary factory against real widgets and the real marker

Renders the actual OMSelectWidget/OMMultiSelectWidget rather than mocks,
and builds the field settings with withGlossaryTermField, so the test
covers the production marker path instead of mock wiring. Only the picker
stays mocked — it mounts the glossary tree and fetches on open.

* refactor(ui): fold the picker's map+filter into one reduce

The filter existed as a type predicate to narrow the intermediate array
that map produced. Building the list in one pass drops both the extra
array and the predicate.

* refactor(ui): name the DQ filter discriminants and reduce the FQN mapping

Adds DQ_FILTER_TYPES alongside the existing DQ_FILTER_KEYS and uses it
for every `type` on DqFilterDescriptor — the declarations, the emitted
descriptors, both renderers and the hook test — so the discriminant is
no longer a bare string.

Also folds fqnsToGlossaryTags into a single reduce.

* refactor(ui): use DQ_FILTER_TYPES in the remaining type comparisons

The earlier sweep only matched `type === '...'`, so the `type !== '...'`
guards in the hook test and the `type: '...' as const` fixtures in the
chip and bar tests were left as bare strings.

* fix checkstyle

* Fixes open-metadata#33753: de-flake visitUserProfilePage by dropping its Elasticsearch dependency (open-metadata#33757)

* Fixes open-metadata#33753: de-flake visitUserProfilePage by dropping its Elasticsearch dependency

visitUserProfilePage() reached a profile by driving the Users list UI:
search the name, wait for /api/v1/search/query?index=user, click the row.
That list is Elasticsearch-backed, so a user created seconds earlier may
not be indexed yet — and the wait cannot recover, because exactly one
search is issued and nothing re-queries once the empty result renders.
The 15s visibility wait runs against a list that will never repopulate.

Navigate straight to /users/<name> and wait on the profile page's own
users/name read, which is immediately consistent. No search index, no
list-refresh race, one request instead of three.

All six callers only want the profile page; Users.spec re-enters the list
explicitly via visitUserListPage afterwards, so nothing depended on the
side effect. Specs that genuinely exercise list search already use
searchUserByEmail.

Also drop UserProfileOnlineStatus's createOrFetchUser: its fallback did
GET /api/v1/users?email=... but UserResource's list endpoint has no email
query param, so the filter was ignored and an arbitrary user came back.
UserClass.create() already re-fetches by name when the user exists.

* Encode the username and assert the profile response succeeded

Review feedback on open-metadata#33757.

The helper interpolated the raw username into both the route and the
response matcher. The app encodes it in both, so a name containing a
reserved character produced a matcher that never matched and a wait that
timed out instead of failing on the real problem.

Awaiting the response also accepted a 404/5xx: the page drops its loader
and renders an error state, and callers that guard assertions on
visibility (UserProfileOnlineStatus) would then assert nothing and pass.
Assert the response is ok, with the status in the message.

* fix(ui): hide Login Configuration when an external SSO provider is configured (open-metadata#33598)

* fix(ui): hide Login Configuration when an external SSO provider is configured

The login configuration (failed-attempt lockout, access block time, JWT
expiry) is enforced by OpenMetadata's own login flow. Under an external IdP
those settings are inert, but the page was still listed under Settings >
Preferences for every admin.

LoginConfigurationPage already knew this and skipped the fetch for non-basic
providers, but still rendered — so the page showed "--" for every field, and
the Edit button stayed live, letting an admin save values that never take
effect.

Gate the menu item on the provider alongside the existing admin check, and
404 both the details and edit routes so a bookmarked URL cannot reach them,
matching the existing Navigate-to-NOT_FOUND guards in SettingsRouter. With
the route as the single gate, the page's own unreachable provider check is
removed.

LDAP is treated as basic: the server enforces the same login config for it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(ui): keep Login Configuration visible for the openmetadata provider

Review caught that the provider predicate excluded AuthProvider.Openmetadata.
That is wrong: the server routes `openmetadata` through BasicAuthServletHandler
("OpenMetadata provider uses Basic auth internally",
AuthServeletHandlerFactory), and JwtFilter#isSameProvider documents `basic` and
`openmetadata` as two historical names for the same native-password
authenticator. The login configuration is therefore enforced for it, and hiding
the page removed access to settings that were still live.

LDAP stays included — LdapAuthenticator reads the same three settings
(maxLoginFailAttempts, accessBlockTime, jwtTokenExpiryTime).

Renamed isBasicAuthProvider to isLoginConfigurationApplicable: the set is three
providers, not "basic", and the name now states the rule it encodes rather than
one of its members.

Tests assert all three providers keep the page; the hidden set stays derived
from the enum so a newly added provider defaults to hidden.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* chore(playwright): auto-refresh impact-map.generated.json

* fix(ui): stop the settings menu reaching into the application store

CI failed with "useApplicationStore.getState is not a function". Reading the
store inside getGlobalSettingsMenuWithPermission made a pure util depend on a
hook, so every test that mocks useApplicationStore as a bare jest.fn() — 141
files do — crashed the moment it reached the settings menu.
EntitySearchSettings.test.tsx was the one that broke.

frontend-performance.md already forbids this ("pure utilities cannot depend on
React, UI/state layers, pages, hooks, or REST"). It was dismissed because lint
did not flag it and TableClassBase does the same thing; the rule was right and
the precedent is a latent bug of the same shape.

The provider is now an optional third argument, passed by the two pages that
actually render the entry. Omitting it leaves the entry visible: showing an
inert settings page is cosmetic, hiding a live one takes working settings away
from admins.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* Merge branch 'main' into fix/hide-login-configuration-under-sso

Resolved .github/playwright/impact-map.generated.json by regenerating it
(python3 .github/scripts/generate_playwright_impact_map.py) on top of main's
version rather than hand-merging a generated file.

AuthProvider.util.ts auto-merged: main's AuthCoordinator/validator refactor
(open-metadata#31675) and this branch's isLoginConfigurationApplicable predicate touch
different parts of the file; both verified present afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* chore(playwright): auto-refresh impact-map.generated.json

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(e2e): stabilise SubDomainPagination and GlossaryHierarchy flaky Playwright tests (open-metadata#33747)

* fix(e2e): stabilise SubDomainPagination and GlossaryHierarchy flaky tests

SubDomainPagination: 60 subdomains were created in parallel then
tests began immediately.  checkSubDomainCount polls Elasticsearch,
so it raced the async indexing pipeline.  Fix: after the parallel
creates, poll all 60 FQNs concurrently via waitForSearchIndexed
(domain_search_index, 60 s timeout) so the beforeAll only returns
once every subdomain is searchable.

GlossaryHierarchy H-M03 ("move nested term to root level"):
changeTermHierarchyFromModal triggers moveAsync on the backend, which
returns HTTP 200 immediately but applies the hierarchy change
asynchronously.  H-M04 and H-M05 already had expect.poll guards for
this (added in open-metadata#33440); H-M03 was missing the same pattern.  Fix:
add expect.poll on GET /api/v1/glossaryTerms/:id checking term.parent
is falsy, with 60 s timeout and backoff intervals, matching the
existing H-M04/H-M05 pattern exactly.  Also add test.slow(true) since
the async processing can take longer than the default timeout.

* fix(playwright): guard against transient API errors in GlossaryHierarchy H-M03 poll

Without res.ok() check, a non-2xx transient response returns a body
without a parent field (undefined), which falsely satisfies .toBeFalsy()
and exits the poll before the async move completes.

* revert(playwright): remove redundant subdomain waitForSearchIndexed in SubDomainPagination

checkSubDomainCount already polls the UI count with a 120s timeout and
page reloads, so the parallel waitForSearchIndexed for 60 subdomains in
beforeAll was unnecessary and only slowed setup.

* fix(playwright): wait for domain dropdown to close in openDataProductDrawer

After clicking a domain option in the Ant Design Select, the dropdown
overlay lingers briefly during its close animation. The next click (on
the Glossary Terms TreeSelect trigger) was being intercepted by that
overlay, preventing the tree popover from opening. Wait for the selected
domain title to appear in the selector before returning — this confirms
the dropdown has fully closed.

* refactor(playwright): shorten comments to one-liners

* fix(playwright): wait for domain dropdown to close in openDataProductDrawer

* fix(playwright): wait for domain dropdown to close in openDataProductDrawer

* style(playwright): format domain.ts to satisfy Prettier line-length

* fix: add domain filter to GlossaryResource list endpoint (open-metadata#31971)

* fix: add domain filter to Glossary list endpoint

* fix: handle empty domain filter and add regression IT for glossary domain listing

- Skip the filter for a null/empty ?domain= instead of resolving an empty
  FQN (which 404s), matching ServiceEntityResource/DataProductResource
- Add GlossaryResourceIT#test_listGlossaries_domainFilter covering
  in-domain/out-of-domain scoping and the empty-domain regression

* test: make glossary domain-filter IT pagination-safe

- Set an explicit high limit on the list calls so a busy shared IT instance
  cannot page a target glossary out of the asserted results
- Drop comments that restated the assertions; keep the empty-domain rationale

* test: split glossary domain-filter IT into focused cases

- One nameable behaviour per test (in-domain include, other-domain exclude,
  empty-domain unfiltered) via a shared seedGlossaryInDomain helper
- final locals; keeps the explicit high limit so results stay deterministic

---------

Co-authored-by: sonika-shah <[email protected]>

* chore(playwright): lower no-positional-locator corpus count 1175→1173 after main merge

Two additional positional-locator suppressions were removed by PRs that landed in
main after the last sync; the recorded global total must match the live suppression
count exactly.

---------

Co-authored-by: Shailesh Parmar <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Harsh Vador <[email protected]>
Co-authored-by: Sweta Agarwalla <[email protected]>
Co-authored-by: Arvin <[email protected]>
Co-authored-by: sonika-shah <[email protected]>

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.

Two Playwright specs assert build-specific details and fail only on the Collate run

4 participants