Skip to content

Fixes #33753: de-flake visitUserProfilePage by dropping its Elasticsearch dependency - #33757

Merged
harsh-vador merged 2 commits into
mainfrom
fix/deflake-user-profile-navigation
Sep 22, 2026
Merged

harsh-vador merged 2 commits into
mainfrom
fix/deflake-user-profile-navigation

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #33753

visitUserProfilePage() reached a user's profile by driving the Users list UI — Settings → Users → type the name → wait for one /api/v1/search/query?index=user → click the row. That list is Elasticsearch-backed (UserListPageV1.userQuerySearch → searchQuery({ searchIndex: SearchIndex.USER })), so a user created seconds earlier may not be indexed yet.

The wait cannot recover from that. Exactly one search is issued; if it returns zero hits, setUserList([]) renders an empty table and nothing re-queries, because searchValue is unchanged and no effect re-runs. expect(row).toBeVisible() then burns its full 15s against a list that will never repopulate. Whether the test passes is a race between ES indexing latency and a single request.

A second race lives in the same helper: listLoader.waitFor({ state: 'detached' }) runs before the fill, and waitFor('detached') passes trivially when the element was never attached (the list may not have mounted). The in-flight unfiltered getUsers can then resolve after the search and overwrite userList — fetchUsersList has no request-id guard, unlike userQuerySearch's latestSearchIdRef.

Fix: 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 right after, so nothing depended on the side effect, and specs that genuinely exercise list search already use searchUserByEmail.

Also fixed: UserProfileOnlineStatus.spec.ts's createOrFetchUser fallback called GET /api/v1/users?email=<email>&limit=1. UserResource's list endpoint has no email query param (fields, team, limit, before, after, isAdmin, isBot, ownsEntityType, directOwnsOnly, include), so the filter was silently ignored and an arbitrary user came back — the spec then profiled the wrong person. The fallback was redundant anyway: UserClass.create() already re-fetches by name on "User with Email Already Exists".

Flake data

24h scan of merge_group runs of the Postgresql PR Playwright E2E workflow (32 runs, 964 shards):

Occurrences Test
5 / 32 runs Flow/AddRoleAndAssignToUser.spec.ts:117 — Verify assigned role to new user
5 / 32 runs Features/UserProfileOnlineStatus.spec.ts:77 — online status badge for active users

Both are consistent with this cause. In AddRoleAndAssignToUser only the third test flakes — it is the only one that searches for the user created by the second test; tests 1 and 2 never touch Elasticsearch. In UserProfileOnlineStatus every assertion in the named test is wrapped in if (isVisible) and cannot fail, so the only thing in it that can fail is visitUserProfilePage.

Blast radius: the same latent race is removed from Tag, UserCreationWithPersona, UserDetails and Users, which share the helper (as does utils/rightPanelNavigation.ts).

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Admin opens another user's profile page immediately after that user is created by API or through the UI, with no dependency on user_search_index freshness.

Unit tests

Not applicable — Playwright helper change, no product code touched.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

This PR is itself a Playwright fix. No new specs; the two named flaky specs and the four other callers of the helper are the coverage.

  • Files updated: playwright/utils/user.ts, playwright/e2e/Features/UserProfileOnlineStatus.spec.ts

Manual testing performed

  1. npx tsc --noEmit -p playwright/tsconfig.json — no new errors on either changed file (the two TS6133 in utils/user.ts are pre-existing; confirmed by stashing the change and re-running).
  2. npx eslint playwright/utils/user.ts playwright/e2e/Features/UserProfileOnlineStatus.spec.ts — 0 errors (1 pre-existing warning at user.ts:602, unrelated).
  3. npx prettier --check on both files — clean.

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 #33753 above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For UI changes: N/A, 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; the previously reported URL-encoding and unsuccessful-response handling issues are fully fixed.

Summary

This PR stabilizes user-profile Playwright flows by navigating directly to the immediately consistent user API-backed profile instead of searching the Elasticsearch-backed user list.

  • Encodes usernames consistently in the profile route and API response matcher.
  • Verifies that the profile request succeeds before callers continue.
  • Removes a fallback lookup that used an unsupported email query parameter and could select the wrong user.

Reviews (2) · Last reviewed commit: "Encode the username and assert the profi..."

…arch 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.
@github-actions

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 the UI UI specific issues label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@harsh-vador harsh-vador added safe to test Add this label to run secure Github workflows on PRs e2e This will trigger e2e test workflows testing labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit a58e95dfb2029a38bc5aa1faf7e7a8c8e9f97b10 in Playwright run 35691025146, attempt 1.

