Repository navigation
fix(lineage): route platform lineage settings through the lineage store - #33197
Conversation
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. Also merges the duplicate Flow/PlatformLineage.spec.ts into Pages/Lineage/PlatformLineage.spec.ts, adds a Playwright regression test that asserts getPlatformLineage refires with the new depths on save, and covers the store wiring in PlatformLineage.test.tsx. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
Screen.Recording.2026-09-11.at.3.07.39.PM.mov
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.tsxkeptlineageConfigin a localuseState. ButLineageProvider's fetch effect readslineageConfigfrom the shared ZustanduseLineageStoreand re-runsfetchPlatformLineagewhen it changes. Writing to local state left the store untouched, so the effect never fired. The entity-lineage view worked becauseCustomControls.component.tsxcorrectly writes to the store.Fix:
PlatformLineage.tsxnow readslineageConfigandsetLineageConfigfromuseLineageStore(same pattern asCustomControls). Save → store write → provider effect →getPlatformLineage?upstreamDepth=…&downstreamDepth=…fires.Flow after fix
LineageProvideralready seedsstore.lineageConfigfromappPreferences.lineageConfig./lineage:PlatformLineagereads config from the store — modal shows the global depth.onPlatformViewUpdatefires → refetch with new depths.resetso the modal-scoped override doesn't leak across page navigations.Test plan
openmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.test.tsxLineage Store Integrationdescribe: modal receives the store'slineageConfig;onSavecalls store'ssetLineageConfig;onCanceldoes not.playwright/e2e/Flow/PlatformLineage.spec.tsintoplaywright/e2e/Pages/Lineage/PlatformLineage.spec.ts(single file, two describes:Entity Lineage tab+Platform Lineage page (/lineage)).Settings depth change refetches platform lineageopens the modal on/lineage, sets both depths to 2, clicks OK, and assertsgetPlatformLineage?...upstreamDepth=2&downstreamDepth=2fires.yarn lint:playwright— 0 errors on the touched spec.:3000proxying:8585): initial fetchupstreamDepth=2&downstreamDepth=2, changed to4/4in the modal, saved, and confirmedGET /api/v1/lineage/getPlatformLineage?view=service&upstreamDepth=4&downstreamDepth=4&…fired and the graph re-rendered with more nodes.Files changed
openmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.tsx— swap local state → storeopenmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.test.tsx— newLineage Store Integrationtestsopenmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/PlatformLineage.spec.ts— merged specs + depth-refetch regressionopenmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PlatformLineage.spec.ts— deleted (consolidated)🤖 Generated with Claude Code