Skip to content

fix(test): eliminate pagination loader race in ContextCenterArticles - #34805

Merged
Rohit0301 merged 82 commits into
fix/playwright-deflake-click-and-lazy-load-racesfrom
fix/pagination-loader-race-condition
Oct 7, 2026
Merged

Rohit0301 merged 82 commits into
fix/playwright-deflake-click-and-lazy-load-racesfrom
fix/pagination-loader-race-condition

Conversation

@Rohit0301

Copy link
Copy Markdown
Contributor

Why

waitForAllLoadersToDisappear ran immediately after the API response resolved, before React had a chance to mount the isLoadingMore loader. It always saw count=0 and exited early, making the subsequent card-count assertion flaky.

What changed

  • KnowledgePageListComponent.tsx — added data-testid="knowledge-page-loader" to the {isLoadingMore ? <Loader> : null} element so tests can target it specifically.
  • ContextCenterArticles.spec.ts — replaced waitForAllLoadersToDisappear(page) with a two-phase guard on the specific loader:
    1. expect(paginationLoader).toBeVisible({ timeout: 3000 }).catch(() => null) — waits for the loader to mount (the .catch handles sub-frame flashes where it appears and disappears before we get a chance to observe it)
    2. paginationLoader.waitFor({ state: 'hidden' }) — waits for it to fully disappear before asserting card count

Test plan

  • Run yarn playwright test e2e/Features/ContextCenterArticles.spec.ts --grep "Pagination works" --repeat-each=5 and confirm no flakes
  • Run yarn lint:playwright — no new suppressions

🤖 Generated with Claude Code

harshach and others added 30 commits October 5, 2026 08:25
…tive workflows own it (#34541)

* Fixes #34540: Support a shared lifecycle stage on entities and let active workflows own it

Every entity type whose schema declares entityStatus now gets its lifecycle
stage rules from EntityRepository instead of a schema default, so they live in
one place:

- A new entity starts in its type's stage: Draft for domains, data products,
  glossaries, articles, ontology axioms, data contracts and AI assets;
  Approved for assets that come from the data infrastructure. Metrics and
  glossary terms start Draft only when they have reviewers.
- A PUT, bulk upsert or CSV import whose request carries no stage keeps the
  stage the entity is in instead of resetting it.
- While a deployed, unsuspended governance workflow sets an entity type's
  stage, only that workflow (acting as the governance bot) may change it.
  A direct change is rejected with 403, and a create that asks for a stage the
  workflow owns starts in the type's own stage. The workflow's trigger filter
  decides which entities it owns; suspending it releases them.
- GET /v1/metadata/types/lifecycleStages lists the stages and, per entity
  type, the workflows that own its stage.
- Context memories move from their own Draft/Active/Archived status onto
  entityStatus. The 2.1.0 migration converts stored memories and their
  version history (Active becomes Approved).
- The approval-task closing, in-review delete and reviewer rules that seven
  repositories each duplicated are shared now, with per-type flags keeping
  each rule on the entity types that had it.
- A consolidated update no longer re-validates a stage change that an earlier
  version made, such as a workflow approving on the user's behalf.
- createOntologyAxiom no longer requires entityStatus, and DataProduct
  lifecycleStage is deprecated in favor of entityStatus.

BaseEntityIT checks the stage rules for every entity type; types without a
lifecycle (users, teams, test suites, ...) opt out.

* Update generated TypeScript types and dereferenced schemas

* Cover the repository lifecycle-stage rules with unit tests

The repositories' stage rules reached the active workflows through a static
EntityStatusWorkflows lookup, so no unit test could put an entity under an
owning workflow. EntityRepository now takes a StageOwnership, with the active
workflows as its default, and the create-time stage assignment and the
updater's stage check are package-private instead of being reached through
reflection.

New tests cover a create that asks for a workflow-owned stage, the workflow
creating and moving an entity in that stage, types whose stage no workflow
owns, approval and rejection by reviewers and reviewing teams, sending an
entity in review back to Draft, session consolidation, memory transitions
through the updater, and glossary terms inheriting reviewers. Line and branch
coverage of the repositories' stage code goes from 66% and 58% to 91% each.

* Let an entity type declare its own lifecycle stages

Every type with entityStatus draws its stages from one vocabulary, but a type
can now declare its own lifecycle in its repository: the stages it uses,
including stages only it has, and the moves between them. Types that declare
none keep the general lifecycle, any move between today's seven stages, so
nothing changes for them, Metric included. A stage added to the vocabulary
later is outside the general lifecycle, so only the types that declare it can
use it.

EntityRepository rejects with 400 a create in a stage outside the type's
lifecycle and a stage change the lifecycle has no move for, for direct edits,
imports and workflows alike. Context memories are the first type to declare
one (Draft, Approved, Archived), replacing their own transition table and
validators. GET /v1/metadata/types/lifecycleStages now reports each type's
stages and transitions, and BaseEntityIT checks that every type rejects a move
outside its lifecycle.

* test(amundsen): expect approved service status

* Fix lifecycle-stage regressions in shared entity status

- Keep main's starting stages: entities start Unprocessed unless their type
  derives one (glossary terms and metrics from reviewers, ontology axioms Draft,
  system relationship types and memories Approved); keep DataProduct
  lifecycleStage instead of deprecating it.
- Record governance-bot impersonation on page, ontologyAxiom, relationshipType,
  contextMemory and AI asset schemas, so a workflow's own Set Action is not
  rejected by the stage lock it holds.
- Apply the stage rules to batched CSV import updates (workflow lock, lifecycle
  moves, keep stored stage when the row has none) and keep a blank glossary
  status instead of resetting it to Draft.
- Skip workflow definitions this server cannot read when resolving stage
  ownership instead of failing every stage change.
- Restore the in-review delete flag on Tag and TestCase.
- Seed glossary status-filter Playwright specs with their glossary excluded
  from the approval workflow, and update ITs for main's starting stages.

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

* Update generated TypeScript types and dereferenced schemas

* Apply the reviewer rule only to direct stage changes

- A workflow's approval task already decides who may approve (reviewers,
  owners or named candidates), so its write no longer fails the reviewer rule
  when an owner or candidate approves; direct edits and imports keep the rule.
- Load reviewers, inherited ones included, before checking an import row that
  moves an entity out of review, since import rows are matched from stored JSON
  that holds no relationship fields.

* Align tests with main's starting stages and the CSV stage lock

- ClassificationResourceIT expects a new classification to start Unprocessed
  again, as on main.
- The metric CSV-update Playwright test leaves the status cell blank: the
  fixture metric is In Review under MetricApprovalWorkflow, so a CSV row cannot
  move its stage, and a blank status keeps it.

* Test that a CSV import lets only a reviewer approve a tag in review

An import row is matched from stored JSON, which holds no reviewers, so the
reviewer rule only works on import because applyEntityStatusRulesForImport
reloads them. The test imports a classification CSV as admin that approves two
tags in review: the one another user reviews fails with "is not a reviewer"
and stays In Review, and the one admin reviews becomes Approved. Without the
reload, the non-reviewer's row goes through.

* test(glossary): isolate status fixtures

Exclude marked glossary fixtures from automatic approval during test
bootstrap. Status and search tests can update stages through the API
without waiting for the shared workflow event queue.

* refactor: move status initialization before flush

