Skip to content

fix(lineage): route platform lineage settings through the lineage store [backport 1.13] - #33298

Open
chirag-madlani wants to merge 1 commit into
1.13from
backport/1.13/lineage-settings-refetch
Open

chirag-madlani wants to merge 1 commit into
1.13from
backport/1.13/lineage-settings-refetch

Conversation

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Backport of #33197 to 1.13.

Summary

On /lineage, opening the settings modal and changing Upstream / Downstream Depth silently produced no network call — the graph did not refetch.

Root cause: PlatformLineage.tsx kept lineageConfig in a local useState. But LineageProvider's fetch effect reads lineageConfig from the shared Zustand useLineageStore and re-runs fetchPlatformLineage when it changes. Writing to local state left the store untouched, so the effect never fired.

Fix: PlatformLineage.tsx now reads lineageConfig and setLineageConfig from useLineageStore (same pattern as CustomControls). Save → store write → provider effect → getPlatformLineage?upstreamDepth=…&downstreamDepth=… fires.

Scope

Backport is narrower than the main PR — only the app-code + unit-test fix is included. The Playwright spec consolidation from #33197 is intentionally skipped because 1.13 uses Mui-selected class assertions while main uses data-selected, and the goal here is a minimal, low-risk backport.

Test plan

  • Unit — openmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.test.tsx: new Lineage Store Integration describe (modal receives store's lineageConfig; onSave calls store's setLineageConfig; onCancel does not).
  • Manual UI validation performed on the main-branch fix (recorded a GIF against the dev server): initial fetch upstreamDepth=2&downstreamDepth=2, changed to 4/4 in the modal, saved, and confirmed GET /api/v1/lineage/getPlatformLineage?view=service&upstreamDepth=4&downstreamDepth=4&… fired and the graph re-rendered.

Files changed

  • openmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.tsx — swap local state → store
  • openmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.test.tsx — new store-integration tests

🤖 Generated with Claude Code

The /lineage settings modal used to write into a local useState in
PlatformLineage, but the LineageProvider fetch effect reads
lineageConfig from the shared Zustand useLineageStore — so changing
upstream/downstream depth silently produced no network call. Wire the
page to the store directly (matching CustomControls for entity
lineage) so the save handler triggers a refetch.

Backport of #33197 from main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chirag-madlani
chirag-madlani requested a review from a team as a code owner September 15, 2026 06:05
@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.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 15, 2026
@gitar-bot

gitar-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes the lineage settings modal by routing lineageConfig through the Zustand store instead of local state, ensuring that depth changes trigger a refetch of the platform lineage graph. Includes unit tests validating store integration. No issues found.

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

Compact
gitar display:verbose         

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

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.64% (61529/96668) 45.04% (33848/75138) 46.99% (10333/21988)

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant