Skip to content

Adopt Egeria 6.3 boxed properties; raise on failed bearer token requests - #498

Merged
dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:feature/boxed-properties-audit
Oct 27, 2026
Merged

dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:feature/boxed-properties-audit

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Summary

Egeria 6.3 now uses boxed types for the numbers and flags in its property beans (odpi/egeria#9389, merged as 12b1aaae). An unset value is left out of the response, and a merge update keeps a value it doesn't mention. This fixes ISSUE-166. This PR adapts pyegeria to that change and also fixes a bearer-token bug reported by a user.

Boxed properties

  • Dr.Egeria upsert: when a Create finds the element already exists and becomes an Update, it no longer sends the spec defaults the parser filled in for the Create (e.g. isNullable: true, position: 0). On 6.3 those would overwrite stored values. Only Merge Update keeps its default. See AsyncBaseCommandProcessor._drop_create_defaults.
  • No more forced 0s: GovernanceControlProperties.domain_identifier, EmbeddedConnectionProperties.position, Person/Team Role headCount and Solution Role domainIdentifier are now left unset when not given.
  • ISSUE-166 workarounds removed:
    • DataDiscovery._security_row shows a returned 0.0 / false as a real answer.
    • SecurityFindingProcessor no longer copies current values into a merge update.
    • The report spec descriptions, the Dr.Egeria manual and the update_usage_activity docstrings are updated to match.
  • ISSUE-166 is marked fixed in PYEGERIA_ISSUES.md / EGERIA_OPEN_ISSUES.md.

Bearer token

create_egeria_bearer_token didn't check the HTTP status. With bad credentials it returned Egeria's 401 error text as the token and put it in the Authorization headers. On a connection error it returned "FAILED". Both base clients now share _post_for_bearer_token, which raises instead and leaves the headers unchanged:

Case Raises
401 / 403 PyegeriaUnauthorizedException
other non-200 PyegeriaClientException
connection error / timeout PyegeriaConnectionException / PyegeriaTimeoutException
empty body, or an Egeria JSON error body PyegeriaInvalidParameterException

Note for callers

Elements written by servers older than 6.3 still hold a stored 0 / false for values nobody set; #9389 doesn't migrate them. Code that compared the token result to "FAILED" should catch the exception instead.

Testing

  • Micro-tests: 1538 collected, 0 failed. New tests: test_create_bearer_token_errors.py (7 cases) and test_upsert_drops_create_defaults.py.
  • Live, 2026-10-27, on egeria-platform c2ca054c (6.3-SNAPSHOT) as erinoverview on qs-view-server:
    • A wrong password raises PyegeriaUnauthorizedException.
    • A VulnerabilityAnnotation created with only a severity came back without cvssScore / exploitAvailable / patchAvailable.
    • After those were set to 8.6 / true / false, a description-only merge update kept all three, and the explicit false came back as false.
    • The throwaway was deleted, and a read-back by GUID returned 404.
  • Not live-tested: the Dr.Egeria upsert-default change (unit-tested only).

🤖 Generated with Claude Code

…quests

Egeria 6.3 (odpi/egeria#9389) leaves unset numbers and flags out of
responses and keeps them on a merge update, which fixes ISSUE-166.

- Dr.Egeria: a Create rewritten to Update no longer sends the spec
  defaults the parser filled in, which would overwrite stored values.
- Stop forcing 0 for GovernanceControlProperties.domainIdentifier,
  EmbeddedConnectionProperties.position, role headCount and Solution
  Role domainIdentifier.
- Remove the ISSUE-166 workarounds: security finding rows now show a
  returned 0 / false, and SecurityFindingProcessor no longer copies the
  current values into a merge update.
- create_egeria_bearer_token raised nothing on bad credentials and
  returned Egeria's 401 error text as the token (or "FAILED" on a
  connection error). It now raises PyegeriaUnauthorizedException,
  PyegeriaClientException, PyegeriaConnectionException or
  PyegeriaTimeoutException and leaves the headers unchanged.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 7949cba into odpi:main Oct 27, 2026
5 checks passed
dwolfson added a commit that referenced this pull request Oct 28, 2026
* docs(issues): re-sort the issue trackers, open items first

PYEGERIA_ISSUES.md:
- Released fixes still marked "not yet released" now name the PR and
  release: ISSUE-111/113/129/134/136 (#446) and ISSUE-135 (#445) in
  6.2.2, ISSUE-153 (#460) 6.2.5, ISSUE-160 (#474/#475 6.2.8, #478 6.2.9),
  ISSUE-161 (#477) 6.2.9, ISSUE-162 (#482) and ISSUE-163/164 (#483)
  6.2.10. ISSUE-166 notes the pyegeria side (#498, 6.2.13).
- Moved the fixed entries (ISSUE-153, 160-166) from the open sections
  to the top of Fixed / Resolved.
- Awaiting re-test is now a real section after the open ones, holding
  ISSUE-125, 124, 117, 112, 90, 95 and 89. Its old header sat in the
  middle of the Fixed list, where everything under it except ISSUE-95
  and ISSUE-89 was already fixed.
- The At-a-glance counts and lists are rebuilt from the section
  contents (14 open pyegeria items, 7 awaiting re-test, 5 open Egeria
  Server issues), and the re-test section notes the quickstart now runs
  Egeria main abe31272.

EGERIA_OPEN_ISSUES.md: drop the fixed ISSUE-166 entry, and move
ISSUE-79 (Egeria needs information) and ISSUE-38 (pending oak2026
merge) out of Awaiting re-test, matching their 2026-10-18 status.

No entry text was removed: 166 entries before and after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015pdMuTg6FmqPWeapeXM54g
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

* docs(issues): ISSUE-165 released in 6.2.11

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015pdMuTg6FmqPWeapeXM54g
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

---------

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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