Alignment of types and their docs - #9234
Merged
Merged
Conversation
Signed-off-by: Mandy Chessell <mandy.e.chessell@gmail.com>
mandy-chessell
enabled auto-merge
August 21, 2026 22:50
| * that fail: a type that cannot be created through the connector context, and is not listed here, is | ||
| * a finding this suite exists to report. | ||
| */ | ||
| private static final Map<String, String> UNINSTANTIABLE_TYPES = new LinkedHashMap<>(); |
| * Empty today - kept so that a genuine exclusion has an obvious, documented home rather than being | ||
| * hidden inside a test. | ||
| */ | ||
| private static final Map<String, String> UNLINKABLE_RELATIONSHIPS = new LinkedHashMap<>(); |
| @Bean | ||
| public SecurityFilterChain typeFvtSecurityFilterChain(HttpSecurity http) throws Exception | ||
| { | ||
| http.csrf(csrf -> csrf.disable()) |
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.
Align the open metadata types with their documentation, and add type-fvt
Working through the UML models in
egeria-docs/site/docs/typespage by page and comparing them againstthe types this repo actually builds turned up a long tail of drift: attributes the beans read and wrote
but no type declared, attributes whose data type disagreed with the bean, relationship ends named
differently in the type system than in the API, and types drawn and documented but never implemented.
This PR fixes what it found, implements the types that were missing, and adds an FVT suite so the whole
model stays honest from now on. A companion PR in
egeria-docscarries the diagram and markdown side.Properties that existed everywhere except the type system
Each of these was readable and writable through the bean, builder and converter, and drawn on the
diagram, but no type declared it - so the value was silently dropped on the way to the repository.
embeddedMetadataadded toDocumentStoreandMediaCollection.MediaFile, the third type usingit, already declared it.
securityRolesadded to theSecurityListMembershipclassification, which previously wrotesecurityGroupsonly.TypeEmbeddedAttribute's three missing attributes.NetworkGatewayLinkrebuilt: it now extendsRelationshipBeanPropertiesand declaresdisplayName,description,externalEndpointAddressesandinternalEndpointAddresses. Its branch inOpenMetadataRelationshipBuilderwas nested inside aninstanceof LabeledRelationshipPropertiescheckthat could no longer be true, so it produced no properties at all -
OpenMetadataTypeTestcaught that.Attribute types corrected
OpenMetadataPropertyis the single definition, so these were fixed at source and the archiveregenerated rather than patched (a
TypeDefPatchcannot change an attribute's type - the repositoryrejects it with
INCOMPATIBLE_PROPERTY_PATCH).externalEndpointAddresses/internalEndpointAddresses- string toarray<string>size- int to long;securedProperties- tomap<string,string>;securityProperties- tomap<string,object>CodeAnalysisAnnotationcounters - int to longtimezonerenamed totimeZoneonPersonandFixedLocation, matching the beans and diagrams. Theold spelling stays as a
RENAMED_ATTRIBUTEpointing at the new one so existing instances follow thevalue across the change.
Two attributes were removed rather than kept:
SecurityRole.distinguishedName, which duplicates thedeclaration it inherits from
SecurityList(its siblingSecurityGroupnever had one), andTopic.topicName.Relationship end names
Three sources name the ends of a relationship - the
endDefattribute names, the field names inAttributedMetadataElement, and the labels on the diagrams - and they had drifted apart. The API fieldnames are what users see in the JSON, so they win, except where one field serves several relationships,
where the diagram decides.
102
endDefnames were renamed on that basis. Of the 149 relationships that have a field inAttributedMetadataElement, 261 of their 282 ends now carry the API field name exactly; the 21exceptions are the shared fields (
parentSchemaElementsalone serves seven relationships).Two constraints are worth recording, both enforced by
OMRSArchiveBuilderand both fatal at build timerather than merely untidy:
Regulationhas its ownregulatorsattribute, soRegulator.endDef2staysassignedRegulatorsand the diagram changedinstead.
Note that the builder registers each end name in the other end's namespace, so a collision is reported
against a type that does not appear in the name at all.
New types
0280 / 0281 / 0282 - software development assets (8 types, previously drawn but not built):
GeneratedTargetandReusableTechniqueclassifications and theReusableTechniqueUserelationship;SoftwareComponentunderCollectionandSoftwareModuleunder that;RunnableSoftwareComponentunderAsset, withDependentSoftwareComponentandSoftwareSource. Four new properties (buildId,buildTool,buildToolVersion,runtimeEnvironmentType), eight beans in a newsoftwaredevelopmentpackage, and builder/converter branches for the two types carrying attributes.
The relationships and classifications are exposed through the devops-pipeline OMVS - a new
SoftwareDevelopmentHandlerplus ten REST endpoints and.httpsamples. The three entities need no newAPI, being
CollectionandAssetsubtypes that collection-manager and asset-maker already serve.RunnableSoftwareComponentwas drawn with aversion : stringattribute, which is not implemented:versionis the instance header's own property and is alongthere, so a string attribute of the samename collides in the API JSON, and
Referenceablealready declaresversionIdentifier, which the typeinherits. No type in the model declares
version. The diagram was corrected instead.0462 - governance action process specialisations (5 types):
AnalyticalActionProcess,CataloguingActionProcess,ExploringActionProcess,SurveyingActionProcessandProvisioningActionProcess, all extendingGovernanceActionProcess. These are now used in place of thegeneric type by the content pack writers, the Coco samples, the Unity Catalog pack, the Jacquard and
subscription connectors, and
createProcessFromGovernanceActionType, which gains aprocessTypeparameter.
Nine stale page links
OpenMetadataWikiPageshad three constants pointing at pages that no longer exist(
MODEL_0013_ACTIONS,MODEL_0451_NOTIFICATIONS,MODEL_0457_CONNECTOR_ACTIVITY_REPORTS), plusMODEL_0145_PERSPECTIVES; a newMODEL_0111_CONTACT_DETAILSwas added, and nine types were repointed atthe page they are actually drawn on. Fixing the three broken constants brought previously unreachable
pages into the comparison.
New:
type-fvtA functional verification suite for the type system itself. Where
query-fvtasks "does the querysurface behave correctly?", this asks "is every type in the model actually usable?" For every entity,
classification and relationship type it creates an instance with every declared attribute populated,
reads it back through the connector context, checks each property survived, updates it, and removes it.
634 test cases, one per type, so a failure names the type rather than just "something is broken":
342 entity types, 200 relationships, 86 classifications, plus 6 whole-model checks. About two minutes
against a local PostgreSQL server.
Nothing is hand-listed. The type list is read from the running server - not the archive file, because a
type's real shape is
newTypeDefsmerged with every latertypeDefPatchand the server has already donethat merging. A type added to the model becomes a test case on the next run with no edit to the
suite, which is how the five 0462 types and the eight software-development types were verified.
The whole-model checks are the ones that catch a model that compiles and loads but is quietly wrong:
every supertype resolves; every relationship end and classification target resolves; no two types share a
GUID; name and GUID lookups agree; and every
OpenMetadataTypeconstant names a type the server has,with the same GUID - the check that keeps the Java view and the archive from drifting apart.
It shares
query-fvt's shape (in-process platform, no Kafka, PostgreSQL repository, permit-all chain) onport 9447 and its own schema, so the two can run side by side, and it is opt-in - skipped by a normal
build.
Two platform behaviours it flushed out, both correct, both worth knowing: a purged element is reported
as an unknown GUID, not an empty result, so a "check it is gone" step must expect a 404; and
Mementohides its element from ordinary calls, including the lookup a detach performs first, soforLineageis needed on the write options as well as the reads.Testing
OpenMetadataTypeTestpasses - run after every archive and bean change.type-fvt: 634 cases, 0 failures.devops-pipelinebuilds; javadoc clean.