Skip to content

feat(dr-egeria): Zone Membership in Basic templates; blank zones no longer cleared (6.2.30) - #577

Merged
dwolfson merged 4 commits into
odpi:mainfrom
dwolfson:feat/zone-membership-basic
Nov 10, 2026
Merged

dwolfson merged 4 commits into
odpi:mainfrom
dwolfson:feat/zone-membership-basic

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Dr.Egeria: Zone Membership moves from the Advanced to the Basic templates, with an empty default. This PR also fixes a data-loss bug the move would have exposed and two smaller zone bugs. It bumps pyegeria to 6.2.30.

Zone Membership in the Basic templates

  • Zone Membership changes from Advanced to Basic in the 14 compact family specs that define it. The edit was made through the Spec Editor API. default_value stays "".

  • 126 commands now show Zone Membership in their Basic template, with no value:

    Family Commands
    Governance Officer 29
    Collections 25
    Actor Manager 9
    Data Designer 9
    Solution Architect 9
    Projects 8
    External Reference 7
    Digital Product Manager 6
    Security Officer 6
    Views & Reports 5
    Action Author 4
    Glossary 3
    Curation (Classify/Reclassify Zone Membership) 2
    Feedback 2
    Reference Data 2

    In the 127 Advanced templates, the attribute only moves position.

  • refresh_specs --merge-reports regenerated:

    • sample-data/templates/{basic,advanced};
    • md_processing/data/generated_format_sets.json;
    • pyegeria/view/base_report_formats.py;
    • the seed (pyegeria/view/seed, 14 family files; the census is unchanged at 437 total, 376 runnable, 0 unrunnable, 61 format-only).
  • 123 *-DrE-Basic report specs gain a Zone Membership column, as the Advanced specs already had.

Fixes

  • A blank Zone Membership no longer clears an element's zones (data loss).
    • The cause: a ### Zone Membership heading with no value, which is exactly what the Basic template now shows, parses to []. AsyncBaseCommandProcessor._sync_zone_membership then called clear_zone_membership after every Create/Update/Upsert. So an Update with the field left blank wiped the element's zones.
    • The fix: an empty or absent value is now a no-op, with no Egeria call. Only a non-empty list sets zones. Declassify Zone Membership removes them.
    • Link Notification Subscriber now sends an empty Zone Membership as None, not [].
  • The Zone Membership report column shows the zones, not the classification object.
    • Egeria v6 returns zones as an ElementClassification at elementHeader.zoneMembership. populate_common_columns' generic header fallback stringified that whole object into the cell, which already affected the Advanced specs.
    • New _zone_membership_text() joins classificationProperties.zoneMembership as "a, b" ("" when there are none). _extract_referenceable_properties includes it as well.
  • A local-only Dashboard Sheet skips the Egeria syncs.
    • The cause: with no Egeria connection (or local-only set), Create Dashboard Sheet uses the sheet's name as its GUID. Zones were then sent to Egeria under that name, or the command failed with AttributeError when there was no client.
    • The fix: parsed_output["local_only"] now makes step 10 skip the zone, parent and classification syncs. The output says "Zone Membership: not written (local only)".

Tests

  • tests/micro-tests/test_zone_membership_basic.py (22 tests):
    • the spec level and default in every family;
    • the Basic template shows no default value;
    • parsing of an absent, blank or filled heading on Create and Update;
    • no Egeria call for an empty value, whether absent, [], None or "";
    • the zone text for the v6 header, two zones, a single string, the classifications shape and no zones;
    • Collection-DrE-Basic/-Advanced through populate_common_columns and generate_output DICT.
  • tests/micro-tests/test_dashboard_sheets_in_egeria.py: a local-only sheet with zones, both via the environment variable and with no client, makes no Egeria writes and says so; a sheet without zones says nothing about zones.
  • The blank-zone, raw-dict and local-only tests each fail on the old code.
  • Full micro-suite on Python 3.13: 2702 tests, 0 failures, 0 errors, 3 skipped.

Version

  • pyproject.toml and uv.lock: 6.2.29 → 6.2.30.
  • The release note is docs/release-notes/6.2.30.md.
  • The wheel was checked in a clean venv: my_egeria/ is top-level, serve_my_profile is installed, and pyegeria 6.2.30 imports.

The matching template mirror for egeria-workspaces is dwolfson/egeria-workspaces branch feat/zone-membership-basic-templates (0420abe2). It deploys after this release and the image rebuilds.

🤖 Generated with Claude Code

…sets no zones

Zone Membership moves from the Advanced to the Basic level in the 14 family
specs that define it (Spec Editor API, default stays empty), so 126 commands
show it in their Basic templates with no value. refresh_specs regenerated the
templates, generated_format_sets.json, base_report_formats.py and the seed:
the *-DrE-Basic report specs gain a Zone Membership column (123 specs).

Fix: a Zone Membership heading with no value parses to an empty list, and
_sync_zone_membership then cleared the element's ZoneMembership
classification on Create and Update. With the attribute now in the Basic
templates, filling one in and leaving it blank would have wiped an element's
zones. An empty or absent value now sets no zones and leaves existing zones
alone; Declassify Zone Membership removes them. Link Notification Subscriber
sends an empty value as None, not [].

Tests: spec level and default, Basic template has no default value, parsing
of absent/blank/filled headings, and no Egeria call for an empty value.
Release note: docs/release-notes/6.2.30.md.

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

Egeria v6 returns an element's zones as an ElementClassification at
elementHeader.zoneMembership. populate_common_columns' generic header fallback
put that whole object, stringified, in the zone_membership column of the
*-DrE-Advanced specs, and of the *-DrE-Basic specs that gained the column in
this branch.

_zone_membership_text reads classificationProperties.zoneMembership (a list
or a single string; also an older header's ZoneMembership entry in
classifications) and joins it ("a, b"; "" for no zones).
populate_common_columns uses it for the zone_membership column, and
_extract_referenceable_properties includes it.

Tests: the v6 header shape, two zones, a single string, the classifications
shape, no zones, and Collection-DrE-Basic/-Advanced through
populate_common_columns and generate_output DICT.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
With no Egeria connection, or local-only set, Create Dashboard Sheet uses the
sheet's name as its GUID. The base processor's post-execution step then sent a
filled-in Zone Membership to Egeria with that name as the GUID. With no client
it raised AttributeError, which failed the command.

The processor now marks parsed_output["local_only"]. The base step 10 skips the
zone, parent-relationship and classification syncs for it and records
"Zone Membership - SKIPPED (not written (local only))". The sheet's output says
"Zone Membership: not written (local only)" when zones were given.

Tests: local-only env and no client, each with Zone Membership: no Egeria
writes, the note in the output and message, and the sheet in the local store.
Without zones, nothing about zones is reported.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 9e50cd8 into odpi:main Nov 10, 2026
6 checks passed
dwolfson added a commit to dwolfson/egeria-workspaces that referenced this pull request Nov 10, 2026
126 commands show Zone Membership in their Basic template, default empty.
Deployed after pyegeria 6.2.30 (odpi/egeria-python#577), where a blank Zone
Membership no longer clears an element's zones. Also carries 4 template
updates that had not reached this repo: Create Subscription Type (Minimum
Notification Interval) and Create Display Data Container (renderer valid
values), basic and advanced. Architect read-back PASS.

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