Repository navigation
Fixes #37353: Install ontology library packs as a resumable background job - #37361
Conversation
Adds the ONTOLOGY_PACK_INSTALL job: it parses the verified bundled modules once, reconciles once, orders concepts, properties then axioms, and applies change sets of at most 1,000 members through the regular change-set path. Each slice carries a plan digest that replaces the per-apply full re-parse. Adds install, status and cancel endpoints, parseTrusted for checksum-verified bundled content, and named write-closure limits.
The native library detail starts the install job, polls it every second, shows slices and definitions applied, offers cancel, and resumes by starting a new job on retry. Adds generated types and translated strings for all locales.
…nd install the real GS1 vocabulary in an IT A slice is validated alone, so a replacement, inverse, property chain or disjoint property that names a definition in a later slice failed the install. Slicing now orders concepts and properties so each follows what it names, keeps mutually referencing definitions in one slice, and breaks ties by IRI. Starting an install checks for an active job and inserts under a lock on the ontology row, so concurrent starts queue one job. A slice the database rolled back as a deadlock victim is applied again. The importer skips an asserted literal whose datatype OWL 2 does not support instead of emitting an axiom that applying refuses.
The reference digests were recorded from an incremental build, where jsonschema2pojo regenerated OntologyConcept and OntologyChangeOperation without the defaults their referenced enum schemas declare (conceptType BOTH, provider user, state ACTIVE). A clean build, which CI runs, serializes those defaults, so the test failed there.
❌ 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 |
| * and the importer's identical-definition classification leaves them out of the new plan. | ||
| */ | ||
| public final class OntologyPackInstallJobHandler implements JobHandler { | ||
| private static final int MAX_SLICE_ATTEMPTS = 3; |
There was a problem hiding this comment.
⚠️ Quality: Deadlock retry budget for slices is not in any decision record
applyOnce re-applies a slice when the database rolled it back as a deadlock or serialization victim (any SQLState starting with 40, or SQLTransactionRollbackException). It allows at most MAX_SLICE_ATTEMPTS = 3 attempts and does not wait between them. That is a retry budget chosen by judgment, and its safety depends on a rule you can't see from this file: a slice must be one transaction, so a rollback undoes all of it. The PR description states the rule ("A slice the database rolled back as a deadlock or serialization victim (SQLState 40xxx) is applied again, at most 3 attempts"). The v10 amendment of ADR:2026-10-19-native-ontology-imports-use-working-drafts covers slicing, digests and job states, but it says nothing about retries. After the squash-merge the rule exists only as a constant.
The record would say: "A library install slice that the database rolls back as a deadlock or serialization victim (SQLState class 40) is applied again as a new change set, at most 3 attempts per slice; this is safe only because each slice applies in a single transaction." Add this sentence to the v10 amendment.
Add to the v10 amendment in the ADR:
A slice the database rolls back as a deadlock or serialization victim (SQLState class 40) is applied again as a new change set, at most 3 attempts per slice. This is safe only because each slice applies in one transaction; any other failure ends the job.
Was this helpful? React with 👍 / 👎
✅ Generated Sources Auto-UpdatedThe generated TypeScript types ( |
…-world-rdf-import' into codex/fix-pr37361-checks
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
|
7a65fae
into
harshach/ontology-library/1-real-world-rdf-import
…, #37368) (#37489) * Fixes #37353: Install ontology library packs as a resumable background job (#37361) * Install ontology library packs as a resumable background job Adds the ONTOLOGY_PACK_INSTALL job: it parses the verified bundled modules once, reconciles once, orders concepts, properties then axioms, and applies change sets of at most 1,000 members through the regular change-set path. Each slice carries a plan digest that replaces the per-apply full re-parse. Adds install, status and cancel endpoints, parseTrusted for checksum-verified bundled content, and named write-closure limits. * Start the library install as a job in the ontology library UI The native library detail starts the install job, polls it every second, shows slices and definitions applied, offers cancel, and resumes by starting a new job on retry. Adds generated types and translated strings for all locales. * Guard the importer tests in the library install amendment * Order library install slices by their references, serialize starts, and install the real GS1 vocabulary in an IT A slice is validated alone, so a replacement, inverse, property chain or disjoint property that names a definition in a later slice failed the install. Slicing now orders concepts and properties so each follows what it names, keeps mutually referencing definitions in one slice, and breaks ties by IRI. Starting an install checks for an active job and inserts under a lock on the ontology row, so concurrent starts queue one job. A slice the database rolled back as a deadlock victim is applied again. The importer skips an asserted literal whose datatype OWL 2 does not support instead of emitting an axiom that applying refuses. * Pin the slice digest reference values to a clean build of the models The reference digests were recorded from an incremental build, where jsonschema2pojo regenerated OntologyConcept and OntologyChangeOperation without the defaults their referenced enum schemas declare (conceptType BOTH, provider user, state ACTIVE). A clean build, which CI runs, serializes those defaults, so the test failed there. * Update generated TypeScript types and dereferenced schemas --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> (cherry picked from commit 7a65fae) * Fixes #37354: Let a native ontology hold 50,000 members and open them in Studio (#37362) (cherry picked from commit b65de72) * Fixes #37355: Let native ontology properties specialize other properties with rdfs:subPropertyOf (#37363) * Install ontology library packs as a resumable background job Adds the ONTOLOGY_PACK_INSTALL job: it parses the verified bundled modules once, reconciles once, orders concepts, properties then axioms, and applies change sets of at most 1,000 members through the regular change-set path. Each slice carries a plan digest that replaces the per-apply full re-parse. Adds install, status and cancel endpoints, parseTrusted for checksum-verified bundled content, and named write-closure limits. * Start the library install as a job in the ontology library UI The native library detail starts the install job, polls it every second, shows slices and definitions applied, offers cancel, and resumes by starting a new job on retry. Adds generated types and translated strings for all locales. * Guard the importer tests in the library install amendment * Order library install slices by their references, serialize starts, and install the real GS1 vocabulary in an IT A slice is validated alone, so a replacement, inverse, property chain or disjoint property that names a definition in a later slice failed the install. Slicing now orders concepts and properties so each follows what it names, keeps mutually referencing definitions in one slice, and breaks ties by IRI. Starting an install checks for an active job and inserts under a lock on the ontology row, so concurrent starts queue one job. A slice the database rolled back as a deadlock victim is applied again. The importer skips an asserted literal whose datatype OWL 2 does not support instead of emitting an axiom that applying refuses. * Pin the slice digest reference values to a clean build of the models The reference digests were recorded from an incremental build, where jsonschema2pojo regenerated OntologyConcept and OntologyChangeOperation without the defaults their referenced enum schemas declare (conceptType BOTH, provider user, state ACTIVE). A clean build, which CI runs, serializes those defaults, so the test failed there. * Let a native ontology hold 50,000 members, with batched capture, cached release reads and unlocked draft reads The FHIR R5 vocabulary plans 16,407 members and the FIBO quickstart 10,115, so the 10,000 member cap kept both out of one ontology. A release now holds up to 50,000 members and 256 MiB of payload; a member stays at 1 MiB. Capture inserts members in JDBI batches of 500 through the same sealedAt guard, so a release sealed meanwhile still fails the capture with 412. Working and release reads page 1,000 per query. OntologyReleaseReader keeps verified member lists of sealed releases in a Caffeine cache bounded to 128 MiB of payload and 10 minutes idle, keyed by release id and digest, and still authorizes every member on a hit. Read-only draft callers (working diff, validation, import preview, draft export, draft SPARQL, the install job's reconcile) read without the ontology_state FOR UPDATE lock, re-check the working and activation revisions by value at the end, start over on a torn read and fail with 412 after three. On MySQL the unlocked path skips the INSERT ... ON DUPLICATE KEY initializer for an existing row, which held an exclusive lock until the transaction ended. A whole-graph journal entry is bounded by GraphReplace.MAX_GRAPH_BYTES, 64 MiB, the Fuseki extension's default upload limit, while per-entity writes keep 16 MiB. An import preview lists at most 5,000 items, ALREADY_EXISTS ones first to go, and reports omittedItems. NativeOntologyCapacityPerfIT measures every whole-ontology path at a configurable size and shape, and installs the upstream FHIR and FIBO files when their paths are given. On MySQL at 10,000 FHIR-shaped members: install 76 s to 60 s, working diff 5.6 s to 0.7 s, concept create during a diff 7.2 s to 17 ms, import preview 6.1 s to 1.0 s, capture 10.3 s to 2.4 s, release diff 982 ms to 118 ms, draft SPARQL 1.1 s to 0.26 s. At 35,000: install 223 s in 35 slices, capture 11.9 s, projection 58.4 MB of RDF-Thrift. * Open ontologies of up to 50,000 definitions in Studio and say when a preview leaves items unlisted useOntologyStudioModel allowed ten pages of 1,000 per kind, the server's old release cap, and threw past that. It now mirrors the 50,000 member cap. The native import panel shows how many already-existing definitions the server left out of a preview listing. * Record the measured capacity limits in the ontology decision records Amends the release, Fuseki, Studio and import records with the limits this change sets and the numbers that justify them, notes the Fuseki upload bound in the production setup guide, fixes the stale copy in the design plan, and registers the new tests in the Java impact map. * Show the unlisted-definitions note when a preview lists no items, and pass it through the pack review A preview whose every definition already exists lists no items, so the import panel and the pack review dropped the server's omittedItems count along with the empty list. Render the review whenever items are listed or some were omitted, and hide the 'found' line when there is nothing to count. * Add superProperties to native ontology properties OntologyProperty gains superProperties, the set of rdfs:subPropertyOf links to named properties. The reference index gets a SUPER_PROPERTY role, profile validation a SUBPROPERTY_CYCLE code, and the import report an UNDECLARED_REFERENCE skip reason for links the importer drops. The om:superProperties predicate is declared in the RDF vocabulary, and the TypeScript types are regenerated from the schemas. * Let native ontology properties specialize other properties A property names its superproperties in superProperties (ADR:2026-11-07-ontology-property-hierarchies-are-superproperty-fields). Each must be a declared property of the same kind or a vocabulary property of that kind, never the property itself, and the links cannot form a cycle. Profile validation applies the OWL 2 DL simplicity rule through the hierarchy, so a composite property makes every property above it non-simple, and checks chain regularity against it. The write closure loads ancestors and subproperties, the reference index and release diff read the field, the RDF export writes rdfs:subPropertyOf, the CSV format gains a 28th column, and a library install orders a subproperty after its superproperties. RDF import keeps rdfs:subPropertyOf between declared properties of the same kind. Each refusal pass drops links to undeclared properties (UNDECLARED_REFERENCE), to properties of another kind and the links on a cycle (UNSUPPORTED_STRUCTURE), and keeps the property. Measured as links in the planned import, FIBO keeps 787 of 799, schema.org 210 of 212 and FHIR R5 none of 274, which all name the external W5 vocabulary. GS1 keeps 1 of 92, because import already refuses its 61 link-type properties for their xsd:anyURI range and 30 links name schema.org. * Pick superproperties in the Studio property editor The property editor offers a superproperty picker that lists the ontology's properties of the same kind, never the property itself, and sends the picked IRIs as superProperties. The import report names the new UNDECLARED_REFERENCE skip reason, every locale translates the two new labels, and the Playwright CSV fixtures use the 28-column header. * test: stabilize dashboard usage fixtures across midnight (cherry picked from commit 019e606) * Fixes #37356: Ship verbatim pinned upstream ontologies as library packs (#37364) * Install ontology library packs as a resumable background job Adds the ONTOLOGY_PACK_INSTALL job: it parses the verified bundled modules once, reconciles once, orders concepts, properties then axioms, and applies change sets of at most 1,000 members through the regular change-set path. Each slice carries a plan digest that replaces the per-apply full re-parse. Adds install, status and cancel endpoints, parseTrusted for checksum-verified bundled content, and named write-closure limits. * Start the library install as a job in the ontology library UI The native library detail starts the install job, polls it every second, shows slices and definitions applied, offers cancel, and resumes by starting a new job on retry. Adds generated types and translated strings for all locales. * Guard the importer tests in the library install amendment (cherry picked from commit b095fd8) * Fixes #37367: Serve large ontology releases from Fuseki in staged chunks, journaled by release (#37368) * Install ontology library packs as a resumable background job Adds the ONTOLOGY_PACK_INSTALL job: it parses the verified bundled modules once, reconciles once, orders concepts, properties then axioms, and applies change sets of at most 1,000 members through the regular change-set path. Each slice carries a plan digest that replaces the per-apply full re-parse. Adds install, status and cancel endpoints, parseTrusted for checksum-verified bundled content, and named write-closure limits. * Start the library install as a job in the ontology library UI The native library detail starts the install job, polls it every second, shows slices and definitions applied, offers cancel, and resumes by starting a new job on retry. Adds generated types and translated strings for all locales. * Guard the importer tests in the library install amendment * Order library install slices by their references, serialize starts, and install the real GS1 vocabulary in an IT A slice is validated alone, so a replacement, inverse, property chain or disjoint property that names a definition in a later slice failed the install. Slicing now orders concepts and properties so each follows what it names, keeps mutually referencing definitions in one slice, and breaks ties by IRI. Starting an install checks for an active job and inserts under a lock on the ontology row, so concurrent starts queue one job. A slice the database rolled back as a deadlock victim is applied again. The importer skips an asserted literal whose datatype OWL 2 does not support instead of emitting an axiom that applying refuses. * Pin the slice digest reference values to a clean build of the models The reference digests were recorded from an incremental build, where jsonschema2pojo regenerated OntologyConcept and OntologyChangeOperation without the defaults their referenced enum schemas declare (conceptType BOTH, provider user, state ACTIVE). A clean build, which CI runs, serializes those defaults, so the test failed there. * Let a native ontology hold 50,000 members, with batched capture, cached release reads and unlocked draft reads The FHIR R5 vocabulary plans 16,407 members and the FIBO quickstart 10,115, so the 10,000 member cap kept both out of one ontology. A release now holds up to 50,000 members and 256 MiB of payload; a member stays at 1 MiB. Capture inserts members in JDBI batches of 500 through the same sealedAt guard, so a release sealed meanwhile still fails the capture with 412. Working and release reads page 1,000 per query. OntologyReleaseReader keeps verified member lists of sealed releases in a Caffeine cache bounded to 128 MiB of payload and 10 minutes idle, keyed by release id and digest, and still authorizes every member on a hit. Read-only draft callers (working diff, validation, import preview, draft export, draft SPARQL, the install job's reconcile) read without the ontology_state FOR UPDATE lock, re-check the working and activation revisions by value at the end, start over on a torn read and fail with 412 after three. On MySQL the unlocked path skips the INSERT ... ON DUPLICATE KEY initializer for an existing row, which held an exclusive lock until the transaction ended. A whole-graph journal entry is bounded by GraphReplace.MAX_GRAPH_BYTES, 64 MiB, the Fuseki extension's default upload limit, while per-entity writes keep 16 MiB. An import preview lists at most 5,000 items, ALREADY_EXISTS ones first to go, and reports omittedItems. NativeOntologyCapacityPerfIT measures every whole-ontology path at a configurable size and shape, and installs the upstream FHIR and FIBO files when their paths are given. On MySQL at 10,000 FHIR-shaped members: install 76 s to 60 s, working diff 5.6 s to 0.7 s, concept create during a diff 7.2 s to 17 ms, import preview 6.1 s to 1.0 s, capture 10.3 s to 2.4 s, release diff 982 ms to 118 ms, draft SPARQL 1.1 s to 0.26 s. At 35,000: install 223 s in 35 slices, capture 11.9 s, projection 58.4 MB of RDF-Thrift. * Open ontologies of up to 50,000 definitions in Studio and say when a preview leaves items unlisted useOntologyStudioModel allowed ten pages of 1,000 per kind, the server's old release cap, and threw past that. It now mirrors the 50,000 member cap. The native import panel shows how many already-existing definitions the server left out of a preview listing. * Record the measured capacity limits in the ontology decision records Amends the release, Fuseki, Studio and import records with the limits this change sets and the numbers that justify them, notes the Fuseki upload bound in the production setup guide, fixes the stale copy in the design plan, and registers the new tests in the Java impact map. * Show the unlisted-definitions note when a preview lists no items, and pass it through the pack review A preview whose every definition already exists lists no items, so the import panel and the pack review dropped the server's omittedItems count along with the empty list. Render the review whenever items are listed or some were omitted, and hide the 'found' line when there is nothing to count. * Add superProperties to native ontology properties OntologyProperty gains superProperties, the set of rdfs:subPropertyOf links to named properties. The reference index gets a SUPER_PROPERTY role, profile validation a SUBPROPERTY_CYCLE code, and the import report an UNDECLARED_REFERENCE skip reason for links the importer drops. The om:superProperties predicate is declared in the RDF vocabulary, and the TypeScript types are regenerated from the schemas. * Let native ontology properties specialize other properties A property names its superproperties in superProperties (ADR:2026-11-07-ontology-property-hierarchies-are-superproperty-fields). Each must be a declared property of the same kind or a vocabulary property of that kind, never the property itself, and the links cannot form a cycle. Profile validation applies the OWL 2 DL simplicity rule through the hierarchy, so a composite property makes every property above it non-simple, and checks chain regularity against it. The write closure loads ancestors and subproperties, the reference index and release diff read the field, the RDF export writes rdfs:subPropertyOf, the CSV format gains a 28th column, and a library install orders a subproperty after its superproperties. RDF import keeps rdfs:subPropertyOf between declared properties of the same kind. Each refusal pass drops links to undeclared properties (UNDECLARED_REFERENCE), to properties of another kind and the links on a cycle (UNSUPPORTED_STRUCTURE), and keeps the property. Measured as links in the planned import, FIBO keeps 787 of 799, schema.org 210 of 212 and FHIR R5 none of 274, which all name the external W5 vocabulary. GS1 keeps 1 of 92, because import already refuses its 61 link-type properties for their xsd:anyURI range and 30 links name schema.org. * Pick superproperties in the Studio property editor The property editor offers a superproperty picker that lists the ontology's properties of the same kind, never the property itself, and sends the picked IRIs as superProperties. The import report names the new UNDECLARED_REFERENCE skip reason, every locale translates the two new labels, and the Playwright CSV fixtures use the 28-column header. * Leave statement sources out of the served ontology graph The release projection added an owl:Axiom node per asserted statement, naming the release member that states it. Nothing reads those nodes from Fuseki; only the importer reads them, from export files. They were 81% of the FIBO quickstart projection and 76% of FHIR R5, and 87% of English ESCO with its links. The active graph now projects with StatementSources.OMITTED. Exports, release and draft queries and validation keep the sources, so a native export still re-imports without changes. FIBO projects to 5.0 MB of RDF-Thrift instead of 21.7 MB, FHIR R5 to 6.2 MB instead of 27.9 MB. Records the change as v4 of the Fuseki active-release decision. * Replace the active ontology graph in staged chunks and journal it by release An activated release no longer reaches Fuseki as one Graph Store PUT capped at the 64 MiB upload limit. ChunkedGraphReplace cuts the graph into chunks of at most rdfConfiguration.graphReplaceChunkBytes (16 MiB by default), keeping each blank-node structure in one request. It stages them in per-graph staging graphs and moves them into place with one SPARQL update, so readers see the old release or the new one. A crash before the update leaves the live graph unchanged. The next attempt drops the stale staging graphs, and resending a committed update changes nothing. A graph that fits one chunk is still a single PUT. The rebuild journal records the graph and the release id instead of base64 RDF-Thrift, and replay projects the sealed release again from SQL. Activation checks a 256 MiB active-graph bound. ADR:2026-10-15-fuseki-holds-only-the-active-ontology-release v5 records the design and the timings on FIBO, FHIR and ESCO. * Skip descriptions that are resources or markup instead of failing the import A skos:definition or rdfs:comment whose value is an IRI, a blank node, or an rdf:HTML or rdf:XMLLiteral literal stopped the whole preview with "Expected a plain RDF literal". RdfSourceNormalizer now skips such a value as UNSUPPORTED_STRUCTURE, together with the blank-node structure under it. The concept still imports with its other description. English ESCO's 13 esco:NodeLiteral definitions now import this way instead of aborting the import. ADR:2026-10-19-native-ontology-imports-use-working-drafts v13. * Copy staged chunks into the served graph with INSERT WHERE A chunked replace could serve fewer triples than it staged. FIBO with statement sources, replaced in 1 MiB chunks over its previous release, served 157,898 of 157,928 triples: six owl:Axiom nodes of the last chunk were missing from the served graph and, after the swap dropped their staging graph, from the dataset. Jena 6.2 runs MOVE and ADD as GraphOps.addAll(dest, src.find()), which iterates the source while inserting into the same TDB2 quad indexes in one write transaction. Depending on the index layout that iteration skips triples. Reordering the DROPs does not help; an embedded TDB2 replay of the swap lost triples in 20 of 21 trials, and with the DROPs last in 17 of 21. INSERT WHERE collects its solutions before it writes and lost none in 32 trials. The swap now adds each staging graph to itself, which fails when that graph is missing and so aborts the request, drops the served graph, copies every staged triple with one INSERT WHERE and drops the staging graphs. Fuseki accepts one WHERE-bearing operation per request under arq:updateTimeout, so the copy is a single operation over a VALUES list. Each attempt stages into graphs under a fresh id, so a newer attempt that drops a stale attempt's chunks makes that attempt's swap fail instead of copying a mix. Resending a committed swap is refused the same way and leaves the served graph as committed. ChunkedGraphReplaceTest now runs on TDB2, the store Fuseki serves, and reproduces the loss with fixed blank node labels: 4,435 of 5,000 triples before this change. * Record the INSERT WHERE swap and the union reads of staging graphs in ADR v5 Amendment v5 now describes per-attempt staging names, the swap that asserts each chunk exists before it drops the served graph and copies the chunks with one INSERT WHERE, and why MOVE and ADD were dropped, with the FIBO loss and the embedded TDB2 replay counts. It corrects two claims. Fuseki keeps RDF-Thrift blank node labels across requests, so chunks keep blank-node structures whole to stay well-formed, not for identity. Resending a committed swap is refused rather than changing nothing. It adds the Fuseki heap the copy needs, measured on the pinned image, and lists the reads of the union default graph that can see staged triples, when, and why inference conclusions drawn from them do not outlive a successful replacement. The production setup guide carries the heap requirement and the new update time. * test: align library activation check with active graph limits * test: synchronize metrics thread startup under coverage (cherry picked from commit 6199b6b) * Record the install slice deadlock retry in the native ontology import ADR (v14) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>



Describe your changes:
Fixes #37353
A library pack now installs through the
ONTOLOGY_PACK_INSTALLbackground job instead of one request. The job parses the verified bundled modules once, reconciles once, orders concepts, then properties, then axioms, and applies change sets of at most 1,000 definitions through the regular change-set path. It reports progress, can be cancelled after the current slice, and resumes from what already landed when it is started again. The Ontology Library UI starts the job, polls it every second, shows slices and definitions applied, and offers cancel.Part 2 of 6 of the Ontology Library work. Merge from the bottom; this PR targets the PR below it, and its diff shows only its own changes.
Type of change:
High-level design:
OntologyResource:POST /v1/ontologies/{id}/library/{packId}/install(202 with the job; requiresEDIT_ALLon the ontology and create on concepts, properties and axioms),GET /v1/ontologies/{id}/library/jobs/{jobId}, andPUT /v1/ontologies/{id}/library/jobs/{jobId}/cancel(EDIT_ALL).OntologyPackInstallJobManagerenqueues the job.JobDAO.enqueueOntologyPackInstalllocks the ontology row, returns an active job when one exists, and inserts otherwise, so two concurrent starts queue one job. The stale-job reaper (markStaleRunningJobsFailed) includes the new type.OntologyPackSlicePlanorders concepts and properties so each slice follows what it names (replacement, inverse, property chain, disjoint property), keeps mutually referencing definitions in one slice, and breaks ties by IRI. Each slice carries a digest, and the plan digest replaces the per-apply full re-parse.SafeRdfModelParser.parseTrustedreads checksum-verified bundled content.OntologyPackInstallJobHandlerapplies each slice in one transaction throughOntologyPackSliceApplier. A slice the database rolled back as a deadlock or serialization victim (SQLState40xxx) is applied again, at most 3 attempts.OntologyWriteClosureLimitsnames the write-closure limits that were inline constants.installNativeOntologyPack,ontologyPackInstallJob,ontologyPackInstallJobArguments,ontologyPackInstallPlan;backgroundJob.jobTypegainsONTOLOGY_PACK_INSTALL.OntologyPackSlicePlanTest. They had been recorded from an incremental build, where jsonschema2pojo omits the enum defaultsconceptType,providerandstate; a clean build, which CI runs, serializes them.Collate counterpart needed before Collate picks this up.
openmetadata-collatekeeps its owncollate-service/src/main/resources/json/schema/jobs/backgroundJob.json, whosejobTypeenum does not listONTOLOGY_PACK_INSTALL. REVIEW.md notes that a job type missing from that copy breaks the background-job poller in Collate. No Collate PR is open for it yet.Decision record: ADR:2026-10-19-native-ontology-imports-use-working-drafts, amendment v10 (library installation is a resumable background job).
Tests:
CI follow-up (2026-11-08)
Merged the verified pipeline-secrets fix from the preceding PR #37360. The three red Java checks all came from
SecretMapEntriesExternalStoreTest.clearingDbtHeadersDeletesTheirSecretsButKeepsUserReferences. On this PR's resulting head,mvn -nsu -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=SecretMapEntriesExternalStoreTest -Dsurefire.failIfNoSpecifiedTests=falsepassed 18 tests with no failures, errors, or skips. The secrets production and test files are identical to #37360's already verified fix, which passed 68 unit and 32 MySQL/Elasticsearch API tests. The impact-map check also passed.The Collate check failed before dispatch because its expected branch did not exist. Created
open-metadata/openmetadata-collate:harshach/ontology-library/1-real-world-rdf-importat companion PR #8405's commit9f4ab00fb65be493b0c98b4cbce7827e27d78769, so CI builds the intended schema pair. No workflow files were changed. Added the explicit GitHub closing reference to issue #37353; Shipping fields still require project write access and the release/priority values.Use cases covered
Unit tests
OntologyPackSlicePlanTest(new),OntologyPackModelsTest(new),OntologyPackInstallationsTest,OntologyChangeApplicationServiceTest,SafeRdfModelParserTest; JestOntologyLibrary.native.test.tsx.OntologyPackInstallJobHandler,OntologyPackInstallJobManager,OntologyPackSliceApplier,OntologyWriteClosureLimitsandOntologyResourcehave no class-named unit test; the job, its endpoints and resume are exercised byNativeOntologyPackInstallJobIT.Backend integration tests
NativeOntologyPackInstallJobIT(new).This PR's focused checks: unit
JobDAOTest,NativeOntologyRdfImporterTest,OntologyChangeApplicationServiceTest,OntologyPackCatalogTest,OntologyPackInstallationsTest,OntologyPackModelsTest,OntologyPackSlicePlanTest,OntologyResourceAccessTest,SafeRdfModelParserTest; ITNativeOntologyPackInstallJobIT. All passed in the runs below, exceptOpenMetadataApplicationTest(selected becauseOpenMetadataApplicationregisters the job handler), which was not run. Also on this branch's own head (526f38595f7, clean build):OntologyPackSlicePlanTest, OntologyPackInstallationsTest, OntologyPackModelsTest, OntologyChangeApplicationServiceTest, JobDAOTest, SafeRdfModelParserTestTests run: 70, Failures: 0, Errors: 0, Skipped: 0.Run by hand on the top of the stack (PR 5 at
78c3b7308a6, rebased onmainat3aaedcaaf87), which contains this PR's changes; Java 21, MySQL + Elasticsearch, clean build of the reactor (mvn clean install -DskipTests -pl openmetadata-integration-tests -am, BUILD SUCCESS). Not generated bymake java_affected_run.openmetadata-service, every test underontology/,rdf/,resources/ontology/,jdbi3/Ontology*,jdbi3/JobDAOTest,jobs/):Tests run: 2483, Failures: 0, Errors: 0, Skipped: 0.-Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test='Independent*Ontology*IT,NativeOntology*IT,OntologyPackResourceIT'):Tests run: 535, Failures: 1, Errors: 0, Skipped: 38. The one failure isNativeOntologyPartialImportIT.droppingTheRelationshipWithItsConceptOrKeepingEverythingApplies, a test this stack does not touch: it filtersontologyAxiomsbyontology, which the endpoint ignores (it takesontologyId), so it reads the first 50 axioms of the whole database and misses its own when parallel tests have written more. Rerun alone withIndependentOntologyReleaseIT:Tests run: 19, Failures: 0, Errors: 0, Skipped: 0. MySQL logged 36EntityRelationshipDAO.batchDeleteTodeadlocks during cleanup in that run; none failed a test (MySQL deadlocks between concurrent writes to different native ontologies (incomingInverses FOR UPDATE, batchDeleteTo) #37357).-DintegrationTests.lane=rdf -DrdfContainerImage=openmetadata/fuseki:6.2.0-318ff87,RdfRoundTripFidelityIT,RdfOntologyActivationIT,RdfBlueGreenRebuildIT,RdfLibraryPackActivationIT,RdfOntologyPropertyHierarchyIT):Tests run: 48, Failures: 0, Errors: 0, Skipped: 0.python3 .github/scripts/plan_local_java_tests.py --check-branch: the map is complete on this branch.mvn spotless:check: BUILD SUCCESS.make java_affectedselects the full IT suite for this stack); those run in the merge queue.src/components/governance/ontology src/components/OntologyExplorer src/hooks/governance/ontology:Test Suites: 141 passed, 141 total; Tests: 1596 passed, 1596 total.tsc --noEmit: no errors except the existingCustomPropertiesDetailPage.tsx(135,14)error onmain.yarn ui-checkstyle:changedandyarn ui-checkstyle:playwright:changedon every UI file the stack changes: exit 0, no diff.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
None beyond the automated tests above.
UI screen recording:
Not done. This PR changes Ontology Studio UI (the Ontology Library install flow, now a job with progress and cancel), so the pr-checklist recording item applies. No Docker build with sample data was run and no recording is attached; the matching checklist box below is left unchecked. The UI evidence is the Jest, type-check and UI checkstyle runs listed under Tests.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.backgroundJobjob type; nothing stored changes shape, so no migration.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Reviewed
526f38595f7against REVIEW.md as a pass over this PR's production diff (authorization on new or changed endpoints, transactions and retries, caches, job types, schema compatibility, and the test map). It was run by the agent that prepared the stack; no independent reviewer was available for this run. 🔴 answered, not fixed here:openmetadata-collate's ownbackgroundJob.jsonlacksONTOLOGY_PACK_INSTALL(see High-level design); the fix is a Collate PR. 🔴 fixed: the slice digest reference values only matched an incremental build (last commit).docs/decisions/(see itsREADME.md). This description is gone fromgit logafter the squash-merge. Amends ADR:2026-10-19-native-ontology-imports-use-working-drafts (v10).