✅ 789 passed · ❌ 0 failed · 🟡 4 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) 45m 35s

⏱️ Max setup 5m 32s · max shard execution 19m 23s · max shard-job elapsed before upload 22m 36s · reporting 7s

🌐 237.97 requests/attempt · 2.38 app boots/UI scenario · 29.32% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 29.32% (convergence target: at most 15%).
  • Browser traffic was 237.97 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.38 per UI scenario (2002 boots / 841 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 120 0 1 0 0 0
🟡 Shard chromium-02 183 0 2 0 0 0
✅ Shard chromium-03 164 0 0 0 0 0
🟡 Shard chromium-04 160 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 import-export-01 4 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
🟡 4 flaky test(s) (passed on retry)
  • Pages/Domains.spec.ts › Rename domain with data products attached at domain and subdomain levels (shard chromium-01, 1 retry)
  • Pages/DomainAdvanced.spec.ts › cancel on remove warning modal keeps the asset in the domain (shard chromium-02, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard chromium-02, 1 retry)
  • Pages/Entity.spec.ts › Glossary Term Add, Update and Remove (shard chromium-04, 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

@harsh-vador harsh-vador self-assigned this Sep 22, 2026
Review feedback on #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.
@gitar-bot

gitar-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Playwright navigation and fixture setup change test execution behavior across multiple specs

Eliminates flaky Elasticsearch dependency from visitUserProfilePage() by navigating directly to /users/<name> and waiting on the profile page's own authoritative user-by-name request. Also removes a redundant and invalid email-filter fallback from UserProfileOnlineStatus.spec.ts setup. 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

@harsh-vador
harsh-vador added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit 1c9ebfd Sep 22, 2026
111 of 113 checks passed
@harsh-vador
harsh-vador deleted the fix/deflake-user-profile-navigation branch September 22, 2026 08:05
anuj-kumary pushed a commit that referenced this pull request Sep 22, 2026
…arch dependency (#33757)

* Fixes #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 #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.
chirag-madlani added a commit that referenced this pull request Sep 22, 2026
Third-pass main merge (5 new commits from main + 4 UI-checkstyle guardrail
fixes on files inherited from main).

Conflict resolutions:
- src/utils/GlobalSettingsClassBase.ts: union both imports (Operation +
  checkPermission from PR, AuthProvider + isLoginConfigurationApplicable
  from main).
- playwright/utils/user.ts (visitUserProfilePage): take main's ES-independent
  approach from #33757 (URL waitForResponse + response.ok() guard +
  waitForAllLoadersToDisappear) plus HEAD's waitUntil: 'domcontentloaded'
  and user-email-value visibility assertion. Drop now-unused
  getEncodedFqn/waitForResponseWithStatus imports.
- playwright/e2e/Features/UserProfileOnlineStatus.spec.ts: take main's
  version (added by #33757).

UI-checkstyle guardrail fixes on files inherited from main
(no-implicit-navigation-load + no-status-filtered-response — rules that only
exist on this PR, so main never enforced them):
- AIMode/Observability.spec.ts:35: add waitUntil: 'domcontentloaded' to
  page.waitForURL().
- AIMode/TestCaseBreadcrumb.spec.ts:70: same.
- AIMode/ObservabilityPermissions.spec.ts:67: replace
  page.waitForResponse(r => ... && r.ok()) with
  waitForResponseWithStatus(..., 'ok').
- Glossary/GlossaryStatusFilterNestedTerms.spec.ts:188: same pattern with
  status 200.

Playwright test failures on the previous head (8 shards) all trace to
tests inherited from main (AIMode/*, DataContracts, BulkImport,
GlossaryImportExport, LineageSettings, TeamsDragAndDrop). Not touching
per instruction.

Merged for @harshach with prior approval.
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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>
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) <noreply@anthropic.com>

* 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) <noreply@anthropic.com>

* 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) <noreply@anthropic.com>

* 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) <noreply@anthropic.com>

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

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 <58761340+sonika-shah@users.noreply.github.com>

* 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 <shailesh.parmar.webdev@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Harsh Vador <58542468+harsh-vador@users.noreply.github.com>
Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com>
Co-authored-by: Arvin <31638790+zhang-arvin@users.noreply.github.com>
Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com>

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

e2e This will trigger e2e test workflows safe to test Add this label to run secure Github workflows on PRs testing UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playwright: visitUserProfilePage is Elasticsearch-dependent and cannot recover from indexing lag

3 participants