Skip to content

Fixes 35881: tag Hex table-to-dashboard lineage as DashboardLineage (2.0) - #35946

Merged
ulixius9 merged 2 commits into
2.0from
ulixius9/hex-lineage-source-2.0
Oct 22, 2026
Merged

ulixius9 merged 2 commits into
2.0from
ulixius9/hex-lineage-source-2.0

Conversation

@ulixius9

@ulixius9 ulixius9 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #35881

This backports #35882 to 2.0 with git cherry-pick -x 3c4db6a, which applied cleanly. Hex built its table → dashboard AddLineageRequest with no lineageDetails, so the server stored every Hex edge with the default source=Manual. Hex now uses the shared DashboardServiceSource._get_add_lineage_request, so its edges carry source=DashboardLineage and both entity FQNs.

Type of change:

  • Bug fix

High-level design:

N/A: small change (backport).

Tests:

Use cases covered

  • Hex ingestion yields table → dashboard lineage tagged lineageDetails.source = DashboardLineage.

Unit tests

  • ingestion/tests/unit/topology/dashboard/test_hex.py::test_yield_dashboard_lineage_details asserts the lineage source.
  • On this 2.0 branch, with models generated from 2.0's schemas, I ran PYTHONPATH=src python -m pytest tests/unit/topology/dashboard/test_hex.py tests/unit/topology/dashboard/test_hex_ingestion_flow.py: 34 passed. ruff check and ruff format --check are clean on both changed files.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable: there are no Hex integration tests under ingestion/tests/integration/.

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

None against a live Hex workspace. Covered by the unit tests above.

UI screen recording:

Not applicable: ingestion-only bug fix.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: same diff as Fixes 35881: tag Hex table-to-dashboard lineage as DashboardLineage #35882 (reviewed at 3c4db6a, no 🔴 findings).
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

The new guard preserves valid lineage requests, but the outstanding test-style requirement must be met before merging.

Findings

  1. P2 New assertion breaks test rules ▶

Summary

Hex now uses the shared lineage helper to mark table-to-dashboard edges as DashboardLineage.

  • Hex table-to-dashboard edges now carry the dashboard-lineage source.

Reviews (2) · Last reviewed commit: "fix(hex): skip None from _get_add_lineag..." · Reviewed by Greptile

Hex built its own AddLineageRequest without lineageDetails, so its edges
carried no source and were indistinguishable from manual lineage. Route it
through DashboardServiceSource._get_add_lineage_request like the other
dashboard connectors.

(cherry picked from commit 3c4db6a)
@ulixius9
ulixius9 requested a review from a team as a code owner October 22, 2026 09:58
@ulixius9
ulixius9 requested review from stout-yeoman and removed request for a team October 22, 2026 09:58
@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 Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 22, 2026
self.assertIsInstance(lineage_request, AddLineageRequest)
self.assertEqual(lineage_request.edge.fromEntity.id, EXAMPLE_TABLE.id)
self.assertEqual(lineage_request.edge.toEntity.id, EXAMPLE_DASHBOARD.id)
self.assertEqual(lineage_request.edge.lineageDetails.source, LineageSource.DashboardLineage)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 New assertion breaks test rules

The new assertion uses self.assertEqual, but the repository’s Python rules require plain assert statements. Use assert lineage_request.edge.lineageDetails.source == LineageSource.DashboardLineage instead. This requirement must be met before merging; the existing assertions do not need to change in this PR.

Suggested change
self.assertEqual(lineage_request.edge.lineageDetails.source, LineageSource.DashboardLineage)
assert lineage_request.edge.lineageDetails.source == LineageSource.DashboardLineage

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

…ight

The helper returns Either | None; yielding it directly from an
Iterable[Either[AddLineageRequest]] generator fails static checks.

(cherry picked from commit 39ef1e5)
@gitar-bot

gitar-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Hex now stores lineage provenance and entity FQNs via the shared helper; incorrect values could misrepresent table-to-dashboard dependencies.

Hex table-to-dashboard lineage now uses the shared DashboardServiceSource._get_add_lineage_request, so edges are tagged lineageDetails.source = DashboardLineage with both entity FQNs instead of the default Manual. 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

@sonarqubecloud

Copy link
Copy Markdown

@ulixius9
ulixius9 merged commit 5396bb4 into 2.0 Oct 22, 2026
60 of 63 checks passed
@ulixius9
ulixius9 deleted the ulixius9/hex-lineage-source-2.0 branch October 22, 2026 11:30

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

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

2 participants