Skip to content

Fix catalog-target request bodies (ISSUE-156) and Service Level Objective map fields (ISSUE-157) - #464

Merged
dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:fix/issue-156-157-catalog-target-slo
Oct 19, 2026
Merged

dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:fix/issue-156-157-catalog-target-slo

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Fixes two pyegeria 6.2.5 defects reported by the Egeria team (PYEGERIA_ISSUES.md ISSUE-156 and ISSUE-157).

ISSUE-156: catalog-target request bodies

AutomatedCuration.add_catalog_target and update_catalog_target posted a flat body with "class": "CatalogTargetRequestBody". Egeria has no such class, so the platform refused both calls. AssetMakerResource.addCatalogTarget takes NewRelationshipRequestBody, and updateCatalogTarget takes UpdateRelationshipRequestBody; both expect CatalogTargetProperties.

  • Both methods keep their signatures and now send the relationship request bodies through the shared _async_new_relationship_request / _async_update_relationship_request helpers.
  • template_properties now maps to Egeria's templates field; the old body named it templateProperties.
  • The hey_egeria add_catalog_target command calls this method, so it is fixed too.
  • AssetMaker.add_catalog_target already sent the right shape and is unchanged.

ISSUE-157: Dr.Egeria Create Service Level Objective

set_gov_prop_body defaulted entitlements, obligations and restrictions to [] for every governance definition. Egeria types them as Map<String, String> (TermsAndConditionsProperties and subtypes such as ServiceLevelObjectiveProperties), so Create Service Level Objective got a 400 MismatchedInputException on entitlements. The defaults are now None. Other governance types never had these fields and ignored them.

Testing

  • New micro-tests in tests/micro-tests/test_issue_156_157_catalog_target_slo.py check the request bodies and the SLO property defaults. The full micro-test suite (1,394 tests) passes in a clean python:3.13-slim container with no Egeria.
  • Live, on a quickstart built from Egeria main 05a5e982, using throwaway elements that were deleted and verified gone afterwards:
    • ISSUE-156: the old flat body was refused. The fixed add returned a relationship GUID and read back correctly, the update read back the changed name and sync direction, and remove made the relationship unreadable. The test used an IntegrationConnector element that is not in any integration group, so no connector ran.
    • ISSUE-157: the old code got the 400 above and created nothing. The fixed code created the SLO with implementationDescription intact.

🤖 Generated with Claude Code

…SUE-157)

ISSUE-156: AutomatedCuration.add_catalog_target and update_catalog_target
posted a flat "CatalogTargetRequestBody", a class Egeria does not have,
so the platform refused them. They now send NewRelationshipRequestBody /
UpdateRelationshipRequestBody with CatalogTargetProperties (matching
AssetMakerResource), keeping the existing signatures. template_properties
maps to Egeria's "templates" field, which the old body also misnamed.

ISSUE-157: set_gov_prop_body defaulted entitlements, obligations and
restrictions to [], but Egeria types them as Map<String, String>
(TermsAndConditionsProperties and subtypes such as
ServiceLevelObjectiveProperties), so Create Service Level Objective was
refused. They now default to None.

Micro-tests: tests/micro-tests/test_issue_156_157_catalog_target_slo.py;
full micro-test suite passes in a clean python:3.13-slim container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 6862ddd into odpi:main Oct 19, 2026
5 checks passed
dwolfson added a commit that referenced this pull request Oct 19, 2026
Ships the ISSUE-156 (AutomatedCuration add/update_catalog_target request
bodies) and ISSUE-157 (Dr.Egeria Create Service Level Objective map
fields) fixes from #464. BACKLOG.md: the delete re-tests ran on Egeria
main 05a5e982; only ISSUE-146's remove_note re-test is still open.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant