Repository navigation
Fixes #38784: lineage filter, count and metric column ITs; make BaseEntityIT lineage test assert - #38785
Merged
Conversation
…yIT lineage test assert Add LineageFilterIT: Service, Service Type, Database, Schema and Column filters on /getLineage (canvas keeps root and path nodes) and on getLineageByEntityCount (impact analysis returns only matches), plus per-depth upstream/downstream counts over a mixed-type graph. Add LineageResourceIT tests for a metric as a column-lineage endpoint (to and from), the tempLineageTables round trip, and the async CSV export's service and pipeline columns. BaseEntityIT#testLineageFluentAPI swallowed every exception and no subclass enabled it. It now adds an edge, reads it from both ends, deletes it and checks it is gone; lineage is enabled in the 15 entity ITs the Playwright lineage spec covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code Review ✅ Approved 🟢 Low riskThe PR adds isolated lineage integration coverage and makes previously swallowed test failures assert; production code and runtime behavior remain unchanged. Adds Java integration tests for lineage filters, column lineage to metrics, lineage CSV export, and the lineage fluent API, covering behavior previously checked only by Playwright specs. Tests only, with no product code changes. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
1 task done
yan-3005
approved these changes
Nov 26, 2026
This was referenced Nov 26, 2026
chirag-madlani
added a commit
that referenced
this pull request
Nov 27, 2026
…database, schema and column find deep matches (#38899) * test(it): lineage filter, count and metric column ITs; make BaseEntityIT lineage test assert Add LineageFilterIT: Service, Service Type, Database, Schema and Column filters on /getLineage (canvas keeps root and path nodes) and on getLineageByEntityCount (impact analysis returns only matches), plus per-depth upstream/downstream counts over a mixed-type graph. Add LineageResourceIT tests for a metric as a column-lineage endpoint (to and from), the tempLineageTables round trip, and the async CSV export's service and pipeline columns. BaseEntityIT#testLineageFluentAPI swallowed every exception and no subclass enabled it. It now adds an edge, reads it from both ends, deletes it and checks it is gone; lineage is enabled in the 15 entity ITs the Playwright lineage spec covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(lineage): apply database, schema, column, owner, data product and glossary term filters after the walk so deep matches are found The lineage page's filter dropdown sends database.displayName.keyword, databaseSchema.displayName.keyword, columns.name.keyword, ownerDisplayName, dataProducts.displayName.keyword and glossaryTags in query_filter. LineageFilterClassifier.NODE_LEVEL_FIELDS listed none of database, databaseSchema, columns, ownerDisplayName, dataProducts or glossaryTags, so these filters were classed as structural and pushed into the search walk itself. The walk stops at the first node that fails the filter, so a match behind a non-matching node was never reached: the canvas (getLineage) returned only the root and Impact Analysis (getLineageByEntityCount) returned nothing. Classing them as node-level makes both ES and OS builders walk with the structural filter only and apply the filter afterwards: in memory with path preservation for the canvas, and as an ES/OS query over the walked FQN hashes for Impact Analysis, the same path Service and Service Type already take. LineageFilterClassifierTest lists every field the dropdown sends and asserts each is node-level, so a new dropdown field cannot silently regress this. Builds on #38785 (LineageFilterIT). Fixes #38783 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38784
Describe your changes:
Java ITs for the lineage API behaviour that only
DataAssetLineage.spec.tsandLineageFilters.spec.ts(Playwright) check today, so those tests can move off Playwright (Wave 2 of open-metadata/openmetadata-collate#8315). Tests only; no product code changes.New
LineageFilterIT. Graph: root table → mid table → Snowflake table, Postgres table and Kafka topic, with each table on its own service, database and schema.getLineage_serviceFilter_keepsPathToMatch,getLineage_serviceTypeFilter_keepsPathToMatch: the canvas keeps root and intermediate nodes along with the match.getLineage_hierarchyFilters_matchIntermediateNode: database, schema and column filters on the mid node.impactAnalysis_serviceFilter_returnsOnlyMatches,impactAnalysis_serviceTypeFilter_returnsOnlyMatches: impact analysis returns only the matches.entityCount_totalsForRootMidAndLeafOfMixedTypes: the per-depth counts behind the Upstream/Downstream radios.Added to
LineageResourceITcolumnLineage_tableColumnToMetric,columnLineage_metricToTableColumn: a metric as a column-lineage endpoint, stored and shown in the downstream column view.tempLineageTables_roundTriptestExportLineageIncludesPipelineAndServiceColumns: the async CSV export end to end, checking the from/to service name and type andpipelineName.BaseEntityIT#testLineageFluentAPIcould never fail. No subclass setsupportsLineage, and its body swallowed every exception. It now adds an edge between two entities of the type, reads it from both ends, deletes it and asserts it is gone. Exceptions fail the test, and unsupported types skip throughAssumptionsinstead of passing silently. It's enabled in all 15 entity ITs whose types the lineage API accepts: Table, Container, Topic, Dashboard, MlModel, Pipeline, StoredProcedure, SearchIndex, DashboardDataModel, APIEndpoint, Metric, Directory, File, Spreadsheet, Worksheet.Product bug found: #38783. Database, Schema and Column filters stop at the first node that doesn't match, because
LineageFilterClassifier.NODE_LEVEL_FIELDSdoesn't list them. The ITs here pin only the behaviour that works today (a match on the first node below root), so this PR neither hides the bug nor locks it in. The fix and its deep-match tests come in a follow-up.Type of change:
Tests
Run locally (Docker/testcontainers, mysql-elasticsearch):
LineageFilterIT,LineageResourceIT,LineageImpactAnalysisITandtestLineageFluentAPIin the 15 entity ITs, 144 run, 0 failures, 0 errors, 3 skipped (already@Disabled). The full suites for those entities weren't run, only their lineage test.spotless:checkis clean.plan_local_java_tests.py --check-branch: the map is complete (*Lineage*ITalready covers the new class).🤖 Generated with Claude Code