Skip to content

Fix five update methods that sent no request body (ISSUE-152) - #471

Merged
dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:fix/issue-152-update-body-slot
Oct 21, 2026
Merged

dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:fix/issue-152-update-body-slot

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Fixes ISSUE-152 in PYEGERIA_ISSUES.md: five update methods sent no request body.

_async_update_element_body_request(url, prop=None, body=None) takes the body as its third parameter. These callers passed it positionally as the second, so it landed in prop, body was None, and every call failed before sending anything ("'NoneType' object has no attribute 'model_dump_json'"):

  • DataDiscovery.update_annotation
  • TimeKeeper.update_context_event
  • SchemaMaker.update_schema_type and update_schema_attribute
  • SubjectArea.update_subject_area

Each now passes body=body. The ISSUE-152 entry is updated to say so.

Testing

  • tests/micro-tests/test_issue_152_update_body_slot.py sends a dict body and an UpdateElementRequestBody through each method, and checks that the body reaches the HTTP layer with the right URL. All 10 cases fail on the old lines and pass with the fix.
  • The full micro-test suite (1,404 tests) passes in a clean python:3.13-slim container with no Egeria.
  • Not live-tested. Resource Explorer and the TestGen evaluation both hit update_annotation and carry workarounds until a release includes this.

🤖 Generated with Claude Code

DataDiscovery.update_annotation, TimeKeeper.update_context_event,
SchemaMaker.update_schema_type / update_schema_attribute and
SubjectArea.update_subject_area passed the body positionally to
_async_update_element_body_request(url, prop=None, body=None), so it
landed in `prop` and the call failed before sending anything
("'NoneType' object has no attribute 'model_dump_json'"). They now pass
body=body.

Micro-tests: tests/micro-tests/test_issue_152_update_body_slot.py (a
dict and a model body through each method; all 10 fail on the old
lines). 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 f78acd3 into odpi:main Oct 21, 2026
5 checks passed
dwolfson added a commit to dwolfson/egeria-python that referenced this pull request Oct 21, 2026
Ships the ISSUE-152 fix from odpi#471: five update methods
(update_annotation, update_context_event, update_schema_type,
update_schema_attribute, update_subject_area) now send their body.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dwolfson added a commit that referenced this pull request Oct 21, 2026
Ships the ISSUE-152 fix from #471: five update methods
(update_annotation, update_context_event, update_schema_type,
update_schema_attribute, update_subject_area) now send their body.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@dwolfson
dwolfson deleted the fix/issue-152-update-body-slot branch October 21, 2026 02:13
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