Skip to content

fix(omvs): by-name wrappers accept a body-only call (ISSUE-135) - #445

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:fix/issue-135-by-name-body-only
Oct 11, 2026
Merged

dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:fix/issue-135-by-name-body-only

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Fixes ISSUE-135: 14 *_by_name wrappers required their first argument even though they accept body, so a body-only call raised TypeError. The Resource Explorer project reported it for get_actor_profiles_by_name.

Change

  • The first argument (name or filter_string) now defaults to None, in both the async and sync versions of each method:
    • actor_manager: actor profiles, actor roles
    • asset_maker: assets, software capabilities
    • connection_maker: connections, connector types, endpoints
    • data_designer: data fields, data value specifications
    • data_discovery: analysis reports
    • product_manager: governance action processes
    • schema_maker: schema types, schema attributes
    • solution_architect: concept model elements
  • None already meant "match everything", like "*", so name-only and name+body calls send exactly the same request as before.
  • _async_get_data_value_specifications_by_name also gets the classification_names=None default that its sync version already had. Without it, the new default would have been a syntax error.

Tests

  • New tests/micro-tests/test_issue_135_by_name_body_only.py has 42 tests. For each wrapper they check that both signatures default the argument, that a body-only call sends the body, and that a name-only call is unchanged.
  • Without the fix, 29 of the 42 fail.
  • pytest tests/micro-tests passes (exit code 0).

Not changed (logged in ISSUE-135): five other *_by_name wrappers still mishandle a body-only call. Four SolutionArchitect wrappers overwrite the caller's filter with name, and AutomatedCuration.get_engine_actions_by_name rejects a missing name.

🤖 Generated with Claude Code

14 *_by_name wrappers required their first argument (`name` or
`filter_string`) even though they accept `body`, so a body-only call raised
TypeError (reported by Resource Explorer for get_actor_profiles_by_name).
The first argument now defaults to None in both the async and sync versions,
in actor_manager (2), asset_maker (2), connection_maker (3), data_designer (2),
data_discovery, product_manager, schema_maker (2) and solution_architect.
None already meant "match everything", like "*", so name-only and name+body
calls are unchanged. _async_get_data_value_specifications_by_name also gets
the classification_names=None default its sync version already had.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson added a commit to dwolfson/egeria-python that referenced this pull request Oct 11, 2026
- ISSUE-121, 126, 127: released in 6.1.29.
- ISSUE-117, 124, 125: reported to the Egeria team; their fix source
  (oak2026 fb3d6fce53) merged to Egeria main 2026-10-06 (odpi/egeria#9363),
  not yet re-tested. Same update note on 112 and 90 (fixed) and 102 and 108
  (no fix made).
- ISSUE-132: Egeria main checked 2026-10-10, no cascade change yet.
- ISSUE-135 (new): 14 *_by_name wrappers required name despite accepting
  body; fixed in odpi#445.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
- SolutionArchitect get_info_supply_chain/solution_blueprints/
  solution_components/solution_roles_by_name did body["filter"] = name, which
  overwrote the caller's filter with None on a body-only call and mutated the
  caller's dict. They now copy the body and set filter only when a name is
  given (a given name still wins, as before).
- The same four sent paging as URL query parameters, which Egeria's
  SolutionArchitectResource/ActorManagerResource ignore (only
  addImplementation is a query parameter, on information-supply-chains).
  Paging now goes in the body, without overriding values the body sets.
- AutomatedCuration.get_engine_actions_by_name required a name even with a
  body, contrary to its docstring ("the body supersedes the name"). It now
  requires one only when no body is given. It also passed the type filter as
  'metadata_element_type'; now the canonical key (the 6.2.1 helper fix
  already accepted the old one).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson added a commit to dwolfson/egeria-python that referenced this pull request Oct 11, 2026
 too

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit ecb6e31 into odpi:main Oct 11, 2026
5 checks passed
dwolfson added a commit that referenced this pull request Oct 11, 2026
…rename; .http files are a reference (#444)

* docs(issues): ISSUE-131 and ISSUE-133 released in 6.2.1

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

* docs: http-clients folder rename; .http files are a reference, not ground truth

- The .http collection folder is now pyegeria/http-clients (was "http clients").
  Updated every doc reference, and made scripts/omvs_audit.py and
  test_metadata_expert_endpoint_contract.py look for the new name first (they
  pointed at a folder that no longer exists), falling back to the old one.
- CLAUDE.md: the .http files are hand-maintained and can be wrong; confirm
  decision-critical details against Egeria's Java source (Resource class +
  DTO Jackson names). Corrected the ISSUE-62 note, which called cascadeDelete
  Egeria's real field name; it is cascadedDelete (ISSUE-132).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

* docs(issues): bring statuses up to date; log ISSUE-135

- ISSUE-121, 126, 127: released in 6.1.29.
- ISSUE-117, 124, 125: reported to the Egeria team; their fix source
  (oak2026 fb3d6fce53) merged to Egeria main 2026-10-06 (odpi/egeria#9363),
  not yet re-tested. Same update note on 112 and 90 (fixed) and 102 and 108
  (no fix made).
- ISSUE-132: Egeria main checked 2026-10-10, no cascade change yet.
- ISSUE-135 (new): 14 *_by_name wrappers required name despite accepting
  body; fixed in #445.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

* docs(issues): ISSUE-135's remaining body-only gaps are fixed in #445 too

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

---------

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.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