Skip to content

fix(lineage): hierarchical lineage map fixes from 2.1.0 release testing - #37677

Closed
mohityadav766 wants to merge 9 commits into
mainfrom
fix/21rt-hierarchical-lineage
Closed

mohityadav766 wants to merge 9 commits into
mainfrom
fix/21rt-hierarchical-lineage

Conversation

@mohityadav766

@mohityadav766 mohityadav766 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

No OSS issue exists for these bugs. They are B1–B24 on the 2.1.0 release-testing row "Hierarchical Lineage" (Notion), found by Chirag on 3–5 Nov. This is a follow-up to #35891 / #35892.

This PR fixes 11 of the bugs testing found on the /lineage map and its scene API:

  • B14 query_filter: a filter the engine refuses, such as {"term":{"name":{}}}, returned 500 with the raw Elasticsearch message. It now returns 400 Invalid query_filter: the search engine rejected it as a query. Filters the client rejects, such as [1] or {"terms":{}}, no longer leak the search client's class names.
  • B10: hovering a node lit every connected edge. It now lights only the node's own upstream and downstream path, and the other edges dim.
  • B12: an entity without lineage showed its lone card at 245%. It now shows "No lineage data available".
  • B13: a failed load kept the previous scene, with a small error pill and no Reload. The error state with Reload now replaces that scene.
  • B6 / B7: zooming out at the 10% minimum (wheel or button) never went up a level. A zoom that reached the minimum during the cooldown stayed stuck there. A zoom-out at the minimum now goes up a level. The semantic zoom ADR is updated (v3).
  • B3: picking a domain in the header search now opens it in the Domain lens.
  • B21: an unknown entity in the URL kept the previous map and tab title. It now shows "No asset found for …" with the way back, and the tab title reads Lineage.
  • B19: in AI mode, when the lineage settings fail to load, the read-only view now shows Reload instead of "Not set" plus Edit.
  • B22: an asset's Lineage tab fetched twice (3/3, then the saved 2/2). It now fetches once, at the saved depth.
  • B24, in part:
    • domain and data product cards no longer show an asset's service type ("CustomDatabase · data product");
    • the PNG export file name no longer repeats the date;
    • "entity" in the search placeholder is now translated.

Needs a 2.1 backport after review.

Type of change:

  • Bug fix

High-level design:

N/A: these are bounded bug fixes, one commit per area.

Tests:

Unit tests

Each test was seen RED on the unfixed code, then GREEN.

  • LineageSceneQueryTest, SearchEngineErrorsTest, LineageSceneResolverTest (B14, data product subtitle): 15 failures before the fix. All 108 LineageScene*, pruner, permission-filter and SearchEngineErrors tests now pass.
  • LineageMap.component.test.tsx (new; the first test that renders the map) covers B12, B13, and the wheel and button zoom-out at the minimum (B6/B7). 4 of its 5 cases fail on the old component; the fifth is a guard and passes on both.
  • LineageMap.utils.test.ts: B10, plus the empty and error state decision.
  • PlatformLineage.test.tsx: B3, B21 and the placeholder word.
  • LineageSettingsForm.test.tsx: B19.
  • LineageStaleNavRepro.test.tsx: B22, which made 2 calls before the fix and 1 after.
  • LineageExportButton.test.tsx and LineageControlButtons.test.tsx.
  • All 72 lineage and platform-settings Jest suites pass (888 tests).

Backend integration tests

  • LineageResourceIT#testLineageSceneRejectsMalformedQueryFilter (MySQL + Elasticsearch) gains [1], {"term":{"name":{}}} and {"terms":{}}, and now asserts that the message carries no class names.
  • RED on the unfixed code: 5 of 6 failed, and {"term":{"name":{}}} returned 500 [es/search] failed: [parsing_exception] ….
  • GREEN after the fix: 6 of 6 pass.
  • Not run: OpenSearch.

CI on this PR

Playwright (UI) tests

Not run locally: the shared machine has no stack for it. The merge queue runs PlatformLineage.spec.ts.

Manual testing performed

None. Each fix is covered by the tests above. The row needs a retest.

UI screen recording:

Not applicable: these are bug fixes, and no local stack is available on the shared machine. A retest on the release row will verify them.

Not fixed here, and why

  • B1: already fixed by fix(security): second batch of backend security-hardening fixes #36638 and fix(security): third batch of backend security-hardening fixes #36952.
  • B2 (a domain-only user's root drops a service whose tables only send lineage), B17 and B18 (non-admin loose card, and counts and weights): the backend non-admin root aggregation. The code does not show the cause; each needs an IT repro with a non-admin fixture.
  • B4 (10 fields per node, lineage columns only), B5 (a pipeline focus has no pipeline node) and B11 (Pipeline View Mode on the map): scene API and layout design.
  • B9: the shared EdgeInfoDrawer has no column-mapping section on any surface. The rollup-edge wording is a design call too.
  • B8 (landing viewport), B20 (a stale edge drawer) and B23 (one prefetch with the tab's filter): not reproducible from the code. They need a live repro.
  • B15 (keyboard access) and B16 (the Japanese dialog): layout and design. Jest gives no signal on them.
  • B6: the "stops at 18%" part was not reproduced. The button now behaves like the wheel at the minimum.
  • B24, the rest:
    • the pill for admins is tied to the out-of-scope truncation pill;
    • the URL path keeping the first entity;
    • "1 Fields" and "1 Features" (a shared label util);
    • the settings button overlap and the dark-mode logos (CSS and assets);
    • the "Base" badge, which was not found in the OSS lineage UI.
  • Out of scope per the row: the 4 product decisions, the drill button on empty containers, the non-admin truncation pill, §9/§12/§14, and the benchmark budgets.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration) and listed them above.
  • Decision check: the zoom-out rule is recorded in docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md (v3).
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

…r's terms

B14 from the 2.1.0 hierarchical lineage release testing:

- A filter the search engine refuses, such as {"term":{"name":{}}}, parses
  in the client but fails at search time. It came back as a 500 carrying
  the raw engine message. A scene request with a query_filter that the
  engine answers with 400 now returns 400 "Invalid query_filter: the
  search engine rejected it as a query". Without a filter, an engine 400
  stays a server fault.
- Filters the client rejects, such as [1] or {"terms":{}}, returned 400
  with the search client's class names. The reason is now worded for the
  caller: not valid JSON, not a JSON object, a missing required property,
  or an unexpected value at a JSON path.

SearchEngineErrors.isRejectedRequest recognises an Elasticsearch or
OpenSearch 400 anywhere in a cause chain, for callers that reach the
engine without a search manager's own translation.
…s service type

From B24 in the 2.1.0 hierarchical lineage release testing: in the Data
Product lens a card's subtitle read "CustomDatabase · data product". A
domain or data product node took the service type of the first asset that
drew it. They span services, so the scene now gives them none, and the
card shows only its kind.
…stream path

B10 from the 2.1.0 hierarchical lineage release testing: hovering
dim.product on fact_orders' Data Assets scene lit every edge, including
tmp_order_enriched -> fact_orders, and nothing dimmed. The hover path
walked the edges in both directions from every node it reached, so it
lit the whole connected graph. It now follows incoming edges upstream
and outgoing edges downstream from the hovered node only, so a sibling
that feeds the same downstream node stays off the path and dims.
…le card

B12 and B13 from the 2.1.0 hierarchical lineage release testing:

- B12: an entity without lineage drew only its own card, zoomed to 245%,
  with no message. A focused scene that holds only the focus node and no
  edges now shows "No lineage data available", with the way back to the
  lens root, as an empty container already did.
- B13: once a scene was drawn, a failed load kept that scene under the
  new URL with a small "Something went wrong" pill, and Reload was offered
  only when nothing had loaded yet. A failed load now replaces the drawn
  scene with "Something went wrong" and Reload, and Reload shows the
  skeleton while it retries.

LineageMap.component.test.tsx is the first test that renders the map
itself; React Flow, the API and the node cards are mocked at their
boundaries.
B6 and B7 from the 2.1.0 hierarchical lineage release testing: once the
zoom reached its 10% minimum, further zooming out never moved up a level.
d3-zoom drops a wheel gesture that cannot change the zoom, and the
zoom-out button changes nothing there, so no move reached the semantic
zoom. A zoom that hit the minimum during the post-load cooldown stayed
stuck until the user zoomed in and out again.

A wheel-out or a zoom-out press at the minimum zoom now goes up a level
directly, with the same suppression and cooldown as any other semantic
zoom. LineageControlButtons takes an optional onZoomOut, called before
the zoom changes. The semantic zoom ADR records the rule (v3).

The 18% floor reported for the zoom-out button could not be reproduced
from the code; the button now behaves like the wheel at the minimum.
…dle an unknown entity

From the 2.1.0 hierarchical lineage release testing:

- B3: picking a domain in the header search opened /lineage/domain/:fqn
  in the Service lens, whose scene focused one of the domain's tables.
  A domain now opens with lineageLens=domain.
- B21: /lineage/table/:fqn for a table that does not exist kept the
  previous entity's map and tab title, with only a raw "not found" toast.
  A failed entity load now drops the previous entity; a 404 shows "No
  asset found for <fqn>" with the way back to All Services, the tab title
  reads Lineage, and the permission lookup's 404 is not toasted on top.
- B24 (part): the word "entity" in the search placeholder is translated.
…ettings fail to load

B19 from the 2.1.0 hierarchical lineage release testing: when the lineage
settings failed to load, the AI-mode read-only view showed "Not set" for
every field and still offered Edit. It now shows "Something went wrong"
with Reload and drops Edit until the settings load, as the edit form
already does.
B22 from the 2.1.0 hierarchical lineage release testing: after leaving
any lineage view, an asset's Lineage tab fetched twice, first at the
store's reset default of 3/3 and then at the saved 2/2. The saved
settings reach the store in the effect that runs just before the fetch
in the same commit, so the fetch now reads the config from the store
instead of this render's stale copy, and the second run finds the same
fetch key.
From B24 in the 2.1.0 hierarchical lineage release testing: the export
dialog appends the date to the name it is given, and the Lineage page's
export button passed a name that already ended in the date.
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Lineage query-filter handling and map navigation/loading changes span backend and UI, and regressions could reject valid filters or disrupt lineage exploration.

Fixes a batch of hierarchical lineage map bugs from 2.1.0 release testing, covering the scene API's query_filter error handling, hover path highlighting, zoom-out at minimum, empty and failed-load states, domain search navigation, unknown entity handling, and a single lineage fetch at saved depth. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@mohityadav766

Copy link
Copy Markdown
Member Author

closing in favor of #37685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant