Skip to content

Fixes #35891: Fix lineage page PNG export, tab title and settings save (backport 2.0 #35892) - #37168

Merged
mohityadav766 merged 2 commits into
2.0from
backport/2.0/pr-35892
Nov 6, 2026
Merged

mohityadav766 merged 2 commits into
2.0from
backport/2.0/pr-35892

Conversation

@mohityadav766

Copy link
Copy Markdown
Member

Issue

Backport of #35892 to 2.0 (Fixes #35891).

What it fixes

2.0 has no hierarchical lineage map, so this carries only the parts of #35892 that apply to 2.0's Lineage page and lineage settings:

  • Lineage page PNG export. The page's own export passed an empty node list and no edge overlay, so the image framed the canvas origin with no edges. The export button now calls LineageProvider.onExportClick, which already exports the platform graph it holds, with its frame and edges. The button is a new LineageExportButton, rendered inside the provider through platformHeader.
  • Tab title. /lineage/:entityType/:fqn used label.entity-lineage, which is the literal "Entity Lineage". It now uses label.platform-type-lineage with the entity name, for example "Customer Dimension Lineage".
  • Lineage settings save. The Settings › Preferences › Lineage page sent only its four fields, and the settings PUT replaces the whole value, so every save dropped graphPerformanceConfig. It now sends the loaded value back with the edited fields. If the settings fail to load, the page shows "Something went wrong" with Reload instead of a form.

Left out (not on 2.0)

  • Everything on the hierarchical lineage map, including the header lens label. On 2.0 the header follows platformView, which 2.0's provider writes, so that bug does not exist here.
  • The AI-mode lineage settings form.
  • The 400 for a malformed query_filter on GET /v1/lineage/scene (there is no scene API on 2.0).
  • LineageScenePerformanceScaleIT, LineageMapPage and the scale doc.
  • Capture-time framing (ExportData.getViewport, getLineagePngExportOptions). 2.0's canvas renders every node and its export has no capture hooks, so a frame fitted at click time matches the capture.

Backport notes

Applied by hand, because the files #35892 changes either don't exist on 2.0 or differ. Two 2.0-specific points:

  • handleSave in LineageConfigPage was a useCallback with no dependencies. It now lists lineageConfig and the other values it reads; otherwise the spread would read the first render's undefined. The saved value is renamed savedConfig, because the old const lineageConfig in the same block would have shadowed the state. Prettier re-indents the callback, so view that file's diff with whitespace hidden.
  • LineageConfigPage.test.tsx is new on 2.0.

How it was tested

On this branch:

  • Jest: PlatformLineage.test.tsx, the new LineageConfigPage.test.tsx and LineageExportButton.test.tsx, and LineageProvider.test.tsx: 4 suites, 61 tests pass.
  • These fail against 2.0 without the fix: keeps the settings the form does not edit, does not offer saving until the settings load, exports the platform graph through the lineage provider and names the focused entity in the browser tab title.
  • ESLint (no errors or warnings), Prettier and organize-imports are clean on the changed files. tsc reports nothing new in them; the one error in PlatformLineage.tsx predates this change, in the search-option mapping.
  • Playwright: Flow/LineageSettings.spec.ts gains Saving the lineage config keeps the settings the form does not edit, and Pages/Lineage/PlatformLineage.spec.ts checks the tab title. I did not run them locally; they run in CI.

🤖 Generated with Claude Code

…e (backport 2.0 #35892)

The parts of #35892 that apply to 2.0, which has no hierarchical lineage
map:
- The Lineage page exports through the lineage provider, which frames and
  draws the platform graph it holds. The page's own export framed an empty
  node list and drew no edges.
- The browser tab title on /lineage/:entityType/:fqn names the entity;
  label.entity-lineage is the literal "Entity Lineage".
- Saving the lineage settings sends back the fields the page does not
  edit. The settings PUT replaces the whole value, so every save dropped
  graphPerformanceConfig. A page whose settings failed to load offers
  Reload instead of a form.
@mohityadav766
mohityadav766 requested a review from a team as a code owner November 5, 2026 14:14
@mohityadav766 mohityadav766 added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Nov 5, 2026
@mohityadav766
mohityadav766 requested review from Rohit0301 and removed request for a team November 5, 2026 14:14
@github-actions

github-actions Bot commented Nov 5, 2026

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 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 571 → 572
- 1 added, 0 removed, 1 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/Lineage/LineageExportButton/LineageExportButton.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/pages/PlatformLineage/PlatformLineage.tsx

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 getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

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

@pmbrull
pmbrull requested review from a team, akash-jain-10, harshach and tutte as code owners November 5, 2026 14:14
@gitar-bot

gitar-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Changing lineage settings saves to preserve the full stored configuration, so stale or incorrect fields could be written and alter persisted graph behavior.

Backports the 2.0 lineage page fixes: PNG export now uses the platform graph through LineageProvider.onExportClick, the browser tab title names the focused entity, and saving Lineage settings keeps graphPerformanceConfig instead of dropping it. 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

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 68%
68.73% (83796/121913) 53.72% (52100/96973) 54.42% (15465/28416)

@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@mohityadav766
mohityadav766 merged commit 806c5c7 into 2.0 Nov 6, 2026
61 of 68 checks passed
@mohityadav766
mohityadav766 deleted the backport/2.0/pr-35892 branch November 6, 2026 08:20

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

backend 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.

3 participants