Skip to content

feat(dr-egeria): default editing commands to forLineage=true; Solution Component deployment status - #403

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:feat/for-lineage-defaults
Oct 1, 2026
Merged

dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:feat/for-lineage-defaults

Conversation

@dwolfson

@dwolfson dwolfson commented Oct 1, 2026

Copy link
Copy Markdown
Member

Summary

Three requests from Mandy Chessell.

1. Editing commands default to forLineage=true (Promise support)

Egeria only returns Promise-classified elements (and Memento, i.e. logically deleted, elements) to requests with forLineage=true.

The problem: setting For Lineage on a command didn't help. It only reached the request body. The existence check, name lookups and fetch-by-GUID always used false, so Update Solution Component on a promised component missed it and was rewritten into a Create.

The fix:

  • pyegeria: new lineage_visible() context manager (from pyegeria import lineage_visible). Inside it, every JSON request body any client sends goes out with forLineage=true, including bodies SDK helpers build with it set to false. Both request paths are hooked (BasePlatformClient and BaseServerClient).
  • Dr.Egeria defaults:
    • Editing commands run inside lineage_visible(True).
    • Report commands (View/List/Run) default to false.
    • An explicit For Lineage wins, except Declassify Promise, which always uses true.
    • A Memento element found by an editing command is treated as not found. A Create for a deleted element's name therefore still creates a new element instead of updating the deleted one.

2. Solution Component deployment status (0730)

Create Solution Component gains Deployment Status / User Defined Deployment Status, sent as deploymentStatus / userDefinedDeploymentStatus. Report specs regenerated.

3. Typo

Fixed "compoent(s)" in Link Solution Components and Link SubComponent.

Testing

  • New tests/micro-tests/test_for_lineage_default.py covers the body rewrite, the real POST path, the per-command defaults and the Memento guard. The POST-path test caught that BaseServerClient has its own copy of the request code, which the first version missed.
  • test_curation_promise.py gains a case for Declassify Promise with an explicit For Lineage: false.
  • The full tests/micro-tests suite passes. validate_compact_specs: 0 errors.
  • Live, against a 6.2-SNAPSHOT server:
    • Created a Solution Component with deploymentStatus and promised it; it was hidden from normal lookups.
    • Update Solution Component with no For Lineage updated it in place: same GUID, no duplicate.
    • A report-style find hid it by default and showed it inside lineage_visible().
    • Declassified and deleted it afterwards.

🤖 Generated with Claude Code

…n Component deployment status

Requested by Mandy Chessell.

forLineage defaults (Promise support)
- Egeria only returns Promise-classified elements (and Memento, logically
  deleted, elements) to requests with forLineage=true. Setting For Lineage on
  a command did not help: it only reached the request body, while the
  existence check, name lookups and fetch-by-GUID always used false -- so
  e.g. Update Solution Component on a promised component missed it and was
  rewritten into a Create.
- pyegeria: new lineage_visible() context manager. Inside it, every JSON
  request body sent by any client (both BasePlatformClient and
  BaseServerClient request paths) goes out with forLineage=true, including
  bodies SDK helpers build with it false.
- Dr.Egeria: editing commands run inside lineage_visible(True); report
  commands (View/List/Run) default to false. An explicit For Lineage value
  wins, except Declassify Promise, which always uses true. A Memento element
  found by an editing command is treated as not found, so a Create for a
  deleted element's name still creates rather than updating the deleted one.

Solution Component (0730)
- Create Solution Component gains Deployment Status / User Defined
  Deployment Status, sent as deploymentStatus / userDefinedDeploymentStatus.
  Shared attribute definitions kept identical in the Curation and Solution
  Architect families (global attribute namespace).
- Fix "compoent(s)" typos in Link Solution Components / Link SubComponent.

Verified against a live server: a promised Solution Component was found and
updated in place by Update Solution Component with no For Lineage attribute
(same GUID, no duplicate), deploymentStatus stored, report-style find hid it
by default and showed it inside lineage_visible().

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

AssetCatalog's constructor calls check_connection(), so these tests only
passed on machines with an Egeria server at localhost:9443 -- CI has none,
and main has failed since odpi#402 added test_asset_lineage_for_lineage.py.
Stub check_connection and use a port nothing listens on, so any real
network call fails loudly instead of silently relying on a local server.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit b843d14 into odpi:main Oct 1, 2026
5 checks passed
@dwolfson
dwolfson deleted the feat/for-lineage-defaults branch October 1, 2026 13:56
dwolfson added a commit that referenced this pull request Oct 1, 2026
Release carrying the forLineage=true defaults for Dr.Egeria editing
commands, lineage_visible() in the SDK and Solution Component deployment
status (#403), plus the Promise classification commands and the JSON
Dictionary parsing fix (#402).

6.1.24 is skipped as a tagged release: a 6.1.24 build was uploaded to PyPI
on 2026-09-30 ahead of #402/#403 merging, so the release workflow could not
publish the merged code under that version (PyPI files are immutable).

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