Keep status assignment before persistence while avoiding overlapping
creation hooks with #34025 in the merge queue.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
Co-authored-by: Ram Narayan Balaji <ramnarayanb3005@gmail.com>
…eir containers (#34634)

* fix(glue): match external table locations with a trailing slash to their containers

Normalize the scheme and one trailing separator in the shared lineage mixin before
the exact fullPath lookup, and skip the table search when no container matches.

* test changes
* fix(ui): core charts clean-up after the recharts migration

- areaGradient fades rgb() / rgba() series colours too (withAlpha). It ran
  every colour through hexToRgba, so an rgba colour came out as a wrong,
  greenish fill.
- Chart tooltips are appended to <body>, so one left open on a kept-alive
  route that goes hidden floated over the next page. EChart now hides its
  tooltip on hideChartTooltips(), and KeepAliveRoutes fires it whenever the
  active route changes. hideChartTooltips is also exported from the root
  entry, so the shell does not load echarts to call it.
- Docs: zoom 'auto' follows zoomVisiblePoints; valueFormatter does not apply
  to tooltip.render.
- CustomBarChart / CustomAreaChart use tw:w-full.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(playwright): retry the AI-mode custom property select picks

chooseSelectOption opened the react-aria listbox once and clicked the
option. Playwright's actionability scroll closes the non-modal popover,
so the option detached mid-click and the Date format pick timed out.
Route it through selectOptionWithRetry, which centres the trigger and
reopens the listbox if it closes.

* style(ui-core): prettier-format the charts barrel

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…CRIBE (#34518)

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
…#34327)

Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.13 to 3.4.16.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@3.4.13...3.4.16)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.16
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…back host (#33978)

* Fixes #26311: trust the request origin for the SSO /auth/callback redirect

SSO login has been unusable since 2.0.0 on any deployment whose
oidcConfiguration.serverUrl is not byte-identical to the browser's origin
- the normal case behind an ingress, where serverUrl is often left at its
http://localhost:8585 default.

The frontend asks to land on <its own origin>/auth/callback, but the
redirect allow-list added in 2.0.0 only ever derived its /auth/callback
entry from serverUrl. Exact scheme+host+port+path matching then rejected
the login with "Redirect URI must exactly match a trusted redirect URI"
and a 400 that named no candidate. There was no config-only remedy: a
root-relative redirect canonicalizes against the same stale config origin.

Derive the origin the client actually reached the deployment on and trust
it for OpenMetadata's own two fixed callback paths. X-Forwarded-Proto and
X-Forwarded-Host are read first (Jetty's scheme/host only reflect the
external hop when useForwardedHeaders is on, which is off by default and
not surfaced by the shipped Docker or Helm configs), falling back to the
connector's own view for a direct deployment.

The derived origin is client-influenced, so it is only ever concatenated
with /auth/callback and /mcp/callback, the scheme is restricted to
http/https, and an origin carrying user-info, a path, a query or a
fragment is discarded. A forged X-Forwarded-Host therefore buys nothing:
the token rides the response back to whoever made the request, so the
forger can only redirect themselves. Any other target still has to match a
configured entry. An unparseable header is dropped rather than aborting
validation of a legitimately configured candidate.

Rejections now log the trusted candidate set at WARN, which the
wire-facing 400 deliberately omits.

Also corrects the callback documentation that sent reporters down the
wrong path in the first place: the SSO settings placeholders advertised
/auth/callback while the field's own default is /callback, and
conf/openmetadata.yaml pointed at /api/v1/callback, which is not a route
at all. The IdP redirect_uri is /callback (the server endpoint that
performs the code exchange); /auth/callback is the UI route the server
redirects to afterwards and must not be registered with the IdP. The
two same-named responseType and callbackUrl fields are now documented as
public-client vs confidential-client, including that
GET /api/v1/system/config/auth reports the top-level one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Harden the request-origin derivation behind proxies

Two defects in the origin lookup added by the previous commit, both found
by asking whether X-Forwarded-Host can actually be relied on. It cannot:
the repository ships no nginx config, Helm chart or ingress template, so
the proxy layer is entirely the operator's choice.

Read the closest hop, not the furthest. These headers are normally
replaced rather than appended, but a proxy that appends leaves the
caller's own value left-most - so reading from the left let a caller
sending "X-Forwarded-Host: evil.example.com, om.example.org" choose the
derived origin. Each further hop appends to the right, so the right-most
value is the one written by the most trusted proxy. The previous comment
justified the left-most read as "the original client hop", which is the
correct rule for X-Forwarded-For and the opposite of what is wanted here.

Resolve scheme and authority independently. AWS ALB sets
X-Forwarded-Proto and X-Forwarded-Port but never X-Forwarded-Host, passing
the client's Host through untouched; hand-rolled nginx behaves the same
way, since X-Forwarded-Host there is opt-in. Reading the scheme only
alongside a forwarded host resolved those deployments to the internal
http hop and rejected their own login - the very bug this was meant to
fix. Host is now also preferred over the connector's view, because
getServerPort() reports the local listener when the header carries no
explicit port and would otherwise graft :8585 onto a public origin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Add additionalCallbackUrls and sp.additionalAcsUrls for multi-hostname SSO (#28870)

A deployment reachable at more than one hostname (load balancer, DR site)
needs the IdP-facing callback to follow the host the browser arrived on.
Add the two config lists that carry the extra registered URLs:

- authenticationConfiguration.additionalCallbackUrls: extra OIDC redirect_uri
  values. Top-level rather than inside oidcConfiguration because
  ConfigResource strips oidcConfiguration from the browser-facing auth
  config, and public clients build redirect_uri in the browser.
- samlConfiguration.sp.additionalAcsUrls: extra Assertion Consumer Service
  URLs. sp.entityId stays single-valued.

Both default to [], so single-hostname deployments are unaffected. Wire the
env vars in conf/openmetadata.yaml and conf/openmetadata-h2-test.yaml (the
latter also gains the missing additionalTrustedRedirectUris), and regenerate
the TypeScript types and the dereferenced UI schema.

* Select a callback URL by request origin in SecurityUtil (#28870)

Add SecurityUtil.sameOriginCallbackUrl(requestOrigin, primary, additional):
the configured additional callback URL on the origin the request arrived
on, or null to keep the primary. An entry qualifies only when it shares
the primary's path, so selection changes the host the identity provider
returns to but never the endpoint, and it is returned exactly as
configured because the token request must repeat redirect_uri byte for
byte. The request origin is client-influenced, so a forged host can only
pick a URL the operator already registered; a malformed entry is skipped
rather than failing the login.

Extract sameOrigin(URI, URI) out of sameRedirect so both comparisons share
one scheme/host/port normalization.

* Carry the IdP redirect URI on the pending login session (#28870)

The callback that completes a login arrives as a separate request, so the
redirect_uri sent to the identity provider has to be remembered on the
pending session for the token request to repeat it exactly.

- UserSession gains idpRedirectUri. It is written only when set, and the
  class now ignores unknown properties: JsonUtils reads with a mapper that
  rejects them, so without both an older pod reading a newer pod's session
  mid rolling upgrade would fail. Sessions are a JSON blob in both stores,
  so no migration is needed.
- SessionService.createPendingSession takes a PendingLoginState record
  instead of seven positional arguments.

No behavior change yet: nothing sets idpRedirectUri until the OIDC handler
starts selecting callback URLs.

* Send the OIDC callback URL registered for the request host (#28870)

A deployment answering on several hostnames sent every identity provider
the single oidcConfiguration.callbackUrl, so logins from any other host
failed at the IdP.

- Web logins now send the additionalCallbackUrls entry registered for the
  host the request arrived on, falling back to the primary. The choice is
  recorded on the pending session and the token exchange reuses it, so the
  authorization and token requests carry the same redirect_uri even when
  the callback comes back through a different ingress.
- MCP logins keep the primary: that flow is anchored to serverUrl end to
  end, so it is left exactly as it was.
- The signin and logout redirects stay on the request host when it has a
  registered callback URL, instead of sending a secondary site's users to
  serverUrl. An unregistered or forged host still gets serverUrl.

With no additional callback URLs configured, nothing reads the request's
origin and every redirect is unchanged.

* Use the per-host callback URL for browser-side OIDC logins (#28870)

Public clients build the redirect_uri in the browser, so the server-side
selection alone left them sending the primary callback URL from every host.

- GET /api/v1/system/config/auth now returns additionalCallbackUrls.
- getRedirectUri picks the additional callback URL registered for the host
  the page is served from, with the server's rules: same path as the
  primary, the primary wins on its own origin, and the configured string
  is returned untouched. Login, the auth config, and the SSO test-login
  popup all use it.
- The SSO settings form gets an editable "Additional Callback URLs" list
  for OIDC providers; SAML and LDAP drop it with the other OIDC-only
  fields. The SAML additionalAcsUrls field stays hidden until the SAML
  side supports it.

New strings are translated for every locale.

* Reject additional callback URLs that login could never select (#28870)

Login skips an additional callback URL that is malformed or points at a
different endpoint, so a typo there only shows up as a login that quietly
keeps the primary. Validate the list when the SSO configuration is saved:
each entry must be an absolute http(s) URL, without user-info or a
fragment, on the same path as the callback URL the identity provider is
actually sent (the OIDC one for confidential clients, the top-level one
for public clients).

The rule lives in SecurityUtil.isAlternativeCallbackUrl, shared with the
runtime selection, so the two cannot drift apart. The live identity
provider probes still use only the primary: a disaster-recovery host is
often unreachable from the primary site when the config is saved.

* Send the SAML ACS registered for the request host (#28870)

The SAML side had one static Saml2Settings, so every AuthnRequest carried
the single sp.acs and logins from any other hostname failed at the IdP.

- SamlSettingsHolder builds one Saml2Settings per configured ACS (sp.acs
  plus sp.additionalAcsUrls) and publishes them in a single snapshot, so
  a reload never mixes old and new entries. Entries are keyed by
  configured URL, never by request input. The entityId stays the same
  across all of them.
- Login picks the additional ACS registered for the request host, using
  the same rule as OIDC, and records it on the pending session. The ACS
  callback validates against that recorded ACS instead of re-deriving it
  from headers. MCP logins keep the primary.
- The ACS callback now checks Destination and Recipient against the ACS
  URL the login sent, via onelogin's SamlMessageFactory hook, rather than
  the URL the container saw. In strict mode behind a load balancer that
  URL is the internal hop, so the check failed even with a single ACS.
  That pre-existing bug is fixed here too.
- The redirect allow-list trusts /auth/callback on the host of every
  configured ACS, and logs the trusted set when it rejects a redirect.

Also removes the dead relayState field and setSaml2Settings.

* List every configured ACS in the SAML SP metadata (#28870)

The SP metadata advertised only sp.acs, so an identity provider that
imports it would reject AuthnRequests from the other hostnames. It now
lists each additional ACS as another AssertionConsumerService, all under
the one entityID. Per-host metadata would be wrong here: IdPs key the SP
on entityID, so two documents with the same entityID conflict.

onelogin's template holds a single ACS and runs postProcessXml inside the
Metadata constructors, before a subclass could hold the extra URLs. So the
endpoints are added to the rendered document and the result is signed
afterwards, which keeps them covered by the signature. With no additional
ACS URLs the servlet serves exactly what getSPMetadata() returned before,
so existing IdP registrations see no change.

* Validate and expose the SAML additional ACS URLs (#28870)

- SamlValidator rejects an additional ACS URL that login could never
  select: it must be an absolute http(s) URL on the same path as sp.acs,
  the same rule the OIDC list is held to. At most 20 are accepted, since
  each one gets its own Saml2Settings. The error names the entry and is
  reported against sp.additionalAcsUrls.
- The SSO settings form shows an editable "Additional ACS URLs" list in
  the Service Provider section. The primary ACS is still auto-filled from
  the admin's origin, so the help text explains these are for the other
  hostnames and must also be registered with the identity provider.

New strings are translated for every locale.

* Cover the multi-host SSO paths the unit tests missed (#28870)

Changed-line coverage was 83.9%; these tests bring it to 98.8%.

- The SAML ACS callback validates with the ACS recorded at login and
  installs the destination-checking message factory. No unit test reached
  that part of handleCallback before.
- SamlSettingsHolder: initialization from the live auth config, the
  uninitialized guard, and the SP-key, keystore and missing-key-material
  branches of the signing setup.
- The SP metadata servlet over real HTTP: every ACS under one entityID.
- Logout from a registered secondary host stays on that host.
- The additional-URL checks run inside the SAML validator's entry point
  and the base authentication-field validation.
- SecurityUtil: an unparseable primary, and a hostless trusted entry.

The two token-exchange boundary tests now report the callback's status
and body when they fail.

* Trust the SSO landing page only on configured callback hosts (#26311, #28870)

With #26311 and #28870 in one change, the OIDC and SAML redirect
allow-lists no longer have a reason to follow different rules.

The OIDC allow-list trusted /auth/callback on whatever origin the request
claimed via X-Forwarded-Host or Host. A forged host could make a login
land on itself: SsoRedirectBoundaryTest encoded exactly that ("a forged
host can make the login land on itself"). It also left #26311 unfixed
for any deployment whose request did not happen to name its public
origin.

The landing page is now trusted on the host of every configured OIDC
callback URL: the primary oidcConfiguration.callbackUrl and each
additionalCallbackUrls entry. Those have to be right for login to work at
all, since the identity provider rejects any other redirect_uri, so they
name the deployment's real hosts even when serverUrl is left at its
localhost default. SAML already applied this rule to its configured ACS
URLs; both now share SecurityUtil.originOf. Nothing on the redirect path
reads the request any more, so the parameter #26311 threaded through
requireRedirectUri and sendRedirectWithToken is gone again.

ownUrl, used for the /signin and /logout redirects, now copies the origin
from the configured callback URL that matched rather than from the
headers that selected it. That resolves the three CodeQL
java/unvalidated-url-redirection alerts on it.

requestOrigin keeps its one legitimate job: choosing among URLs the
operator registered with the identity provider, where a forged host can
select nothing that was not already configured.

* Update generated TypeScript types and dereferenced schemas

* Keep signin and logout on the primary callback host (#26311)

ownUrl kept the request's host only when an *additional* callback URL
matched it, because sameOriginCallbackUrl returns null on the primary's
own origin. A request on the primary callback host therefore always got
serverUrl. In the #26311 setup this PR targets - serverUrl left at
http://localhost:8585, oidcConfiguration.callbackUrl on the real host -
login now worked, but logout and the missing-pending-session and
silent-auth fallbacks still sent the browser to localhost:8585.

SecurityUtil.registeredCallbackUrl now returns the configured callback
URL on the request's host, primary or additional. ownUrl builds the
redirect from that URL's base: the callback URL minus its trailing
/callback. The suggested fix rebuilt it from the origin instead, but
these redirects used serverUrl before, and serverUrl carries a base path
that an origin would drop (https://host/openmetadata/callback must give
https://host/openmetadata/logout). A callback URL that is not the
/callback servlet's keeps serverUrl. The request origin still only
selects among configured URLs, so an unregistered host keeps serverUrl.

Reported by gitar-bot on #33978.

* Drop multi-hostname SSO callback URLs (#28870); keep the #26311 fix

Review on #33978: multi-hostname/DR deployments are not a supported use
case ("this is not a use-case. Lets not add edge-cases into the code").
This removes #28870's work entirely - the additionalCallbackUrls and
sp.additionalAcsUrls settings, their generated types, form fields and
translations, the per-ACS SAML settings and SP metadata, the recorded IdP
redirect URI on the pending session, and the save-time validation - and
leaves this PR as the #26311 fix only.

Without additional hostnames nothing needs the request's host, so the
#26311 fix no longer reads the request at all:

- /auth/callback is also trusted on the host of the configured OIDC
  callback URL. That URL has to be right for login to work - the identity
  provider rejects any other redirect_uri - so it names the deployment's
  real host even when serverUrl is left at its localhost default. No
  forwarded or Host header can add a trusted target; requestOrigin and
  its X-Forwarded parsing are gone.
- Logout and the two /signin fallbacks are built from the callback URL's
  base (the URL minus its trailing /callback), so they no longer bounce
  the user to a stale serverUrl. A base path survives; a callback URL that
  is not the /callback servlet's keeps serverUrl.
- A rejected redirect logs the trusted targets at WARN.
- The callback documentation fixes stay: the SSO form placeholders and
  conf/openmetadata.yaml now point at /callback, not /auth/callback or
  the non-existent /api/v1/callback.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Block new raw SVG asset debt via pre-commit guard

Icons must come from @openmetadata/ui-core-components/icons, not raw SVGs
under src/assets/svg/. ESLint can't catch new .svg files and the import
rule can't become an error (~500 existing violations), so add a git-diff
guard mirroring tw-deprecation-guard.js that hard-fails only on NEW debt:
a newly added assets/svg .svg file or a newly added import from assets/svg.
Existing usage is untouched. Also drop the redundant @untitledui/icons
restriction from no-restricted-imports.

* Fix svg-guard: anchor pathspec to repo root, normalize moved imports

- newSvgFiles used a CWD-relative pathspec, so the new-.svg check silently
  no-op'd when run from the UI directory (only the repo-root pre-commit hook
  worked). Anchor with ':(top)'.
- Import comparison keyed on the raw specifier, so moving a file to a
  different folder depth rewrote '../assets/svg/x' to '../../assets/svg/x'
  and flagged a pure refactor as new debt. Compare by the stable
  'assets/svg/...' suffix via svgKey().

* Enforce raw-SVG import ban via ESLint error + suppressions baseline

Replace the pre-commit git-diff guard with a pure-ESLint approach: flip the
assets/svg no-restricted-imports rule from warn to error and baseline the 66
existing offenders into eslint-suppressions.json (the native bulk-suppressions
mechanism already used for the playwright rules). New raw-SVG imports now fail
ui-checkstyle (lint_src -> final gate), blocking merge, while commits stay
unblocked (no eslint pre-commit hook). Drop svg-deprecation-guard.js and its
pre-commit entry.

* Switch raw-SVG enforcement to the antd strategy (git-diff guard)

Fold the raw-SVG checks into tw-deprecation-guard.js so they run in the exact
same places as the antd/less guard: the tw-deprecation-guard pre-commit hook
and the tw_guard ui-checkstyle step (no new workflow wiring). A newly added
assets/svg .svg file or a new import from assets/svg now blocks both commit and
merge, matching how new antd debt behaves. Revert the ESLint error +
suppressions approach (rule back to warn as an editor nudge; suppressions
baseline removed). Add .svg to the hook's file filter, pipe git-show stderr to
silence the harmless new-file 'fatal' line, and cover the new logic with tests.

* Remove the global raw-SVG ESLint rule for antd-strategy parity

antd has no global no-restricted-imports entry — it's enforced solely by
tw-deprecation-guard.js. The SVG warn was a leftover from the ESLint approach
and did nothing but add an editor squiggle. Drop it so raw-SVG enforcement
lives entirely in the guard, exactly like antd.

* test gaurd

* reverted testing changes
The e2e Redshift cluster now rejects non-SSL connections and sslMode
defaults to disable, so set sslMode: require in every CLI e2e Redshift
config and select it in the Playwright Redshift connection form.
…b card (#34621)

* fix(ui): keep full breadcrumb when opening an asset from an Assets tab card

ExploreSearchCard precomputed the breadcrumb for the destination page and
passed it via router state, but computed parents-only and then sliced off the
last parent. The asset detail header renders that state verbatim without
re-appending the entity name, so arriving via an asset card showed only
service / database (schema and the asset name were dropped). Direct navigation
was unaffected because it rebuilds the trail from the fetched entity.

Compute the state breadcrumb with includeCurrent=true and stop slicing, so the
header receives the complete service > database > schema > table trail,
matching a direct visit. breadcrumbData[0] stays the service crumb, so the
AI-shell sidebar origin logic is unchanged.

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

* test(playwright): assert collapsed breadcrumb correctly after asset-card nav

The DataAssetsHeader breadcrumb auto-collapses: the schema ancestor moves into
the overflow menu and the current crumb (aria-current) renders the entity name,
not the displayName. Assert the schema via the overflow-aware helper and the
current crumb via aria-current + entity name.

* lint fix

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…breadcrumb E2E) (#34619)

* fix(ui): reliably refresh teams list after create (nonce trigger)

The all-teams advanced fetch (parentTeam=...&fields=...) rode a boolean
flag: fetchAllTeamsBasicDetails set it true, an effect fired the fetch on
the flip, and the fetch reset it to false. When a refresh was requested
while a prior advanced fetch was still in flight (slow under load), the
boolean was already true, so the write was a no-op, the effect never
re-ran, and the refresh was silently dropped.

Split the single boolean into a monotonic nonce (trigger) and a dedicated
loading flag. Each basic-fetch completion bumps the nonce, so the effect
always re-fires even while a prior fetch is in flight. The loading flag
keeps driving the hierarchy count skeletons.

Fixes the flaky Teams breadcrumb Playwright test (the awaited teams-list
GET was never sent) and the underlying bug where creating a team while
counts were still loading left the new row's counts stale.

* fix(ui): guard overlapping team fetches and drop duplicate nav fetch

Address review feedback on the nonce change:

- Overlapping full refreshes: the nonce lets a newer advanced fetch start
  before an older one resolves. Tag each full refresh (updateChildNode=false)
  with a request id and only let the latest apply its list and clear the
  loading flag, so a slow pre-create response can no longer overwrite the
  list with stale data or hide the count skeletons early. Expand calls merge
  into a specific subtree and skip the request-id bump, so they don't
  invalidate each other.
- Duplicate fetch on navigation: keying the effect on both the nonce and fqn
  fired the advanced GET twice per navigation (once from fqn, once from the
  following nonce bump). Trigger on the nonce alone and read the latest fqn
  through a ref.

* refactor(ui): extract toListTeam helper to clear cyclomatic-complexity

fetchAllTeamsAdvancedDetails exceeded the complexity gate (11 > 10) after
the staleness guard was added. Extract the team-list row mapping (shared
verbatim with fetchAllTeamsBasicDetails) into a module-level toListTeam
helper, removing two decision points from the function and de-duplicating
the mapping.

* fix(ui): clear TeamsPage lint error and exhaustive-deps warnings

- cyclomatic-complexity (error): the previous helper only touched the map
  callback (a separate function), so fetchAllTeamsAdvancedDetails stayed at
  11. Extract the result-application branch into applyAllTeamsData, dropping
  two decision points from the function (now 9).
- exhaustive-deps (warnings): add the stable t to the two useCallback dep
  arrays that use it; annotate the three trigger effects with justified
  eslint-disable-next-line (their fetchers are non-memoized triggers, not
  reactive inputs — adding them would re-run every render or duplicate the
  navigation fetch).

* fix bots spec

* fix(ui): shorten eslint-disable justifications to satisfy max-len

* lint fix

* fix(ui): don't show whole-table skeletons when expanding a team row

The nonce refactor set isFetchAllTeamAdvancedDetails(true) at the start of
every advanced fetch, including expand (updateChildNode=true). That flag
drives the per-column skeletons across all rows in TeamHierarchy, so
expanding one row blanked the whole table. Restore the original behavior:
set the flag only for full refreshes (setIsFetchAllTeamAdvancedDetails(
isFullRefresh)); expand leaves it off.

* fix(ui): never let an expand toggle the full-refresh skeleton flag

setIsFetchAllTeamAdvancedDetails(isFullRefresh) still wrote false on expand,
and the finally cleared it too (isLatestFullRefresh is always true for
expands) — so expanding a row while a full refresh is mid-flight hid the
count skeletons early and showed stale values. Guard both the set and the
clear on full-refresh-only: set behind if (isFullRefresh); clear behind a
new isActiveFullRefresh() (isFullRefresh && latest). The && lives in a
nested arrow so cyclomatic-complexity stays at 10.

* test(ui): cover the advanced-fetch stale-response race in TeamsPage

Overlap two full refreshes (mount + showDeleted toggle), resolve the newer
one first and the older (stale) one last, and assert the stale response does
not overwrite the list. Verified it fails without the request-id guard in
fetchAllTeamsAdvancedDetails. Extends the TeamDetailsV1 mock to render
childTeams names so the applied list is observable.

* fix(ui): mark fire-and-forget advanced fetch with void (no-floating-promises)

* refactor(ui): remove all eslint-disable comments from TeamsPage

Replace the three disable directives with real fixes:

- Move updateTeamsHierarchy to module scope (pure, no closure); convert
  applyAllTeamsData, fetchAllTeamsAdvancedDetails, fetchAllTeamsBasicDetails,
  getParentTeam, and fetchTeamBasicDetails to useCallback with honest dep
  arrays so their identities are stable.
- fetchAllTeamsBasicDetails now chains the advanced fetch directly (void
  call) instead of bumping a nonce through an effect — removes the nonce
  state, fqnRef, and the two associated effects entirely.
- The team-list effect depends on [fqn, hasViewPermission,
  fetchAllTeamsBasicDetails]: fqn/permission changes trigger navigation
  refetches; fetchAllTeamsBasicDetails identity changes when showDeletedTeam
  flips (it closes over it), so the deleted-toggle refetch works without a
  dedicated effect.
- The team-details effect now lists all deps honestly: [hasViewPermission,
  fqn, fetchTeamBasicDetails, loadAdvancedDetails].
- applyAllTeamsData uses a functional setChildTeams updater on the expand
  path so it doesn't close over childTeams and can stay stable.
- createNewTeam explicitly refreshes the list after a create (void
  fetchAllTeamsBasicDetails) since navigation/toggle no longer cover it.

No behaviour change. 13/13 tests pass. Zero eslint-disable lines remain.

* fix(ui): guard fetchAllTeamsBasicDetails against stale navigation responses

A basic fetch from a previous fqn could resolve late, overwrite the list
with the old parent's teams, and chain an advanced fetch that bumps
advancedFetchIdRef — causing the in-flight advanced fetch for the current
fqn to be dropped as superseded. Add basicFetchIdRef alongside
advancedFetchIdRef and drop the response (and the chained advanced call)
if a newer basic fetch has already started.

* lint fix
…#34370)

* feat(ui): redesign glossary term synonyms widget with core components

Replace the Ant Design Select/Button/icons in the synonyms widget with
ui-core-components and match the new design:

- Edit mode: chip input (Enter or comma adds, Backspace removes the last
  one) with a key hint, plus a Cancel/Save footer showing "Unsaved changes".
- Case-insensitive duplicates are rejected with an inline error and the
  matching chip highlighted.
- View mode shows up to six synonyms with a "+N More" / "Show Less" toggle.

The editor lives in its own component to keep the widget under the
cyclomatic-complexity limit; the duplicate check is a tested pure util.
Playwright selectors updated for the new markup.

* fix(ui): use BadgeWithButton chips and core tooltip for glossary synonyms

- Edit mode renders each synonym as a core BadgeWithButton instead of
  Tag/TagGroup. Core Tag's remove icon ignores its size classes and its
  label cannot be styled, which needed selectors into core internals.
  Duplicates use color="error"; remove buttons get an accessible name.
- Long synonyms truncate at max-w-24 so two fit per row, in both edit
  and view mode. SynonymBadge takes an optional className so the narrower
  width applies to this widget only.
- SynonymBadge shows the full synonym in the core Tooltip instead of the
  browser title attribute.
- Playwright and unit tests target remove-synonym-<name> buttons.

* fix(ui): keep typed synonym when saving without pressing Enter

Typed text was dropped if the user clicked Save before pressing Enter or
comma. Commit it on input blur, as the legacy antd tags input did; Save
blurs the input first, so the text is saved. Duplicates stay in the
input with the error and are not added.

* fix(ui): ignore IME Enter and show tooltips on synonym editor chips

- Skip key handling while an IME composition is active (isComposing, or
  keyCode 229 in Safari), so Enter that confirms a ja/zh/ko candidate no
  longer adds a half-composed synonym. Same guard as FeedEditor.
- Pass tooltip={synonym} to the editor chips so truncated synonyms can be
  read in full. The label is block-level so max-w-24 still applies inside
  the tooltip trigger.

* refactor(ui): edit glossary synonyms with core Autocomplete

Address review on the synonyms widget:

- Edit with core Autocomplete (allowsCreation, hideDropdown, multiple),
  the same field the create form uses, and remove the hand-rolled
  GlossaryTermSynonymsEditor. Case-insensitive duplicates are rejected in
  onItemInserted and flagged while typing; chips render via renderTag.
  Comma-to-add is dropped.
- Add a footer prop to WidgetCard so Save/Cancel render in Card.Footer
  next to Card.Content instead of inside it.
- Use Box for layout, reuse message.entity-already-exists and
  message.synonym-placeholder, and share one chip width constant.
- Move MAX_VISIBLE_SYNONYMS to Glossary.contant.ts and inline the
  duplicate check.
- SynonymBadge only opens its tooltip when the text is truncated, the
  IME guard drops keyCode 229, and the list collapses on save/cancel.
…9 + load wait) (#34651)

Two independent failures of "Alert operations for a user with and without
permissions":

- beforeAll 409 "Entity already exists": the ingestion pipeline name was a
  module-level constant, so a second beforeAll in the same worker
  (fullyParallel) re-posted the same name into the shared pipelineService.
  PipelineClass.delete() also never removed the ingestion pipeline, which is
  a child of the service, not the pipeline. Name it per beforeAll and
  hard-delete it in PipelineClass.delete().

- visitObservabilityAlertPage timeout: waitForURL defaulted to waitUntil
  'load', which also waits on the third-party scarf.sh pixel in index.html.
  When that request hung in CI, load never fired although the page was on
  /observability/alerts and fully rendered. Wait for 'commit' instead.
#34650)

- Test case details page: put the tab panel on a white rounded surface
  (tw:bg-surface) in classic mode, so tab content no longer sits on the
  grey page background. AI mode keeps its own surface.
- TaskListV1: give the list its own padding (tw:p-5) instead of the
  activity-feed-tab-padding class, whose stylesheet is not loaded on the
  test case Incident tab, leaving the incident cards flush to the edges.
…34642)

* fix(ui): align AI-mode sidebar icon glyph and colour tokens

Three icon inconsistencies in the AI-shell sidebar, all scoped to AI mode
(the classic left nav renders identically before and after):

- Expand/collapse rail buttons and the inbox launcher used
  `tw:text-fg-quaternary`, which resolves to gray-400, while every nav and
  list icon beside them uses `--tw-text-color-quaternary` (gray-500). That
  one-step-paler token is why they read washed out next to the globe. The
  class is dropped so each icon inherits its button colour, and the two
  `__expand-btn` rules move from `@ask-text-quaternary` to `@ask-icon-rest`
  so they also track the nav icons in dark mode (gray-600 there, where raw
  quaternary would flip to gray-400).

- `ontology-active.svg` / `ontology-default.svg` were the old
  circles-and-lines knowledge-graph glyph and are unreferenced in this repo.
  Redrawn as the `LayersThree01` path so the Ontology Studio entry cannot
  diverge from Frameworks in the selected state. The active variant
  previously hardcoded `stroke="#1849A9"`, which would have matched in light
  mode but not dark, where `@ask-brand-active` resolves to brand-300;
  `currentColor` inherits whatever the sibling inherits, in every theme.

- `OntologyStudioIcon` drops its `createIconWithStroke(..., 1.2)` wrapper.
  The restroke never applied: core-ui's `LayersThree01` sets
  `strokeWidth={1.3}` on its `<path>`, and a presentation attribute on the
  element beats the value inherited from the `<svg>`. Removing it deletes a
  comment claiming a weight the icon has never had; rendering is unchanged
  on both the AI sub-nav and the classic left nav.

* refactor(ui): drop the OntologyStudioIcon alias, name LayersThree01 directly

#32324 introduced `OntologyStudioIcon` for one reason: to restroke
`@untitledui`'s LayersThree01 from its shipped weight of 2 down to 1.2 in a
single place, so the classic sidebar and the app-mode sub-nav could not drift
apart. #34141 then migrated icons to core-ui, whose LayersThree01 sets
`strokeWidth={1.3}` on its own `<path>` — a presentation attribute that beats
the value inherited from the `<svg>`. The restroke has been inert ever since,
leaving a pass-through alias that buys nothing.

Two repo rules say to name the component at the call site instead: "No
wrappers around core-ui components — a wrapper that only passes props through
is a maintenance liability: it hides which core component is in use", and
"Import icons from @openmetadata/ui-core-components/icons". The indirection
also hid the thing worth checking: you could not tell from the nav entry that
the glyph was LayersThree01, which is what makes it match the other
LayersThree01 entries beside it.

Verified against the running app before and after — same path data, same
stroke 1.3, same rgb(24, 73, 169) when selected and rgb(113, 118, 128) at
rest, on both the AI sub-nav and the classic left nav.

* Revert the Ontology Studio icon changes — they belong in Collate

The sub-nav where the icon looked wrong (Audit Hub, Automations, AI Assets →
Frameworks) is defined in Collate's governance module, not here. OSS's own
Ontology Studio entry already renders correctly: verified against the running
app, it draws LayersThree01 at stroke 1.3, rgb(113, 118, 128) at rest and
rgb(24, 73, 169) when selected — the same glyph and tint Frameworks gets.

So this repo needed nothing, and three of the edits were speculative:

- ontology-active.svg / ontology-default.svg were redrawn as the layers glyph
  on the theory that Collate wired those assets. Nothing in this repo
  references either file, so the rewrite had no verified consumer.
- Dropping the OntologyStudioIcon alias would have broken Collate's build if
  its governance module imports the symbol.

Restored to origin/main. What remains is the icon-colour work, which is
AI-mode-only and was confirmed in the browser.

The dead restroke stands as a separate finding: #32324 added
createIconWithStroke(LayersThree01, 1.2), and #34141's move to core-ui — whose
LayersThree01 sets strokeWidth={1.3} on its own path — made it inert. Worth a
follow-up, but not on the critical path for this fix.

---------

Co-authored-by: Shrabanti Paul <shrabantipaul@Shrabantis-MacBook-Pro.local>
…#34667)

React Aria's MenuTrigger only opens on a mouse press start; closing relies
on a modal overlay. FilterSelect is non-modal and owns dismissal, but its
outside-pointerdown listener skipped the trigger, so pressing the trigger
of an open filter left it open. Close on a trigger-button press and stop
the event so React Aria does not reopen it in the same gesture. Chip
remove buttons in the chips field still keep the popover open.
…alert and help menu (#34654)

* feat(ui): show human-readable version and release date in What's New alert and help dropdown

Replaces the raw build-stamp version string (e.g. 1.13.202609250000) with a
simplified major.minor version and a derived release date parsed from the 12-digit
build timestamp. Both the What's New alert left panel and the NavBar help-menu
version item are updated; shared parsing helpers are added to Version.ts with unit
tests, and the `label.released` i18n key is added and translated across all 20 locales.

* fix(ui): restore WhatsNew alert visibility guard and remove temp debug override

* lint fix

* fix(ui): simplify version by dropping build stamp only, keep patch segments
Remove the blanket /* eslint-disable */ from reactColumnResize.mock.js.
It suppresses nothing since the config turned off no-require-imports for
src/test/unit/mocks/**, and a blanket directive would silently hide any
problem added to the file later.

Set linterOptions.reportUnusedDisableDirectives to 'error' so a directive
left stale by a fix fails lint instead of warning.
* Add local impact-mapped Playwright runner with PR results block

PR checks no longer run Playwright; the merge queue runs the full suite.
plan_local_playwright.py feeds the branch diff to select_playwright_tests.py
so developers get the same impact-mapped spec list CI computes, a command to
run it, and a results block they can upsert into the PR description.

* Run local Playwright planner through Make targets

Match how the root Makefile runs repo Python scripts (python3 <path>, flags via
ARGS) instead of yarn scripts reaching up five directories.

* Default PLAYWRIGHT_IS_OSS for local runs and explain a missing base ref

Local validation against a real stack showed auth.setup.ts failing on the
Collate-only ingestionRunners API because every CI lane sets
PLAYWRIGHT_IS_OSS=true and the local runner did not. An unknown --base ref
now exits with a fetch hint instead of a traceback.
#34571)

* Fixes #34557: Add a Search Settings toggle to turn column indexing off

Adds globalSettings.enableColumnIndexing (default true) and a toggle in
Settings > Preferences > Search Settings. Turning it off stops writing
column docs, both live and during reindex, and deletes
column_search_index. Turning it on creates the index if it is missing.

While it is off, the missing index cannot fail other work:
- Startup, CLI and reindex skip it.
- Table child fan-out and the Explore entity-type counts leave it out.
- Column-only searches return an empty result.

Also fixes SearchRepository.deleteIndex for a canonical name that is an
alias over a rebuilt index. Elasticsearch reports the alias as existing
but rejects a delete through it, so the alias targets are resolved first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Branch the column indexing toggle on its current state

SonarCloud flagged the handler on two counts: it used its boolean
parameter to choose between two actions (S2301), and it left the
enable-path save promise floating (S9383). The toggle is controlled, so
the current setting already says which way a click goes. The handler
now branches on that, and marks the fire-and-forget save with void.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Don't report a turned-off column index as missing

With column indexing off, the system status "Search Reindex Status" step
listed tableColumn as a missing index and asked for a reindex that skips
it. Skipping it only there would let the mapping-drift check mark it
stale after a release that changes the column mapping.

SearchRepository.isIndexDisabled now holds the rule. It is applied next
to the vector-index skip in findMissingIndexes and
existingTrackedIndexes, and to the /v1/search/stats and search-index
metric counts, which walked every mapping the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…end (#34663)

* Fixes #34662: never let a bot bulk PUT blank fields the source doesn't send

With overrideMetadata=true, an empty description or displayName and an
omitted certification overwrote stored values. tableConstraints had no
bot guard at all, so any bot PUT without constraints removed them,
override or not. Override now replaces a stored value only when the
source supplies one; constraints on dropped columns are still cleaned up.

* Move table-constraint ITs above the helpers section
* Fixes #34668: Run the app-run recovery ITs one test at a time

On MySQL the interrupt UPDATE scans apps_extension_time_series by timestamp,
so concurrent tests sharing the same small timestamps deadlocked against a
sibling test's cleanup DELETE. RdfIndexRunRecovery retries on the deadlock,
but the test asserted before the retry and saw the run still running.

* Keep the two app-run recovery ITs from running at the same time

RdfIndexRunRecoveryIT also runs in the parallel lane, next to
AppRunInterruptionIT. Both use the same small run timestamps, so the same
deadlock could happen between the two classes. Share a resource lock.
…a dark mode (#34637)

* fix(ui): dark mode for the Inbox and My Data pages

- Activity feed message card hovered to `bg-white`, so in dark the hovered
  row turned into a white box with unreadable light text. Hover to
  `bg-surface` (white in light, raised in dark).
- My Data stat cards sat on `bg-primary`, darker than the page in dark;
  use `bg-surface` like Explore's panels. FeaturedIcon's gray/light theme
  switches to a solid gray block in dark, so keep the gray-blue tint with
  dark variants (the utility scale flips per theme).
- My Data asset list container is raised (`bg-surface`) with its divider
  on `border-secondary` in dark, matching Explore's results column.
- User avatars (ProfilePicture, core OwnerChip) were painted with inline
  light HSL that cannot follow the theme, leaving pale 92%-light bubbles on
  dark surfaces. The hue now travels as a CSS variable and classes choose
  the lightness per theme; light reproduces the original HSL exactly and
  dark draws a deep tint, light glyph and a ring in the same hue.

Light mode is pixel-identical on /inbox/activity, /inbox/tasks and
/my-data.

* fix(ui): put the Inbox on the standard PageLayout shell

The Inbox built its own shell: a PageHeader stripped of its card (no
radius, no border, a bottom rule instead) over a bg-primary Box, edge to
edge. Every other app page (Data Quality, Alerts, Connections) uses
PageLayout > PageLayout.PageHeader > PageLayout.Content, so the Inbox's
header and content backgrounds differed from them - most visibly in dark,
where bg-primary is darker than the page surface.

Use the same core PageLayout composition with an unmodified header card,
content on the page surface, and the same insets as Data Quality (8px
inside the header edge, 16px below it).

* fix(ui): keep the Inbox activity timeline line visible in dark

The rail was utility-gray-blue-100, which flips to gray-blue-900 in dark
and disappears against the page surface. Use border-primary in dark only;
light keeps its gray-blue line.

* fix(ui): Triage comment composer in dark mode

- The composer footer was bg-primary, darker than the detail panel in dark;
  it now matches the panel (bg-secondary in dark).
- Quill's placeholder is rgba(0, 0, 0, 0.6), invisible on dark; use the
  placeholder token in dark.
- Quill draws toolbar icons with a fixed #444 stroke (near-invisible on
  dark) while the @ / # text buttons took near-white text; give every
  toolbar icon one muted tone in dark.

Light mode is unchanged.

* fix(ui): keep Quill hover/active toolbar states in the dark composer

The dark muted-icon override outranked Quill's button:hover / .ql-active
rules, so toggled formats looked idle. Scope it to idle buttons only;
hovered and active buttons keep the brand highlight.

* refactor(ui): move feed Reactions to core and drop their LESS

Reactions, Emoji and Reaction were antd Button/Popover with
reactions.less, and the Inbox carried activity-feed-item.less only to
re-size those antd buttons into one row.

- Add-reaction trigger: core Button + PopoverTrigger/Popover.
- Reacted-emoji pills: core Button (22px, brand outline when the current
  user reacted) with the reactor list in a core HoverCard.
- Picker emoji: core Button with a brand tint when already reacted.

data-testids are unchanged (feed-reaction-container, add-reactions,
reaction-button, emoji-button, emoji-count, popover-content).
reactions.less and activity-feed-item.less are deleted; nothing else
used their classes.

* test(ui): target the core reactions popover in the feed helpers

The reactions picker moved from antd Popover to the core Popover, so the
helpers' .ant-popover-feed-reactions locator and rc-motion class check no
longer match. Locate it by test id and wait for react-aria's data-entering
to clear instead.

* test(ui): find reaction buttons by aria-label, not title

The core Button (react-aria) does not forward `title` to the DOM, so the
[title="<reaction>"] locators stopped matching after the Reactions moved
to core.
* feat(memory): enforce lifecycle and disputes

* feat(memory): inherit anchor domain on create

* fix(memory): gate anchored REST reads

Entity memories about restricted assets were visible through direct REST
reads. Check ViewBasic on the anchor for non-owners.

Search still relies on domain inheritance and search RBAC; asset policies
are not evaluated per result.

* fix(memory): gate MCP pill reads by anchor

The by-name Company Context lookup omitted primaryEntity, so an anchored
memory appeared unanchored to the visibility check. Fetch the decision
fields before projecting the pill.

Query search remains governed by search RBAC and inherited domains.

* fix(memory): guard history and retain list cursors

History endpoints exposed earlier versions without checking the current
memory's visibility. Check the current memory before serving either
history endpoint.

Keep paging cursors when hidden memories are filtered from a list page
so callers can reach later visible rows.

* feat(memory): index lifecycle and retain anchors

Map supersession and dispute fields in every search locale and request
the relationship fields needed by memory docs during reindex.

Default an omitted status to Active on create. The generated model leaves
the schema default null, which broke lifecycle reads after regeneration.

* feat(vector): filter memory chunks by status

Stamp lifecycle status on chunk docs and accept it in both vector query
builders. Non-Active transitions change the fingerprint to refresh the
filter fields; existing Active memories keep their fingerprint.

* fix(memory): protect lifecycle updates

Preserve server-managed lifecycle fields on PUT so re-extraction cannot
reactivate a superseded memory or erase disputes.

Reject newly referenced memories the editor cannot read, and cache
anchor access decisions within each list page.

* style(memory): format lifecycle integration test

* fix(memory): hide anchored search hits

Search cannot evaluate an anchor's asset policy for each indexed hit.
Limit anchored Entity memories to owners and admins in lexical and vector
search; direct reads still allow asset readers.

Require an explicit unanchored marker so older documents fail closed
until reindexed. Stamp the marker on entity and chunk documents.

* fix(memory): search only active memories

Keep retired memories available through direct lifecycle and version reads while excluding them from lexical, vector, and Company Context retrieval.

* feat(memory): show lifecycle in Context Center

* fix(ontology): reject retired memory proposals

* feat(memory): filter lifecycle states in Context Center

Allow status selection alongside search, asset, author, and sort filters while keeping ordinary search Active-only.

Preserve lifecycle fields on omitted-status PUT and prevent non-Active memories from proposing glossary terms. Extend API and UI coverage for these behaviors.

* test(memory): validate lifecycle on main

Reconcile Public memory visibility and index fields after the parent PR landed. Cover retired memory behavior in Playwright and align the deleted-source glossary expectation.

Refs #34394

* fix(context-center): protect file-anchored memories

* fix(ci): align memory contracts and MF4 deps

* revert: keep ingestion dependencies unchanged

* fix(context-center): address lifecycle review

* fix(context-center): handle legacy memory status

* Fixes #34540: Support a shared lifecycle stage on entities and let active workflows own it

Every entity type whose schema declares entityStatus now gets its lifecycle
stage rules from EntityRepository instead of a schema default, so they live in
one place:

- A new entity starts in its type's stage: Draft for domains, data products,
  glossaries, articles, ontology axioms, data contracts and AI assets;
  Approved for assets that come from the data infrastructure. Metrics and
  glossary terms start Draft only when they have reviewers.
- A PUT, bulk upsert or CSV import whose request carries no stage keeps the
  stage the entity is in instead of resetting it.
- While a deployed, unsuspended governance workflow sets an entity type's
  stage, only that workflow (acting as the governance bot) may change it.
  A direct change is rejected with 403, and a create that asks for a stage the
  workflow owns starts in the type's own stage. The workflow's trigger filter
  decides which entities it owns; suspending it releases them.
- GET /v1/metadata/types/lifecycleStages lists the stages and, per entity
  type, the workflows that own its stage.
- Context memories move from their own Draft/Active/Archived status onto
  entityStatus. The 2.1.0 migration converts stored memories and their
  version history (Active becomes Approved).
- The approval-task closing, in-review delete and reviewer rules that seven
  repositories each duplicated are shared now, with per-type flags keeping
  each rule on the entity types that had it.
- A consolidated update no longer re-validates a stage change that an earlier
  version made, such as a workflow approving on the user's behalf.
- createOntologyAxiom no longer requires entityStatus, and DataProduct
  lifecycleStage is deprecated in favor of entityStatus.

BaseEntityIT checks the stage rules for every entity type; types without a
lifecycle (users, teams, test suites, ...) opt out.

* Update generated TypeScript types and dereferenced schemas

* fix(context-center): show legacy active memories

* Cover the repository lifecycle-stage rules with unit tests

The repositories' stage rules reached the active workflows through a static
EntityStatusWorkflows lookup, so no unit test could put an entity under an
owning workflow. EntityRepository now takes a StageOwnership, with the active
workflows as its default, and the create-time stage assignment and the
updater's stage check are package-private instead of being reached through
reflection.

New tests cover a create that asks for a workflow-owned stage, the workflow
creating and moving an entity in that stage, types whose stage no workflow
owns, approval and rejection by reviewers and reviewing teams, sending an
entity in review back to Draft, session consolidation, memory transitions
through the updater, and glossary terms inheriting reviewers. Line and branch
coverage of the repositories' stage code goes from 66% and 58% to 91% each.

* Let an entity type declare its own lifecycle stages

Every type with entityStatus draws its stages from one vocabulary, but a type
can now declare its own lifecycle in its repository: the stages it uses,
including stages only it has, and the moves between them. Types that declare
none keep the general lifecycle, any move between today's seven stages, so
nothing changes for them, Metric included. A stage added to the vocabulary
later is outside the general lifecycle, so only the types that declare it can
use it.

EntityRepository rejects with 400 a create in a stage outside the type's
lifecycle and a stage change the lifecycle has no move for, for direct edits,
imports and workflows alike. Context memories are the first type to declare
one (Draft, Approved, Archived), replacing their own transition table and
validators. GET /v1/metadata/types/lifecycleStages now reports each type's
stages and transitions, and BaseEntityIT checks that every type rejects a move
outside its lifecycle.

* Fix memory chunk header status projection

* Upgrade memory chunk mapping for entityStatus

* fix(ui): sync generated glossary status schema

* refactor(memory): reuse shared lifecycle statuses

* fix(memory): normalize legacy lifecycle states

Map legacy migration values directly to shared statuses while retaining the 2.1.1 conversion for databases that stored preview values. Treat statusless memories as Approved in reconciliation, ontology derivation, and duplicate matching.

Refs #34394

* test(amundsen): expect approved service status

* fix(memory): leave lifecycle migrations to base PR

* fix(ui): keep linked memory modals closed

* chore(ui): regenerate context memory types

The generate-types check failed on a hand-added blank line after the
license header in the two regenerated context memory models.

* fix(context): keep retired pills retired on re-extraction

Re-extracting a file or page forced every matched pill back to Approved,
so a pill a reviewer Rejected or Deprecated (with its successor) came
back on the next page edit, lost its statusReason and supersededBy, and
reached agents again. Retired pills are now claimed but left as-is, like
pills a human edited.

* fix(context): find duplicate pills across files again

Cross-file deduplication searched without a subject. Anonymous search
now admits only unanchored memories, and every extracted pill is
anchored to its source file, so no candidate was ever found and each
file created its own copy of a shared fact. Search as the admin that
owns extracted pills; admins still see only Approved memories.

* fix(ontology): apply a draft while each operation keeps an active source

A batch draft lists every memory on its CREATE_GLOSSARY operation and
merges co-sources onto shared terms, so rejecting or deleting any one
memory blocked the whole draft. An operation is now blocked only when
none of its sources is still Approved, and a hard-deleted source is a
400 like a retired one instead of a 404.

* fix(ui): keep memory edits from dropping data or stacking modals

- Editing a Learning memory removed its type, since the form only offers
  the types people pick by hand. A type the form cannot show is kept.
- The successor link stayed clickable in edit mode and opened the
  successor over the unsaved editor. It now links only in view mode.

* refactor(context): simplify status listing and tighten its tests

- Merge the two identical search-backed list branches and drop the
  unreachable empty-status check from the statuses parser.
- Correct comments that still described an Active-only filter or a
  list-only status overload.
- The MCP Deprecated-pill test used an anonymous caller, which fails the
  visibility check anyway; run it as the principal the pill is shared
  with so it fails without the status gate.

* refactor(context): drop the null-status fallbacks the 2.1.0 migration made dead

main's 2.1.0 postDataMigration sets entityStatus to Approved on every
context memory and version row that lacks one, and every create path
assigns the initial stage, so a memory without a stage can no longer
exist. Remove effectiveStatus and the updater's legacy branches, compare
statuses directly as main did, let the shared entityStatus index field
carry the stage, and delete the tests that built such rows by hand.

* fix(context): share extracted memories only from org-wide files

Deduplicating a fact, or reusing the memories of a byte-identical file,
links the existing memory to the new source but leaves it anchored to
its own file. Since anchors now gate reads, a memory from a private or
shared file would stay hidden from readers of the new file. Reuse only
memories whose anchor file everyone can read; the new file extracts its
own otherwise.

* refactor(search): list memory statuses through the generic search path

The status filter had its own method on the resource, repository,
search repository, search client interface, both clients and both
managers. Carry the selected statuses on SearchListFilter instead: the
resource uses the generic listInternalFromSearch, SearchRepository hands
them to a listWithOffset overload, and the existing overload defaults to
the searchable statuses.

* fix(search): refresh memory chunks through one tested decision

The live, chunk-only and staged-backfill paths each repeated the check
for when a memory's chunks must be rewritten, and no test caught the
status or anchor restamp being dropped. They now share chunkRefresh,
which is tested directly.

Live updates also rewrite an in-flight staged generation, as deletes
already do, so a recreate that copied a memory before its status or
anchor changed cannot promote the stale chunks.

* fix(mcp): search entity passages as the caller, falling back to the body

get_entity_details searched a knowledge item's chunks without a
subject, so restricted, anchored or retired memories the caller may read
returned no passages at all. Search as the caller, and return the full
body when search still withholds every chunk.

* fix(aicontext): drop retired and hidden pills before the 20-pill cap

Retired memories stay attached to their asset, and the builder capped
the attached pills before filtering by status and visibility, so they
could push Approved pills out of the context. Load a bounded batch,
filter it, then cap; visibility is decided once for the batch. Only
Approved pills are active now that every memory carries a stage.

* fix(ui): align the memories badge with the list and keep successor params

- The sidebar badge counted memories through the database list, which
  includes every status and other users' private memories. It now asks
  for Approved memories through search, like the page's default view.
- The successor link replaced the whole query string. It now keeps the
  Context Center's other parameters.

* fix(context): leave every pill outside Approved to its reviewer

Re-extraction still re-approved Archived and Draft pills. Extraction
creates every pill Approved, and no engine path archives one (a pill the
source drops is deleted), so any other stage is a reviewer's decision.
Only Approved pills are engine-managed now, which also makes the
re-approval branch in applyDerived unreachable, so it is removed.

* fix(context): deduplicate memories as a synthetic admin

The duplicate finder searched as the user named admin, which
deployments with other admin principals do not have, so the lookup threw
and aborted reconciliation. Search as a synthetic admin instead, as
EntityUpdater does for system writes. It carries an id, since search
treats a subject without one as anonymous and would hide every anchored
memory again.

---------

Co-authored-by: Sriharsha Chintalapani <harsha@getcollate.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…en (#34555)

* feat(ui): keep table DQ indicator visible while an incident is open

The table header DQ icon only reflected the latest test run, so it
disappeared as soon as a failing test passed even if its incident was
still unresolved. It now has three states: red for a currently failing
test, amber for an unresolved incident on a passing test, and amber with
an upstream badge for an upstream failure. The tooltip names the reason
and summarises multiple conditions; the icon links to the matching tab.

* fix(ui): fetch only open incidents for the table DQ indicator

Without a status filter, latest=true returned Resolved incidents too, and
they could fill the 100-row page and push out an open one, hiding the
amber state. Filter to New/Ack/Assigned on the server instead.

* fix(ui): keep DQ indicator colour on hover and focus

antd's global a:hover / a:focus colour overrode the link's text colour,
turning the red/amber icon primary blue. Put the colour on the svg.

* feat(ui): match DQ indicator card to the design prototype

Replace the dark tooltip with a core HoverCard that follows the prototype:
featured-icon header, pluralised copy, icon rows with bold counts for
multiple conditions, and a "View … →" action link. The trigger gets a
tinted hover background. Strings are translated for all 20 locales.

* fix(ui): handle the DQ indicator fetch promise and its effect deps

Mark the fire-and-forget fetch with void (Sonar S9383) and memoise it so
the effect lists its real dependencies (react-hooks/exhaustive-deps).

* feat(ui): use the design-system DQ alarm icons in the indicator

Add the DataQualityAlarm and DataQualityAlarmUpstream icons from the
Collate icon library (20px, 1.3px stroke) to core-components and use them
in the table DQ indicator in place of the larger filled alert SVG. The
upstream variant carries its own badge, so the separate overlay is gone.

* test(ui): cover the DQ indicator fetch and address review nits

- Page tests for fetchDqIndicatorCounts: paging.total count, incidents on
  failing tests skipped, allSettled fallbacks, lineage stored only when
  fulfilled, and the disabled-alerts gate.
- Ignore late responses for a table the user already left.
- Return isList from useIndicatorContent instead of recomputing it.
- Inline the header badge and drop the unused
  label.check-active-data-quality-incident-plural key.
…av spacing (#34680)

* test(playwright): split multi-nested domain hierarchy test into parallel tests

The single multi-nested domain hierarchy test walked four domain levels and
sixteen filter combinations in one flow. Split it into a data-driven describe
with shared beforeAll/afterAll setup so each level/filter pair runs as its own
test in parallel, and add the cleanup the old test was missing.

* test(playwright): lower recorded no-positional-locator baseline to 610

* fix(ui): tighten glossary/classification nav item padding and left panel title gap

Dense (size sm) nav items use py-1 instead of py-2, which only the glossary
and classification left panels use. The resizable left panel title and its
learning icon now sit gap-1 apart.
…tory on the Health Check page (#34649)

* Fixes #14601: Health-check pooled LDAP connections so a dropped one cannot stall login

The LDAP lookup pool used the SDK's default health check, which never probes a
connection. When a firewall or load balancer silently drops an idle pooled
connection, the next login's user search waits out the SDK's five-minute search
response timeout, and the login retry can repeat that on another dead connection.

- Probe each pooled connection with a root DSE read before checkout, every 60 s
  in the background, and after a connection error; a connection that stays
  silent for 5 s is replaced. The background probe also keeps idle connections
  alive through load balancer and firewall idle timeouts.
- Retry a search once on a fresh connection when its connection turns out dead.
- Open pool connections through the same openConnection path as the password
  check and Test Login, and close the socket when the lookup bind is rejected.
- Close the handlers a security reload replaces, so their LDAP pools stop
  probing the directory once the provider is no longer LDAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Report the LDAP directory on the Health Check page when LDAP is the provider (#14601)

/v1/system/status, which the Health Check page renders, gets an LDAP entry when
the login provider is LDAP. It connects the way login does with 5 s timeouts,
binds as the lookup account and reads the user base DN, and names the step
that failed with the root reason rather than the SDK's nested wrapper text.
No entry appears under any other provider, even when LDAP settings are still
saved.

Test Login's fail-fast connection options move to LdapAuthenticator so both
share them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Close the auth handlers a failed security reload already replaced (#14601)

A reload swaps in the new handlers before it initializes the authenticator, so
one that fails afterwards (an unreachable directory, a wrong lookup password)
left the replaced handlers open with nothing routing to them, and an LDAP one
kept probing the old directory. Close whatever the reload replaced in a
finally. A handler it never replaced is still serving logins and stays open,
and a failing close is logged rather than thrown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ee merge-queue ITs (#34676)

* test(it): replay the deadlock loser only after the winner commits

Postgres wakes the winner of a deadlock but does not grant it the row the
loser released. When the loser's replay reached that row first it locked
it again and deadlocked the winner a second time, so the loser ran three
times instead of two. The replay now waits for the winner's commit.

Part of #34675.

* test(it): give each AppOperationPermissionsIT request its own connection

The class shared one JDK HttpClient across its concurrent tests. A POST
that went out on a pooled connection the server had already closed failed
with "HTTP/1.1 header parser received no bytes", because the JDK client
retries that case only for GET and HEAD.

Part of #34675.

* test(it): record a thread dump and the lock picture when the server stalls

The parallel lane has wedged with async deletes that never finish:
statements that need the rows they hold time out on MySQL and hang on
Postgres, and the server log names only the waiters. When queued async
database work stops completing, or a transaction stays open, for three
minutes, the watchdog writes the database's open transactions and lock
waits, plus a dump of every JVM thread with virtual threads included,
under target/ci-diagnostics, which the workflow already uploads.

Part of #34675.

* Fixes #34675: serve a settings update on the next read

SettingsCache is a Guava LoadingCache, and Guava ignores invalidate() for
a key whose load is still running. A read that loaded a setting just
before an update committed therefore cached the old value, and every
read served it until the entry expired three minutes later. The merge
queue hit this when DataProductResourceIT disabled the multi-domain rule
and its next update was still rejected by that rule.

Each cached value now records the invalidation count its load started
from, and a read reloads a value loaded before the latest invalidation.
…#34655)

* fix(dq): read the last-run banner's expectation from the test's bounds

The banner's RESULT / EXPECTED block paired the run's result with the
test parameter of the same name. Ingestion never names them alike: a
row count test reports `rowCount` against the parameter `value`, so the
block never showed for real runs. The unit and e2e fixtures used shapes
ingestion never produces, which hid it.

The banner now reads Found and Expected through the run details card's
helpers (getFoundValue, getRunExpectation, formatExpectation), so the
two always agree. It takes the test case instead of its parameters, and
both pages' memos depend on the test case.

* fix(dq): let the last-run banner's right side widen for a long comparison

A range test with large numbers (1,500,000 / 1,000,000 – 2,000,000) is
wider than the banner's 320 px right side, and the comparison, which
does not wrap, spilled over the run's reason. The right side is now at
least 320 px rather than exactly 320 px, so it widens and the reason
truncates before it. Normal values keep the 320 px right side aligned
with the rail.

* fix(dq): keep the expectation line on the result history chart

ECharts draws no reference line outside the y axis range, and the axis
covered only the runs. A failing run far from its expectation, such as
110 rows against an expected 10,000, therefore lost the expectation
line and its label. The y axis extent now takes in the expectation
before it is padded.

* fix(dq): read the result history band from the test's bounds by name

The allowed-range band took the first two parameters as min and max,
only when a test had exactly two, and parsed them with parseInt:

- decimal bounds were truncated, so 0.5-1.5 drew a 0-1 band with every
  passing run above it;
- a third parameter, such as a range's threshold, removed the band;
- two parameters that are not a range, such as an expected value and a
  threshold, drew a band between them (5 to 10,000).

The band now reads min and max through getParameterBounds, by name and
as numbers, like the expectation line and the caption. The bounds
helpers move above prepareChartData, unchanged.

* fix(dq): keep aborted and queued runs off the result history line

An aborted or queued run has no value. The chart placed one for it (the
lowest plotted value, or the expectation line) on the series itself, so
the line ran through it: an aborted run read as a measured drop, and a
queued run pulled the line to the expectation. The TCD-7 acceptance
criteria and the mock keep both off the line.

Placed values now go under a key of their own, drawn as a dot-only
series after the lines, so no line's colour shifts, and named like its
line, so the legend lists it once. The line connects across the gaps
and joins measured runs only. The screen-reader run list still lists
placed runs, and keyboard and click selection still reach them.

* fix(dq): ignore a result history response for a range that was replaced

The result history fetch wrote whatever response arrived, so a slow
response for an earlier range overwrote a newer one. Picking Today,
then Last month while Today was still loading, left the picker on
Sep 1 - Sep 30 while the chart, tiles and run card showed Today's runs.

The effect now marks its fetch stale when a newer range, dimension or
run replaces it, and a stale fetch sets no results, shows no error and
leaves the loaders to the fetch that replaced it.

* fix(dq): show the version page's parameter changes in the Configuration card's rows

The version page drew its parameter diff in an older layout: a fixed
200 px column for every name, inside a card about 236 px wide at
1440 px, so the values fell off the card's edge. Where they fitted, a
character diff glued the old and new numbers together ("1000012000").

The diff now comes as the card's own parameter rows, so values wrap like
on the normal page, and each change reads whole, "10000 → 12000", with
the old value struck through and the new one in the success colour. The
assertion SQL keeps its diff block, now below the rows. The styles only
the old layout used are removed.

* test(dq): select the version page's parameter rows in its e2e, and cover them

- TestCaseVersionPage.spec.ts selected the old diff's per-parameter test ids
  (`minValue`, `maxValue`). The card rows that replaced it are
  `configuration-parameter-<name>`, so the step could not find them. It now
  selects the rows, and checks each change reads whole (`12 → 20`).
- TestCaseResultTab: the version page builds its rows from the version diff.
- getParameterValueDiffRows: an added parameter shows only its new value, and
  a removed one only its old value, struck through.
- TestSummary: fetchTestResults' options are required, since its one caller
  always passes both, and its imports are formatted.

* test(dq): cover the rest of EntityVersionUtils, and the banner before load

- getSummary: deleted or restored; the added, updated and deleted field
  names; a bulk import's result, as a JSON string or an object, falling back
  to the field name when it cannot be read.
- getOwnerVersionLabel: an added owner on the version page, the current owners
  elsewhere, and the placeholder only for a user who cannot add an owner.
- TestCaseLastRunBanner: no comparison until the test case loads.

EntityVersionUtils.tsx goes from 53% to 93% line coverage.

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

* refactor(dq): build the placed series, run list and version rows in one pass

Each filter-then-map chain the earlier fixes added is a single reduce:

- TestSummaryGraph: the dot-only placed series, with each series' placed key
  computed once instead of three times.
- TestSummaryRunList: a run's screen-reader entries.
- applyStatusPlacements: a run's placed keys, built directly instead of
  filtering the missing series and mapping them to keys.
- getParameterValueDiffRows: the version page's parameter rows.

---------

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

* Fixes 22530: index container direct-child listings by parent FQN hash

Listing a container's children resolved "exactly one segment below this FQN"
with `fqnHash LIKE '<parent>.%' AND fqnHash NOT LIKE '<parent>.%.%'`. Those
select the right rows, but neither predicate is an indexable equality, so the
listing's `ORDER BY name, id LIMIT n` made idx_storage_container_entity_
deleted_name_id -- which already supplies that order -- the cheapest plan on
both MySQL and PostgreSQL, and the query scanned container rows until the page
filled. A container near the root of a deep tree has a large subtree but few
direct children, so the scan ran to the end of the table: the cost was
O(containers in the deployment), not O(children returned), and both the page
and count queries paid it on every render. The service root listing
(?root=true) had the same shape and the same problem.

Add a generated `parentFqnHash` column -- the row's own fqnHash minus its last
segment -- plus (parentFqnHash, deleted, name, id), turning both listings into
indexed equalities. Generated rather than application-maintained so it cannot
drift from the bulk `UPDATE ... SET fqnHash = REPLACE(...)` that re-parenting
uses, which bypasses the entity layer. This is the pattern already applied to
table_entity and stored_procedure_entity in the 1.10.0 migration; containers
were the outlier. The index leads with parentFqnHash rather than `deleted`
(as 1.10.0 does) because the container listing's `include` is tri-state, and
include=ALL has no `deleted` predicate to anchor a deleted-leading index.

Measured on the hierarchy attached to the issue (10,376 containers, 14 levels
deep, root with one direct child and 10,375 descendants) plus 40k unrelated
containers, warm:

                     MySQL 8.3            PostgreSQL 15
  children page   182 ms -> 0.022 ms    48.8 ms -> 0.038 ms
  children count  105 ms -> 0.018 ms     8.1 ms -> 0.353 ms
  children search 189 ms -> 1.7 ms
  root page       305 ms -> 0.077 ms
  root count      139 ms -> 0.025 ms

Before the fix the scan grew with deployment size rather than the answer:
10,376 containers scanned 10,376 rows to return 1; adding 40k unrelated
containers made the same query scan 50,376 rows to return the same 1 row.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Build the PostgreSQL parent-children index CONCURRENTLY

Review feedback from @sonika-shah. Matches the 1.11.0 idx_tag_usage_* and 1.13.0
*_fqnhash_pattern precedent, both of which build CONCURRENTLY on this runner.

Measured on a 580k-row / 674MB storage_container_entity (the size the 1.13.0
migration notes cite):

  ALTER TABLE ADD COLUMN ... STORED   AccessExclusiveLock     10.5 s
  CREATE INDEX (plain)                ShareLock                1.9 s
  CREATE INDEX CONCURRENTLY           ShareUpdateExclusive     1.8 s

So the plain build blocked writes but not reads, and CONCURRENTLY is free. It
removes the smaller half of the window: the STORED column add above still holds
ACCESS EXCLUSIVE for the table rewrite, which 1.11.0 accepted for the same
pattern on tag_usage. An expression index would avoid the rewrite entirely
(identical 110MB index, same build time) but would force every listing query to
repeat the CASE byte-for-byte, including the dialect-neutral root-listing SQL --
noted in the migration rather than done, as that is a design call.

MySQL needs no equivalent and has none: ADD COLUMN ... VIRTUAL is accepted with
ALGORITHM=INSTANT and the index with ALGORITHM=INPLACE, LOCK=NONE, both verified.

ContainerResourceIT 274/274 on PostgreSQL with the CONCURRENTLY form, confirming
the native migration runner executes it outside an implicit transaction.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Update root-listing IT comments for the parentFqnHash predicate

Three Javadoc blocks on the ?root=true tests still described the depth check as
`fqnHash NOT LIKE :serviceHashChild` with a `'%.%.%'` default, which this branch
replaced with `parentFqnHash LIKE :serviceHashExact` (default `'%'`) plus a
`parentFqnHash NOT LIKE '%.%'` companion. Comment-only; the assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Guard the MySQL parentFqnHash DDL so the migration is re-runnable

Every other DDL block added to 2.1.0/mysql on main is wrapped in an
information_schema check executed through a prepared statement, because MySQL has
no ADD COLUMN / CREATE INDEX ... IF NOT EXISTS. This branch's column and index were
plain statements, so any re-execution -- the runner re-runs a statement whenever its
text hash is not yet recorded, e.g. after an interrupted run -- would abort the
migration with "Duplicate column name". Both are now guarded and re-run as no-ops.
The PostgreSQL side already uses IF NOT EXISTS and needs no change.

The prepared-statement names are unique rather than the `PREPARE stmt FROM @ddl`
form some blocks reuse: the runner records statements by (version, hash of text)
and skips text it has already executed, so a reused `EXECUTE stmt;` would be
skipped instead of run.

Verified on MySQL 8.3: first run creates the column and index, second and third
runs exit 0 as no-ops, the stored generation expression is identical to the
previous unguarded form, and parentFqnHash equals fqnHash minus its last segment
on every row, including a quoted name containing dots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep ALTER DATABASE as the last statement of the 2.1.0 MySQL migration

FlowableCharsetMigrationTest.mysqlUpgradeChangesTheCurrentDatabaseDefault requires the
final statement of 2.1.0/mysql/schemaChanges.sql to be main's
`ALTER DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci` (#33659). When I first
merged main into this branch (5005a67) I resolved the conflict by appending this
branch's parentFqnHash block after main's content, which pushed that statement off the
end; every later merge kept the order, and the service unit-test job has failed on that
one test since.

Move this branch's block above main's Flowable comment and ALTER DATABASE, which is
where main's own later MySQL additions go. Main's text is untouched (the file minus this
branch's block is byte-identical to origin/main) and no statement's text changes, so
databases that already applied an earlier 2.1.0 snapshot re-run nothing. The block
specifies its own CHARACTER SET/COLLATE, so running before the database default changes
does not affect it.

Verified with the CI command (mvn package -pl openmetadata-service -am
-Pstatic-code-analysis): 11,089 tests, 0 failures, FlowableCharsetMigrationTest 6/6. The
run's only errors were K8sPipelineClientBotTokenBugTest picking up a local stub
~/.kube/config with no server entry; with HOME isolated, as on CI runners, it passes 2/2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@Rohit0301
Rohit0301 changed the base branch from main to fix/playwright-deflake-click-and-lazy-load-races October 7, 2026 07:42
@Rohit0301
Rohit0301 requested review from a team, akash-jain-10, harshach and tutte as code owners October 7, 2026 07:42
@Rohit0301
Rohit0301 requested review from IceS2 and removed request for a team October 7, 2026 07:42
@Rohit0301
Rohit0301 merged commit c212d1f into fix/playwright-deflake-click-and-lazy-load-races Oct 7, 2026
123 of 126 checks passed

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.