Repository navigation
Fixes 38418: RDF graph live writes, table keys, concept bindings, quality evidence and extension points - #38419
Conversation
❌ 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 |
|
Local Java test run: PASSED — details
Tests run locally
Per-class counts come from the test reports, which can credit a test to the wrong class when classes run concurrently, and keep only the last run of a nested class that several test classes inherit. The summary's step totals are Maven's own counts. unit · openmetadata-mcp (3 classes), openmetadata-service (39 classes): 53 classes
Broader coverage not executed by this focused run
Impacted, not run locally (20)
Commandsmvn -B package -pl openmetadata-mcp,openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=ContextMemoryRepositoryTest,ContextMemorySearchVisibilityTest,ContextMemoryVisibilityTest,HybridRankingTest,HybridSearchScopeTest,JsonLdTranslatorTest,LiveReferenceFilterTest,McpSdkUpgradeTest,OntologyActiveGraphStorageTest,OntologyBindingGraphLinksTest,OntologyConceptBindingProjectionTest,OntologyDescribeToolTest,OntologyDocumentTest,OntologyReleaseDAOTest,OntologyServedBindingsStorageTest,OpenSearchAggregationRbacTest,OpenSearchHybridSearchTest,OpenSearchSearchAccessFilterTest,OpenSearchVectorServiceTest,PIIMaskerTest,PersonaContextDefinitionValidationTest,PersonaRepositoryTest,QualityWritesRefreshRdfTest,RdfConceptBindingProjectionTest,RdfConceptBindingWriteTest,RdfEntityDeleteLineageTest,RdfEntityWritePlannerTest,RdfLiveWriteTest,RdfLiveWriterTest,RdfOntologyContractTest,RdfOntologyDescriptionContractTest,RdfOwnedResourcesTest,RdfPropertyMapperTest,RdfQualityEvidenceTest,RdfQualityProjectionTest,RdfReindexerTest,RdfTableKeyProjectionTest,RdfToolDescriptionVocabularyTest,RdfUpdaterTest,SearchRepositoryTest,TestCaseResolutionStatusRepositoryTest,VectorSearchQueryBuilderTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test=OpenSearchVectorReaderIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=rdf -Dit.test=RdfEntityDiffWriteIT,RdfLiveWriteRecoveryIT,RdfQualityEvidenceIT,RdfResourceIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false |
293cd64 to
ca8d3ae
Compare
Clear sensitive test parameters and descriptions in RDF with the test-case API's canonical field masker.
Sharing a context memory with a persona is not part of this change; memory sharing and visibility match main again.
IngestionPipelineRepositoryTest asked SecretsManagerFactory for a DB manager, but createSecretsManager returns whatever manager an earlier test left, so a hard delete ran the external secret inventory and threw a NullPointerException. EntityRepositoryRestoreTest's bulk hard deletes walk the JVM-wide repository registry through FqnKeyedRowCleanup and failed on a null entry another test registered (also seen on main). Reset the secrets manager for the class and stub the registry inside the existing Entity static mock.
harshach
left a comment
There was a problem hiding this comment.
Reviewed; see the inline comments.
Code Review ✅ Approved 🔴 High risk 5 closed / 5 findingsAdding quality and test evidence to the RDF graph could leave sensitive-column evidence queryable after glossary-based sensitivity changes until a refresh. Adds live RDF graph updates for concept bindings, ordered table keys, and quality evidence, plus ontology term descriptions and distribution extension points. Resolved the hybrid search rules gap, stale test evidence after column drops or renames, missing record for superseded refresh retirement and extension point contracts, and soft-deleted entities being served by the RDF endpoint. No open issues found. ✅ 5 closed✅ Quality: Hybrid search ranking and scope rules exist only in the PR body
✅ Bug: Dropping or renaming an untagged column leaves test evidence on it
✅ Quality: Retiring superseded queued refreshes (100-row window) has no record
✅ Quality: Distribution extension points have no record of their contract
✅ Edge Case: RDF entity endpoint now serves soft-deleted entities
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 |
Dropping the Lookups record left the private constructor with six parameters. The five-parameter public constructor now does the work, and the test-only constructor overrides the entity type resolver after delegating to it.
…lations against SQL (#38482) (#38581) Before projecting a replayed RDF relationship add (generic relationships and glossary-term relations), check the SQL row still exists; if it does not, remove the triple instead of resurrecting it. The reverse-row lookup applies only to metric -> metric RELATED_TO. Adapted for 2.1 (main's #38419 is not on this branch): - RdfProjectionLoaders: keep 2.1's 6-component record (no BoundAssets or table-key loaders); add RelationshipExists and GlossaryTermRelationRows. - RdfLiveWriteTest, RdfGlossaryTermRelationTest, RdfEntityDeleteLineageTest: construct the 6-arg loaders; keep 2.1's existing tests and add #38482's cases. - RdfQualityEvidenceTest: dropped, the file does not exist on 2.1. (cherry picked from commit 0c6f3b0) Co-authored-by: Kia Yun <[email protected]>
Describe your changes:
Fixes #38418
The RDF knowledge graph now keeps up with the catalog and carries the facts an agent needs to
reason over it. A distribution built on OpenMetadata also gets small extension points, so it
can add its own MCP guidance without forking the service.
an entity write's scope now also owns its concept binding edges, constraint members and latest
test result/incident, so a rewrite replaces them; a queued entity refresh is retired when the
same refresh is queued again shortly after (one profiler run queued one table refresh per
column); an active ontology release change refreshes its bound assets; reindex fixes.
composite foreign key pairs each column with its referred column). Builds on Fixes 37755: Correct stale RDF quality and constraint facts #37756, which
fixed stale constraint facts and column uniqueness.
are in the graph. A column tagged sensitive keeps none of its values in the graph (same
masking rule as the API).
ontology_describecan read a single term, with itslabel, comment and the properties whose domain includes it.
(JSON-LD, Turtle, RDF/XML, N-Triples). The graph and the endpoint mask a test case with the
test-case API's own
PIIMaskerfield masking (result, incident, parameters, description).McpServer.serverInstructions(), a publicPersonaRepository.validateContextDefinition,OntologyDocument.loadCanonicalModel(), and thepublic
RdfConceptBindingMapper.BOUND_ASSET/BOUND_COLUMNpredicates.Companion Collate PRs, stacked and built on this one: open-metadata/openmetadata-collate#8850 → #8851 → #8852 → #8853. Each lists the tests run in Collate.
Type of change:
High-level design:
main:RdfRepositoryturns an entity write into an RDFdiff executed after commit through
RdfLiveWriter. This PR adds retiring superseded refreshes inRdfLiveWriteStoreand extends what an entity owns.RdfOwnedResources/RdfEntityScopedefine which triples an entity owns, so a refreshnever deletes another entity's facts.
RdfTableKeyMapper(keys, ADR:2026-11-13-column-uniqueness-means-the-column-alone-is-unique),RdfConceptBindingMapper+DatabaseConceptBindingLookup(active-release bindings; ADR:2026-10-19-native-concept-bindings-remain-operational-metadatastill holds for the ontology release and its import/export),
RdfQualityEvidence+RdfQualityMapper/RdfTestResultMapper(quality, ADR:2026-11-18-the-rdf-graph-carries-the-latest-quality-evidence).Profile and test-case writes queue a table refresh; resolution-status (incident) writes queue a
refresh of their test case (
QualityWritesRefreshRdfTest). A table write whose columns or columntags change requeues its test cases before the table is stored.
openmetadata.ttl2.1.0 adds labels/comments;OntologyDocument/OntologyTermEntryserve one term (ADR:2026-11-18-ontology-terms-describe-themselves-and-read-one-at-a-time).ontology_describe) and the extension points. The knowledge-graph tool itself, and its search, live in Collate.families; live writes keep them current after that. No schema migration.
becomes a merge, and the graph facts serve every OpenMetadata user.
Tests:
Use cases covered
sensitive loses them, including when the test-case requeue fails once and is retried.
ontology_describe term=om:InputPortlists properties whose domain is anowl:unionOf.and 200 again after restore (
RdfResourceIT#entityRdfReturns404ForSoftDeleted*UntilRestored);the graph side stays covered by
RdfSoftDeleteITandRdfSoftDeleteReindexIT.Unit tests
RdfLiveWriteTest,RdfLiveWriterTest,RdfEntityWritePlannerTest,RdfOwnedResourcesTest,RdfTableKeyProjectionTest,RdfConceptBindingProjectionTest,RdfConceptBindingWriteTest,RdfQualityEvidenceTest,RdfQualityProjectionTest,QualityWritesRefreshRdfTest,RdfReindexerTest,RdfUpdaterTest,RdfPropertyMapperTest,RdfOntologyContractTest,RdfOntologyDescriptionContractTest,OntologyDocumentTest,OntologyDescribeToolTest,RdfToolDescriptionVocabularyTest,PersonaContextDefinitionValidationTest,PersonaRepositoryTest,McpSdkUpgradeTest, and others in the run below.DatabaseRdfQualityEvidenceSource(covered byRdfQualityEvidenceIT; unit tests use a fake source),RdfQualityEvidenceSource(interface),RdfEntityScope,RdfConceptBindingMapper,RdfQualityMapper,RdfTableKeyMapper,RdfTestResultMapper(each exercised through its projection test),OntologyTermEntry(through
OntologyDocumentTest),EntityProfileResource(throughQualityWritesRefreshRdfTest).Backend integration tests
RdfEntityDiffWriteIT,RdfLiveWriteRecoveryIT,RdfQualityEvidenceIT,RdfResourceIT.Local Java test run: PASSED
d7c66f34dc67(baseorigin/main) — uncommitted changes were present--scope full).Pending for merge readiness:
--scope full(10 deferred steps, 20 classes, including thenightly scale and UI ITs listed in the details comment).
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
2f6f5367549) under Collate on a local stack: MySQL, OpenSearch, Fuseki,RDF on, sample catalog over a BigQuery warehouse, RDF reindex run (
projectionState: READY).bound concept and each column its bound property and range; table nodes carried test,
profile, freshness and open-incident evidence.
or binding edit observed live without reindex.
UI screen recording:
Not applicable — backend only.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.mdwith fresh reviewers. Round 1 fixed the 🔴 requeue lost on retry and five 🟡. The branch was then rebuilt to drop code only Collate uses (hybrid search moved to Collate), and round 2 on the rebuilt head (ca8d3ae32bc) found no scope or leftover issues; its one 🟡 (a sensitive-column test's parameter values and description reached the graph, as onmain) is fixed in8b578e1062aby sharingPIIMasker's field masking. Round 3 (fresh reviewer, fullREVIEW.mdpass atca8d3ae32bc): 0 🔴; fixed infa6eddef981the stale test evidence after an untagged column is dropped or renamed, and column-level composite keys limited to tables; keptom:statusProperty(an ontology annotation naming a class's status properties, read by Collate to count nodes by status); declined a reindex-path integration test. Answered: a column that becomes sensitive only through a glossary term keeps its evidence in the graph until the table or test case is next written (the API masks it at once).docs/decisions/: 2026-10-19 (amended), 2026-11-03, 2026-11-13, 2026-11-18 ×2.

Confidence Score: 5/5
The latest changes appear safe to merge, with no new actionable issues found.Summary
The PR adds live RDF concept bindings, ordered table keys, latest quality evidence, ontology term descriptions, and extension points.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Catalog or quality write] --> B[Queue entity refresh] C[Binding or active release change] --> B B --> D[Load current entity and quality evidence] D --> E[Mask sensitive test fields] E --> F[Build RDF facts] F --> G[Replace changed and owned triples]Reviews (10) · Last reviewed commit: "Keep JsonLdTranslator constructors withi..." · Reviewed by Greptile