Skip to content

fix(dr-egeria): cache Egeria 404-002 ambiguous lookups; skip display-name pre-check for action commands - #549

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:claude/dre-precheck-ambiguous-0fa158
Nov 8, 2026
Merged

dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:claude/dre-precheck-ambiguous-0fa158

Conversation

@dwolfson

@dwolfson dwolfson commented Nov 8, 2026

Copy link
Copy Markdown
Member

Summary

Dr.Egeria's generic pre-create check (processors.py step 4a) looks up an element by Display Name before each Create. When many elements share a name, Egeria answers OMAG-GENERIC-HANDLERS-404-002 ("Multiple ... entities where found"). Only the text "Multiple elements found" was recognised as ambiguous, so the answer was never cached (ISSUE-107) and each Create Subscription Type repeated a ~35 s lookup — ~30 min for the Data Hub subscriptions document, which hit the 1800 s timeout.

Changes

  • resolve_element_guid: 404-002 / "entities where found" is now classified as ambiguous and cached once per batch per (name, type, lineage) key. It is replayed silently (returns None, no error added to the command), preserving the previous non-fatal behaviour — unlike the "Multiple elements found" path, which records an error.
  • Step 4a is skipped when supports_target_element_lookup() is False. That is the existing marker for action-style commands (Product Manager's Create Subscription Type, Automation's Initiate/Cancel, etc.), which never upsert by Display Name, so the duplicate-name check is pointless for them. Commands that rely on the pre-check are unchanged.

Tests

tests/micro-tests/test_dre_precheck_ambiguous.py: fake client raising 404-002 — asserts one lookup per batch (fails on the old code), and that an action-style processor makes zero lookups. pytest tests/micro-tests/: all pass (2207 collected, 0 failed).

No version bump / release. No Egeria writes.

dwolfson and others added 2 commits November 7, 2026 23:01
…name pre-check for action commands

Step 4a's display-name pre-check only recognised "Multiple elements found" as
ambiguous. Egeria's OMAG-GENERIC-HANDLERS-404-002 ("Multiple ... entities
where found") was never cached, so every Create Subscription Type repeated a
~35 s lookup (~30 min per Data Hub document).

- resolve_element_guid: treat 404-002 / "entities where found" as ambiguous and
  cache it once per batch (silently, preserving the previous non-fatal behaviour).
- Step 4a is skipped when supports_target_element_lookup() is False (action
  commands never upsert by display name).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit b189dc8 into odpi:main Nov 8, 2026
5 checks passed
dwolfson added a commit to dwolfson/egeria-python that referenced this pull request Nov 8, 2026
Release 6.2.25 carries odpi#546 (RS-W2-2 PR-A: routine declaration +
bindings, AnalyticFunctionSpec as its view), odpi#548 (RS-W2-2 PR-B: resolve
every report spec at load; list unrunnable specs with words) and odpi#549
(Dr.Egeria: cache Egeria 404-002 ambiguous lookups; skip the display-name
pre-check for action commands).

Micro-tests on 3.13: 2240 collected, 0 failed. Wheel checked in a clean
venv (my_egeria top-level, serve_my_profile installed).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson added a commit that referenced this pull request Nov 8, 2026
Release 6.2.25 carries #546 (RS-W2-2 PR-A: routine declaration +
bindings, AnalyticFunctionSpec as its view), #548 (RS-W2-2 PR-B: resolve
every report spec at load; list unrunnable specs with words) and #549
(Dr.Egeria: cache Egeria 404-002 ambiguous lookups; skip the display-name
pre-check for action commands).

Micro-tests on 3.13: 2240 collected, 0 failed. Wheel checked in a clean
venv (my_egeria top-level, serve_my_profile installed).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson added a commit that referenced this pull request Nov 8, 2026
Release 6.2.25 carries #546 (RS-W2-2 PR-A: routine declaration +
bindings, AnalyticFunctionSpec as its view), #548 (RS-W2-2 PR-B: resolve
every report spec at load; list unrunnable specs with words) and #549
(Dr.Egeria: cache Egeria 404-002 ambiguous lookups; skip the display-name
pre-check for action commands).

Micro-tests on 3.13: 2240 collected, 0 failed. Wheel checked in a clean
venv (my_egeria top-level, serve_my_profile installed).

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