Skip to content

fix(tests): stale shop_for_data assertion; chore(release): bump version to 6.1.12 - #351

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:fix/shop-for-data-test-6.1.12
Sep 8, 2026
Merged

fix(tests): stale shop_for_data assertion; chore(release): bump version to 6.1.12#351
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:fix/shop-for-data-test-6.1.12

Conversation

@dwolfson

@dwolfson dwolfson commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes test_handle_shop_for_data_option_success, which asserted the
    Digital-Product-Catalog-MyE search call's params as
    {"search_string": "*"} only. PR My_Egeria pull request #346 added a
    metadata_element_subtypes: ["DigitalProduct", "DigitalProductFamily"]
    filter to that call; the test was never updated to match, so it failed
    deterministically (not flaky) on every run since. This is what blocked the
    v6.1.11 tag's release workflow at the unit-test step, before it ever
    reached the PyPI publish job — see run 34252940497.
  • Bumps version to 6.1.12. PyPI already had a 6.1.11 published at
    2026-09-08T02:15 UTC — ~14.5h before this repo's own v6.1.11 tag/PR
    (feat(pyegeria,dr-egeria): add Data Standards types (Egeria PR #9300) #349/chore(release): bump version to 6.1.11 #350) merged, with different (older) content. That's a pre-existing
    version collision unrelated to this fix; 6.1.12 is the first clean,
    unused version number.

Test plan

  • pytest tests/micro-tests/my_profile/test_shop_for_data_handler.py passes
  • Full pytest tests/micro-tests/ passes (0 failures)

🤖 Generated with Claude Code

dwolfson and others added 2 commits September 8, 2026 11:55
…s omitted

`MetadataExpert.declassify_metadata_element(guid, classification_name, body=None)`
declares `body` as Optional but calls `.model_dump()` on it unconditionally, so
omitting it raises `AttributeError: 'NoneType' object has no attribute
'model_dump'` and the classification is left in place.

Worse than an ordinary signature bug because the failure is silent at the
caller. A caller that wraps the call defensively — reasonable, since removing a
classification that is already absent should not be fatal — swallows the
AttributeError and believes the removal happened. Measured live: kinds before
['Task'], declassify raises, kinds after ['Task'].

In our case the element then carried TWO kind classifications at once
(['Task', 'PersonalProject']) and a check that only asked "is the new
classification present?" reported success. The wrong-but-plausible state was
invisible until the element was read back for BOTH names.

Workaround verified: passing `{"class": "MetadataSourceRequestBody"}` explicitly
makes it work (kinds after: []). Candidate fix is to default the body when None,
matching the declaration.

`classify_metadata_element` and `reclassify_metadata_element` sit beside it with
the same Optional body declaration and are worth checking — we pass a body to
both so we have not hit them.

Logged, not fixed, per the standing rule for this repo.

Found in trellis/packages/resource-explorer's investigation reclassifier, which
now passes the body and additionally asserts the OLD classification is gone
rather than only that the new one arrived.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…e(release): bump version to 6.1.12

test_handle_shop_for_data_option_success asserted the Digital-Product-Catalog-MyE
search call's params as {"search_string": "*"} only. PR odpi#346 added a
metadata_element_subtypes: ["DigitalProduct", "DigitalProductFamily"] filter to
that call; the test was never updated to match, so it failed deterministically
(not flaky) on every run since -- this is what blocked the v6.1.11 release
workflow's PyPI publish step (build never ran; see release run 34252940497).

Also bumps to 6.1.12: PyPI already had a 6.1.11 published at 2026-09-08T02:15
UTC, ~14.5h before this repo's v6.1.11 tag/PR merged, with different (older)
content -- a pre-existing version collision unrelated to this fix. 6.1.12 is
the first clean, unused version number.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYNxABE3SRUT5cXbpmrfU2
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 931a0ab into odpi:main Sep 8, 2026
2 checks passed
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