Repository navigation
feat(metadata_expert): add/update/delete open metadata type definitions - #428
Merged
Merged
Conversation
Adds add_enum_def, add_type_def, update_type_def, delete_type_def and delete_enum_def (Egeria-api-metadata-expert.http, open-metadata-types and open-metadata-attribute-types/enum-defs). The scripts/omvs_audit.py check for metadata-expert now reports 0 missing. The OpenMetadataEnumDef / OpenMetadataTypeDef / OpenMetadataTypeDefPatch models declare only the documented fields and use extra='allow', so the rest of these deep Egeria beans (relationship ends, enum elements, ...) is passed through instead of being silently dropped by PyegeriaModel's extra='ignore'. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…d delete_enum_def Live verification (2026-10-05): add_enum_def and add_type_def return the new GUID and the read-back is intact; delete_type_def works. update_type_def is rejected by the server (updatedBy is never set on the patch -- Egeria bug, ISSUE-124) and delete_enum_def answers 500 'unknown TypeDef' (ISSUE-125), leaving the throwaway enum behind. Docstrings now say so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Re-tested live on the 2026-10-05 rebuilt platform: the stray enum survives the restart and delete_enum_def fails with the identical OMRS-CONTENT-MANAGER-500-001. Closes the 'retry after a restart' idea. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Re-tested live on the 2026-10-05 rebuilt platform: a patch to a throwaway entity type is rejected with the identical 'updatedBy set to null' error. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson
force-pushed
the
feat/metadata-expert-type-defs
branch
from
October 5, 2026 15:29
3eb7dd3 to
36e6454
Compare
…emoved (ISSUE-125) The warning belongs on the method a caller reaches first, not only on delete_enum_def. Also notes on add_type_def that only entity types have been verified live. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.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.
Summary
Adds the five open-metadata type-definition calls that the refreshed
Egeria-api-metadata-expert.httpdocuments andMetadataExpertlacked (the audit'smetadata-expertsection: 5 missing -> 0, 27 OK, 0 mismatched):add_enum_def/add_type_def(entity, relationship or classification) /update_type_def(a patch carrying only what changes) /delete_type_def/delete_enum_def.OpenMetadataEnumDef,OpenMetadataTypeDef,OpenMetadataTypeDefPatchdeclare only the documented fields and useextra='allow'. These mirror deep Egeria beans (relationship ends, enum elements,updateToVersion,typeDefStatus, ...); modelling every field by hand risked silently dropping some underPyegeriaModel's defaultextra='ignore'(the ISSUE-62 gotcha). A test pins that undeclared fields survive.typeDefName/enumDefNameas query parameters with no body, as the.httpshows.Live verification (2026-10-05, dev quickstart platform)
add_enum_defadd_type_defdelete_type_defupdate_type_defOMRS-REPOSITORY-400-069 ... mandatory field updatedBy set to null. Egeria'sgetTypeDefPatchconverter is never given the calling user (checked onorigin/main, 2026-10-01), and the patch bean has no field a client could use. Logged as ISSUE-124; docstring warns.delete_enum_defOMRS-CONTENT-MANAGER-500-001 unknown TypeDeffor an enumget_attribute_typesstill lists, even after the only type using it was deleted. Logged as ISSUE-125; docstring warns.Re-tested on the rebuilt platform (2026-10-05, image built 14:19Z from Egeria main
449ad06894,egeria-mainrestarted 14:39Z): both failures reproduce identically (update_type_defwith the sameupdatedByerror on a fresh throwaway type;delete_enum_defwith the sameunknown TypeDeferror, and the enum also survived the restart). So neither is a stale-build artefact, and Egeria's source at that commit still has both causes (the patch converter never setsupdatedBy; the GUID map is written in only one place).The calls match the documented API; the two failures are Egeria server bugs and are logged rather than worked around. A stray throwaway enum,
PyegeriaTmpCuisineType, is left on the shared dev platform (unused; a retry after the platform's next restart is worthwhile).Test plan
main(it conflicted with feat(product-manager): subscription types and ODCS/ODPS documents, with Dr.Egeria commands #427/fix(omvs): CollectionManager subclasses run the base constructor; delete cascade reaches the server (ISSUE-126, ISSUE-127) #429 inmodels.pyandmodels/__init__.py; both sides kept); full micro-suite passesscripts/omvs_audit.py --service metadata-expert: 0 missing, 0 mismatched; the existing endpoint-contract test still passesupdate_type_defanddelete_enum_defsuccess: blocked by the two server bugs (ISSUE-124, ISSUE-125)🤖 Generated with Claude Code