Repository navigation
Fixes 5952: [Lineage] Draw Dashboard to Chart edges in the shared dashboard topology - #34985
Conversation
- An override run deletes the edges into an entity and then writes them back, and each write skips the PUT when the edge lookup already finds the edge - The edge cache was module level, so a later workflow in the same process found an edge its own override run had just deleted and never wrote it back - The cache now lives on the client, which lasts one workflow, the same span `delete_lineage_by_source` is deduplicated over - `get_lineage_edge` uses a string key like the other edge lookups
- New `yield_dashboard_chart_lineage` stage right after `yield_dashboard`, so connectors that replace `yield_dashboard_lineage` (Rill) still draw the edges - After a Barrier it reads the dashboard back with its charts and draws one edge per chart reference, so filtered, failed or rejected charts get none and no chart is fetched on its own - Edges use the `DashboardLineage` source and carry `overrideLineage` like the other dashboard lineage - Tableau integration fixture fakes the site at the HTTP transport and runs the workflow against a live server: three charts, a filtered view, a view that fails, a second workbook, a rerun and an override rerun - SSRS integration test shows the same edges with no connector code
- Each edge lookup (write, by name, by id) and the graph read-back after a write still spare a second read of the same edge within one client
❌ 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 |
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were found, and the behavior has focused unit and integration coverage.
0 open findings
What changed in this PR
Adds shared Dashboard → Chart lineage and prevents lineage cache leakage across workflows.
Changes:
- Adds dashboard-chart lineage after sink flushing.
- Scopes lineage edge caching per client.
- Adds unit and live-server integration coverage.
| File | Description |
|---|---|
ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py |
Adds shared lineage stage. |
ingestion/src/metadata/ingestion/ometa/mixins/lineage_mixin.py |
Makes edge caching client-scoped. |
ingestion/tests/unit/topology/dashboard/test_dashboard_chart_lineage.py |
Tests stage behavior and errors. |
ingestion/tests/unit/ometa/test_lineage_edge_cache.py |
Tests cache isolation and reuse. |
ingestion/tests/integration/tableau/conftest.py |
Provides Tableau integration fixtures. |
ingestion/tests/integration/tableau/test_metadata.py |
Verifies Tableau lineage end-to-end. |
ingestion/tests/integration/tableau/__init__.py |
Marks the integration-test package. |
ingestion/tests/integration/ssrs/test_metadata.py |
Verifies shared lineage for SSRS. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -184,6 +184,12 @@ class DashboardServiceTopology(ServiceTopology): | |||
| processor="yield_dashboard", | |||
There was a problem hiding this comment.
dashboard context is never cleared, so if yield_dashboard fails for a dashboard, yield_dashboard_chart_lineage re-reads the previous one and re-emits its edges. Harmless but wasted calls. Can use clear_context=True here would avoid it.
There was a problem hiding this comment.
thanks @Khairajani! it's addressed now, the dashboard stage now clears its context, with a runner test where the next dashboard fails. this also stops data model lineage and looker usage of a failed dashboard from landing on the previous one.
- A dashboard that failed in the connector left the previous dashboard's name in the context, so the stages after it worked on that dashboard instead - The chart lineage stage now sees no dashboard and draws nothing, instead of redrawing the previous dashboard's edges - Data model lineage and Looker lineage and usage for a failed dashboard no longer land on the previous one
Code Review ✅ Approved🟡 Medium risk · Adding Dashboard-to-Chart lineage edges and per-client caching changes persisted lineage metadata; incorrect edge handling could leave dependency graphs incomplete or misleading. Adds a Dashboard to Chart lineage stage to the shared dashboard topology, drawing one edge per chart the server holds under each dashboard, and moves the lineage edge cache onto the ingestion client so override reruns in the same process write back deleted edges. No issues found. OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Fixes open-metadata/openmetadata-collate#5952
Dashboard connectors create Dashboard and Chart entities, but nothing drew a lineage edge between them, so the visual hierarchy could not be walked through the lineage graph. The shared dashboard topology now draws one Dashboard → Chart edge for every chart the server holds under each dashboard, so every dashboard connector gets the edges without connector code.
Testing the
overrideLineagererun also exposed a bug in the ingestion client. The lineage edge cache was process wide, so a workflow that ran after another one in the same process found an edge its own override run had just deleted, took it as still stored, and never wrote it back. Nothing was logged. The cache now lives on the client, which lasts one workflow.Type of change:
High-level design:
A stage of its own. The edges come from a new stage in the dashboard node, right after the dashboard is written. Connectors that replace the dashboard lineage stage entirely (Rill does) still get the edges, and an error in a connector's own lineage cannot stop them.
Read back from the server. The stage flushes the sink with a Barrier, reads the dashboard back with its charts, and draws one edge per chart reference. The server's dashboard to chart relation is exactly the set of charts created under the dashboard: a chart excluded by
chartFilterPatternor one that failed in the connector never reaches the dashboard request, and a dashboard that references a chart the server does not hold is rejected as a whole. The read returns chart references, which is all an edge needs, so no chart is fetched on its own. That costs one read per dashboard plus one write per edge.Lineage semantics. Edges use the
DashboardLineagesource and go through the same path as the other dashboard lineage, sooverrideLineageapplies. A rerun cannot duplicate an edge, since the server keeps one edge per entity pair. With override on, a chart's existing dashboard lineage is deleted once per run before its first new edge, so edges from other dashboards or upstream data models into the same chart survive.Edge cache. The lineage edge lookups were cached in a module level LRU, while the override delete is deduplicated per client. A later workflow in the same process could therefore answer an edge lookup from an edge that had been deleted in between, skip the write, and drop the edge. The cache now lives on the client, so it has the same lifetime as the delete deduplication. Within one workflow it still spares repeat reads exactly as before.
Alternatives considered.
Failed dashboards. The dashboard name in the topology context is now cleared after each dashboard. A dashboard that failed in the connector used to leave its predecessor's name behind, so the stages after it (data model lineage, Looker lineage and usage, and the new chart edges) worked on the previous dashboard. They now see no dashboard.
Compatibility. No schema change and no migration. The edges are always drawn, so lineage graphs gain chart nodes downstream of each dashboard after the next ingestion run. Connectors that already draw edges into charts (Looker explores, Metabase tables) keep them.
Tests:
Use cases covered
DashboardLineagesource.chartFilterPatterngets no chart and no edge.overrideLineagekeeps exactly one edge per chart.Unit tests
Backend integration tests
Ingestion integration tests
tests/integration/).Playwright (UI) tests
Manual testing performed
py_format_checkand the static checks.UI screen recording / screenshots:
Not applicable.
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 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.
For UI changes: I attached a screen recording and/or screenshots above.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
The issue properly describes why the new feature is needed, what's the goal, and how we are building it. Any discussion or decision-making process is reflected in the issue.
I have updated the documentation.
I have added tests around the new logic.