Skip to content

Fixes <2370>: made required changes to accommodate tempLineageTable in the Lineage grapgh Tab#27709

Open
satender-kumar-collate wants to merge 5 commits intoopen-metadata:mainfrom
satender-kumar-collate:feat/temp_lineage_table
Open

Fixes <2370>: made required changes to accommodate tempLineageTable in the Lineage grapgh Tab#27709
satender-kumar-collate wants to merge 5 commits intoopen-metadata:mainfrom
satender-kumar-collate:feat/temp_lineage_table

Conversation

@satender-kumar-collate
Copy link
Copy Markdown
Contributor

@satender-kumar-collate satender-kumar-collate commented Apr 24, 2026

Describe your changes:

This PR is regarding the UI changes to accommodate the tempLineageTables in the Lineage tab.
Fixes 2370

image

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • [ x I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Summary by Gitar

  • Lineage UI logic:
    • Implemented extractTempLineageNodes to dynamically process and inject tempLineageTables into the lineage graph.
    • Added isTempTable flag to LineageNodeType and excluded temp tables from service icon rendering in LineageNodeLabelV1.
    • Updated LineageProvider to prevent interactions (like selection) on temporary lineage nodes.
  • Canvas coordinate calculations:
    • Refactored getEntityLineageCoordinates to prioritize node.height over computed heights to correctly position edges for variable-sized nodes.
    • Updated CanvasUtils.test.ts to include test coverage for edge positioning on temporary nodes.

This will update automatically on new commits.

@satender-kumar-collate satender-kumar-collate requested a review from a team as a code owner April 24, 2026 11:49
@satender-kumar-collate satender-kumar-collate added the safe to test Add this label to run secure Github workflows on PRs label Apr 24, 2026
Comment thread openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx Outdated
Comment thread openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

❌ UI Checkstyle Failed

❌ ESLint + Prettier + Organise Imports (src)

One or more source files have linting or formatting issues.

Affected files
  • openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.test.tsx

Fix locally (fast — only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
61.95% (61790/99737) 42.07% (33049/78548) 45.11% (9771/21656)

const sourceHeight = getNodeHeight(sourceNode, isColumnLineage, 0);
const targetHeight = getNodeHeight(targetNode, isColumnLineage, 0);
const sourceHeight =
sourceNode.height ?? getNodeHeight(sourceNode, isColumnLineage, 0);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the height logic in the getNodeHeight method only?

.map((n) => [n.fullyQualifiedName!, n])
);

const getOrCreateNode = (nameOrFqn: string): LineageNodeType => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have it as seprate util function instead a nested?

) as LineageNodeType;

const baseEdges = tempEdges.length
? finalEdges.filter((e) => !e.tempLineageTables?.length)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we are filtering here?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

🟡 Playwright Results — all passed (17 flaky)

✅ 3956 passed · ❌ 0 failed · 🟡 17 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 755 0 4 8
🟡 Shard 3 730 0 2 7
🟡 Shard 4 755 0 4 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 731 0 6 8
🟡 17 flaky test(s) (passed on retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Search suggestions should be filtered by selected domain (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel move operation (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 3, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Table (shard 4, 2 retries)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for DashboardDataModel (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Store Procedure (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate DataProduct Rule Any_In (shard 4, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Container (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Pipeline (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/Teams.spec.ts › Teams Page Flow (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 26, 2026

Code Review ✅ Approved 3 resolved / 3 findings

Integrates tempLineageTable into the Lineage graph tab by ensuring original edges are retained, replacing unsafe type casts, and adding necessary unit tests for the extraction logic.

✅ 3 resolved
Bug: Original edge retained alongside expanded temp-lineage edges

📄 openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx:1713-1725
In parseLineageData, the original edge that carries tempLineageTables is kept in finalEdges, and the expanded temp edges are appended via [...finalEdges, ...tempEdges]. This means if edge A→B has tempLineageTables: [{ fromEntity: A, toEntity: temp_C }, { fromEntity: temp_C, toEntity: B }], the graph will contain both the direct A→B edge AND the A→temp_C + temp_C→B edges, creating parallel/duplicate visual paths.

If the intent is to replace the direct edge with the expanded path, you need to filter out original edges that have tempLineageTables from finalEdges. If the parallel display is intentional, consider adding a comment explaining this design choice.

Quality: Unsafe as unknown as string cast for entityType

📄 openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx:1526
The refactored processPipelineEdge introduces as unknown as string to cast the result of get(pipelineNode, 'entityType'). Double-casting through unknown bypasses type safety. If entityType is actually an enum value, it's already string-compatible. If it's not a string, this hides a real type error.

Quality: No unit tests for extractTempLineageNodes logic

📄 openmetadata-ui/src/main/resources/ui/src/utils/EntityLineageUtils.tsx:1607-1621
The new extractTempLineageNodes function contains significant logic (node deduplication, edge creation, FQN matching) but has no dedicated unit tests. The added tests in CanvasUtils.test.ts only cover the height computation changes. Testing this function would catch regressions in temp node creation and edge expansion.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants