Repository navigation
Fix MyProfile actor/identity/role queries; make its functional tests strict - #415
Merged
Merged
Conversation
dwolfson
approved these changes
Oct 2, 2026
…strict pyegeria (ISSUE-116): - get_my_actors, get_my_user_identities and get_my_roles sent their rendering hint as metadataElementTypeName, which none of the endpoints' .http examples do. get_my_actors failed on every call (OMAG-REPOSITORY-HANDLER-404-001); get_my_user_identities and get_my_roles silently returned "No elements found" for every user. Pass filter_results_by_type=False, as for get_my_resources (ISSUE-115). The offline micro-test, renamed test_my_profile_no_type_filter.py, now covers all four endpoints. tests/functional-tests/test_my_profile.py: - Stop catching PyegeriaException and printing "failed as expected or due to env", which hid the defects above; assert non-empty results where every demo persona has data. - Replace three tests calling MyProfile methods that no longer exist (get_to_do, get_to_dos_by_type, update_to_do) and two tests using hard-coded GUIDs with self-contained to-do/action lifecycle tests (create_my_todo, get_asset_by_guid, update_asset, assigned/requested/ sponsored queries, delete_asset). - Fix the to-do teardown, which never deleted anything: its OpenMetadataDeleteRequestBody failed validation, so each run leaked a ToDo. Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
pcoldico
force-pushed
the
my-profile-strict-tests
branch
from
October 2, 2026 16:08
be7dc73 to
25c2a06
Compare
dwolfson
added a commit
to dwolfson/egeria-python
that referenced
this pull request
Oct 2, 2026
ISSUE-115 and ISSUE-116 were taken on main by odpi#415's My Profile entries while this PR was open. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson
added a commit
that referenced
this pull request
Oct 3, 2026
…ls partway without forLineage (#416) * docs(issues): ISSUE-115 -- cascade delete on the soft-delete path fails partway without forLineage Found cleaning up after the Automation family's live subscription test and reproduced the same day: a fresh asset cascade-deletes (purges) fine, but an asset Egeria soft-deletes (here, one used as a subscription destination) fails with OMAG-REPOSITORY-HANDLER-400-010 after already Memento'ing an anchored Endpoint. Workaround: forLineage=true on the delete. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> * docs(issues): renumber the cascade-delete entry to ISSUE-117 ISSUE-115 and ISSUE-116 were taken on main by #415's My Profile entries while this PR was open. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.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
pyegeria:
MyProfileactor, identity and role queries (ISSUE-116)Three more
MyProfilemethods had the same defect asget_my_resources(ISSUE-115, fixed in #413). Each sent its rendering hint to Egeria asmetadataElementTypeName, and none of the endpoints'.httpexamples send a type filter. Checked live for erinoverview, garygeeke and peterprofile:get_my_actorsOMAG-REPOSITORY-HANDLER-404-001get_my_user_identitiesget_my_rolesThe fix is
filter_results_by_type=Falseon all three. The offline micro-test from #413, renamed totest_my_profile_no_type_filter.py, now covers all four endpoints. The three new cases fail without the fix.tests/functional-tests/test_my_profile.py: tests no longer hide failuresAll 18 tests used to pass, but 7 did so only because errors were caught and printed ("failed as expected or due to env"). The rewrite:
PyegeriaExceptionis no longer caught, and results must be non-empty wherever every demo user has data. That's how the bugs above were found.MyProfile.get_to_do,get_to_dos_by_typeandupdate_to_do, which no longer exist. They raisedAttributeError, which was caught and printed. They're replaced by to-do lifecycle tests usingcreate_my_todo,get_asset_by_guid,update_assetanddelete_asset.OpenMetadataDeleteRequestBodyfailed pyegeria's request-body validation, so every run left a ToDo behind. To-dos are now deleted withdelete_asset; the to-do count is the same before and after a run.Noted, not changed:
AssetMaker.get_assigned_actions,get_actions_for_sponsorandget_actions_for_requesterdefault toactivity_status_list=["IN_PROGRESS"], so a newly created (REQUESTED) action isn't returned unless the caller passes the statuses. The tests pass them explicitly. Details are in ISSUE-116.Test plan
tests/functional-tests/test_my_profile.py: 18/18 pass against the Egeria quick start.test_my_profile_no_type_filter.py: 8/8 pass, offline and selected by CI's-m unit.pytest tests/micro-tests/ -m unitexits 0.🤖 Generated with Claude Code