Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ validate_compact_specs
gen_md_cmd_templates # Basic attributes only
gen_md_cmd_templates --advanced # All attributes

# Rendered templates (sample-data/templates/{basic,advanced}) also ship in the
# wheel as md_processing/data/templates/ (copied by setup.py's build_py hook);
# read them with md_processing.templates.list_templates()/read_template().

# Local web editor for compact command JSON (attributes/bundles/commands) —
# replaces Tinderbox for editing existing families. One-time: uv sync --extra spec-editor
dr_egeria_spec_editor # http://localhost:8420
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
recursive-include tests *.py *.ini *.ipynb *.md *.txt
recursive-include pyegeria/view/schemas *.json
recursive-include pyegeria/view/seed *.json
recursive-include sample-data/templates/basic *.md
recursive-include sample-data/templates/advanced *.md
86 changes: 85 additions & 1 deletion PYEGERIA_ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ re-test candidates moved into *Awaiting re-test* below the open sections.
create-from-template) and 7 (`viewElementGUID`) are still open.

**Open pyegeria items**
- ISSUE-181 (HIGH): Dr.Egeria Parent ID on an Update deleted an unrelated relationship of the parent type, e.g. a folder's member (fixed for 6.2.32; moves to the Appendix on release)
- ISSUE-174: link methods discarded the new relationship GUID (fixed for 6.2.19; moves to the Appendix on release)
- ISSUE-155: pyegeria gaps against Egeria `main` since 6.2 (omvs_audit + source diff, V6.2..05a5e982)
- ISSUE-150: Dr.Egeria commands for an Analytic Function's Egeria declaration: a GovernanceActionType that Resource Explorer runs as an engine host, plus a synchronous path that bypasses Egeria
Expand All @@ -193,6 +194,89 @@ into the entry now, so it isn't rediscovered from scratch later.

---

### ISSUE-181: Parent ID on an Update deletes an unrelated relationship of the parent type (e.g. a folder's member)

**Layer:** pyegeria (Dr.Egeria) · **Severity:** HIGH: silent membership loss, no error or warning · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review` (the proposed fix below; separate commit from ISSUE-175..180), targets 6.2.32 · **Found:** 2026-11-10, by the publish-portal-specs builder while renaming `ReportSpecFolder::EgeriaPortal` (fe5aad27); confirmed by the Architect's read-back of consumer folders phase 1 (e71e4e90).

**What:** `AsyncBaseCommandProcessor._sync_parent_relationship` (`md_processing/v2/processors.py`) runs after every successful Create/Update/… that names a `Parent ID` and `Parent Relationship Type Name`. Its steps:
1. It lists the element's relationships with `metadata_expert._async_get_all_related_elements(guid)`, i.e. `startingAtEnd=0`, **either end**, and only the first page.
2. It keeps the **last** relationship of the parent type that is not the named parent.
3. It deletes that relationship ("re-parenting"), then links the named parent.

Step 1 doesn't check which end the element is at, so a relationship where the element is the *parent* counts as "the current parent". A collection is end 1 of its members' `CollectionMembership` links. Updating a folder with a Parent ID (at end 1, the default) therefore deletes one of the folder's own member links. Even at the right end, the delete is wrong for many-to-many types: an element may sit in several collections, and Parent ID would silently drop one.

**Repro (no Egeria needed; see the micro-test):**
1. Folder F has `CollectionMembership` F→S1 and F→S2, and no parent.
2. Process `Update Collection Folder` for F with `Parent ID` = root R and `Parent Relationship Type Name` = `CollectionMembership`.
3. Result: F→S2 (the last one listed) is deleted, and R→F is created. Nothing in the output says a link was removed.

On fe5aad27 this would have dropped one of its two ReportSpec members. The builder linked the folder with `Add Member to Collection` instead.

**Proposed fix:** add only, never delete:
- Read only the relationships with the element at the child end: `startingAtEnd` = 2 when the parent is at end 1 (else 1), and check each entry's `elementAtEnd1`.
- Page until an empty page.
- If the named parent is already linked, do nothing.
- Otherwise create the link. Any link to a different parent stays in place and is named in the output.

Moving an element becomes an explicit `Remove Member from Collection` (or a relationship delete). pyegeria can't tell which earlier link it created itself, so "delete only the link it created" isn't safe either.

**Done:** as proposed, in `_sync_parent_relationship` and a new `_parent_links_of_type`. Micro-tests in `tests/micro-tests/test_parent_id_update_keeps_memberships.py`: the folder repro, with the server filtering ends and with the server returning both ends, an existing link to the parent, the parent found on a later page, a different parent kept and reported, and the parent at end 2. `elementAtEnd1` ("is the related element at end 1") and `startingAtEnd` 1/2 are as in Egeria's `RelatedMetadataElement` and `ClassificationExplorerResource`. Not yet run against a live Egeria (laz was down for the #9438 upgrade).

**Workaround before 6.2.32:** to nest an element that already has relationships of that type, use `Add Member to Collection`, not `Parent ID`.

### ISSUE-180: `commands/ops/README.md` described files that no longer exist

**Layer:** pyegeria docs · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review`, targets 6.2.32 · **Found:** 2026-11-10, Mandy's review of the operations commands (main 9e50cd81, 6.2.30, and a live quickstart).

**What:** the README listed `get_eng_action_status.py`, `view_*` and other modules that are gone, and described non-ops widgets. `gov_server_actions.py`'s module docstring said it "restarts an integration daemon". This file's ISSUE entry on dead entry points pointed at `hey_egeria_ops start`/`stop`; the commands are `hey_egeria_ops tell servers start|stop`.

**Fix (done):** the README is rewritten for the current `monitor_*` / `list_*` displays, `refresh_integration_daemon`, `restart_integration_daemon`, `load_archive` and `gov_server_actions`, with their console scripts and `hey_egeria_ops` commands. The module docstring and the stale command names are corrected.

### ISSUE-179: catalog targets were given BOTH_DIRECTIONS / ARCHIVE whatever the connector registered

**Layer:** pyegeria · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review`, targets 6.2.32 · **Found:** 2026-11-10, Mandy's review of the operations commands (main 9e50cd81, 6.2.30, and a live quickstart). Silent wrong behaviour.

**What:** `AutomatedCuration.add_catalog_target` / `update_catalog_target` and their async forms defaulted `permitted_sync="BOTH_DIRECTIONS"` and `delete_method="ARCHIVE"`. Egeria inherits the connector's registered `permittedSynchronization` only when the target's is null (`RequestedCatalogTargetsManager`), so every add overrode it (a FROM_THIRD_PARTY connector got BOTH_DIRECTIONS targets), and every update, e.g. `tell integration-daemon update-target <guid> <new-name>`, reset both fields.

**Fix (done):** both default to None in all four methods, so they are left out of the request unless given ("unset - inherit the connector's setting"; on an update, unchanged). The `add-target` / `update-target` commands pass neither. Micro-tests check the fields are absent when not supplied, and sent when given.

### ISSUE-178: `tell servers stop` never found a server

**Layer:** pyegeria · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review`, targets 6.2.32 · **Found:** 2026-11-10, Mandy's review of the operations commands (main 9e50cd81, 6.2.30, and a live quickstart).

**What:** `stop_server` called `shutdown_server(None, server)`, which looked the name up as `qualifiedName == "qs-engine-host"`. A live server's qualified name is `Engine Host Server::https://localhost:9443::qs-engine-host`, so it never matched. `--server` was not required, and commented-out options were left in.

**Fix (done):** `shutdown_server` (sync and async) takes `display_name` and `organization_name` and resolves the server by its resource name, as `activate_server_with_stored_config` does. The command calls it with `display_name=<server>` and `--organization-name`, `--server` is required, the docstring says what it does, and the leftovers are removed. Checked live, read-only: the resource name `Coco Pharmaceuticals.qs-engine-host` finds the server; the qualifiedName lookup does not.

### ISSUE-177: `tell servers start` passed a GUID as the server's name, found by a lookup that finds nothing

**Layer:** pyegeria · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review`, targets 6.2.32 · **Found:** 2026-11-10, Mandy's review of the operations commands (main 9e50cd81, 6.2.30, and a live quickstart).

**What:** `start_server` looked the server up by property `name` (live: "No elements found"), then passed that value in the `display_name` slot of `activate_server_with_stored_config(server_guid, display_name, ...)`. `--server` silently defaulted to `qs-metadata-store`.

**Fix (done):** the command calls `activate_server_with_stored_config(display_name=<server>, organization_name=...)` and lets the method resolve it by resource name; `--server` is required; the docstring is fixed. `activate_server_with_stored_config`, `shutdown_server` and `refresh_gov_eng_config` now resolve through one helper, `RuntimeManager._resolved_server_guid`, which raises `PyegeriaInvalidParameterException` when no server matches, instead of sending "No elements found" to Egeria as a GUID.

### ISSUE-176: `tell engine-host refresh` ignored its GUID option and could not find the engine host by name

**Layer:** pyegeria · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review`, targets 6.2.32 · **Found:** 2026-11-10, Mandy's review of the operations commands (main 9e50cd81, 6.2.30, and a live quickstart).

**What:** the option was declared `-engine-host-guid` (single dash) and its value was never used: the command always refreshed `c.engine_host` by name. And `refresh_gov_eng_config` looked a name up as qualifiedName `Engine Host::<name>`, which finds nothing live, so the by-name path failed too.

**Fix (done):** `--engine-host-guid` is passed as `server_guid`; without it the configured engine host is used by name, now resolved by resource name (`refresh_gov_eng_config` gains `organization_name`). `--engine` refreshes one governance engine (`gov_engine_name`). The docstring says "Ask the engine host to reload its governance engine configuration".

### ISSUE-175: `hey_egeria_ops show integrations --targets` could not be run

**Layer:** pyegeria · **Status:** fixed 2026-11-10 on branch `fix/ops-commands-review`, targets 6.2.32 · **Found:** 2026-11-10, Mandy's review of the operations commands (main 9e50cd81, 6.2.30, and a live quickstart).

**What:** `commands/cli/egeria_ops.py` registered `@integrations.command("--targets")`, which click parses as an option, so the command was unreachable; its function was also named `integrations_status`, shadowing the status command. `commands/cli/egeria.py` registered it as `targets` but with the same shadowing name and an argument declared as `"--connector"`.

**Fix (done):** both register `targets` with a `connector` argument and the function `integrations_targets`.

### Egeria team follow-ups from the same review (not pyegeria)

- `PostgresConfigurationProperty.REPOSITORY_MODE` is declared `DataType.DATE` with a date example (copied from `DEFAULT_AS_OF_TIME`); it should be a string, e.g. `readOnly`.
- `IntegrationConnectorHandler.getRegistrationChange()` and `IntegrationGroupHandler.refreshRegisteredIntegrationConnector()` take `metadataSourceQualifiedName` from `getMetadataCollectionQualifiedName()` instead of `getMetadataSourceQualifiedName()`.

### ISSUE-174: 142 `link_*` methods throw away the relationship GUID the shared helper now returns

**Layer:** pyegeria · **Status:** fixed 2026-10-31 on branch `fix/link-methods-return-guid`, targets 6.2.19 · **Found:** 2026-10-31, Resource Explorer D1-b ("Link the pack's 22 schemas"). `AssetMaker.link_data_set_content` returns None, so the handler re-reads each schema after every attach to learn the new DataSetContent relationship's GUID.
Expand Down Expand Up @@ -7901,7 +7985,7 @@ to fail):
five point at files that no longer exist.
- `start_daemon`/`stop_daemon` → `commands.ops.engine_actions` - file no
longer exists; equivalent functionality lives on today as
`hey_egeria_ops start`/`hey_egeria_ops stop`
`hey_egeria_ops tell servers start`/`hey_egeria_ops tell servers stop`
(`gov_server_actions.py`'s `start_server`/`stop_server` - those are click
subcommands taking a `@click.pass_context` config object, not standalone
entry points, so this isn't a 1:1 script rename).
Expand Down
4 changes: 2 additions & 2 deletions commands/cli/egeria.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,8 +1987,8 @@ def integrations_status(ctx, connector_list, list, sorted):

@integrations.command("targets")
@click.pass_context
@click.argument("--connector", nargs=1)
def integrations_status(ctx, connector):
@click.argument("connector", nargs=1)
def integrations_targets(ctx, connector):
"""Display Catalog Targets for a connector"""
c = ctx.obj
display_catalog_targets(connector, c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width)
Expand Down
4 changes: 2 additions & 2 deletions commands/cli/egeria_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ def integrations_status(ctx, connector_list, list):
)


@integrations.command("--targets")
@integrations.command("targets")
@click.pass_context
@click.argument("connector", nargs=1)
def integrations_status(ctx, connector):
def integrations_targets(ctx, connector):
"""Display Catalog Targets for a connector"""
c = ctx.obj
display_catalog_targets(connector, c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width)
Expand Down
58 changes: 40 additions & 18 deletions commands/ops/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the Egeria project. -->

# Operational

These widgets display different kinds of information useful to monitor the status of different elements of an Egeria deployment.
Widgets will continue to be added over time to cover more facets of catalog use.

* get_eng_action_status.py - lists assets containing the user provided search string in the display name or qualified name. Search string must be a minimum of three characters.
* get_tech_type_elements.py - shows a tree view for the details of a supported technology type.
* get_tech_type_template.py - shows a tree view of the template associated with a supported technology type.
* view_coco_status.py - provides a tree view of a collection with all nested collections and items within the collection.
* view_eng_action_status.py - provides a live view of the status of engine actions.
* view_gov_eng_status.py - provides a live view of a governance engine status.
* view_integ_daemeon_status.py - provides a live view of an integration daemon status.
* view_platform_status.py - provides a live status view of the known servers on known platforms.
* view_server_list.py - provides a more detailed live status view of the servers on a single platform.
* view_server_status.py - provides a minimal live status view of the servers on a single platform.
* view_asset_changes.py - experiment in progress
* view_asset_events.py - experiment in progress
# Operations commands

Commands for watching and operating an Egeria deployment: platforms, servers, the integration daemon, the
engine host and archives. Most are reached through `hey_egeria_ops` (and `hey_egeria`), and many also have
their own console script.

## Status displays

`monitor_*` is a live display that refreshes; `list_*` is the same information as a paged list.

| Module | Shows | Console scripts |
|---|---|---|
| `monitor_platform_status.py` | The cataloged platforms and their servers | `monitor_platform_status` |
| `monitor_server_status.py` | The status of every registered server across the platforms | `monitor_server_status` |
| `monitor_server_startup.py` | Server start-up status | `monitor_server_startup` |
| `monitor_daemon_status.py` | The integration daemon and its connectors | `monitor_daemon_status`, `list_daemon_status` |
| `monitor_engine_status.py` | The governance engines on the engine host | `monitor_engine_status`, `list_engine_status` |
| `monitor_engine_activity.py` | Engine actions | `monitor_engine_activity`, `list_engine_activity` |
| `monitor_active_engine_activity.py` | Engine actions still running | `monitor_active_engine_activity`, `list_active_engine_activity` |
| `list_catalog_targets.py` | An integration connector's catalog targets (`hey_egeria_ops show integrations targets <connector>`) | `list_catalog_targets` |
| `list_archives.py` | The open metadata archives loaded | `list_archives` |

## Actions

| Module | Does | How to run it |
|---|---|---|
| `gov_server_actions.py` | Start and stop an OMAG server; ask the engine host to reload its governance engine configuration; add, update and remove an integration connector's catalog targets | `hey_egeria_ops tell servers start --server <name>` / `stop --server <name>`; `hey_egeria_ops tell engine-host refresh [--engine-host-guid <guid>] [--engine <name>]`; `hey_egeria_ops tell integration-daemon add-target` / `update-target` / `remove-target` |
| `refresh_integration_daemon.py` | Refresh integration connectors | `refresh_integration_daemon` |
| `restart_integration_daemon.py` | Restart integration connectors | `restart_integration_daemon` |
| `load_archive.py` | Load an open metadata archive into a server | `load_archive` |

A server is named by its display name (for example `qs-engine-host`) and found by its resource name,
`<organization name>.<server name>`; `--organization-name` defaults to the configured organization.

## Legacy

- `table_integ_daemon_status.py`: an older integration-daemon status table, still exported as
`commands.table_integ_daemon_status`; `monitor_daemon_status.py` is the current display.
- `x_engine_actions.py`: older start/stop/refresh commands, kept for reference; use `gov_server_actions.py`.

----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the Egeria project.
Copyright Contributors to the Egeria project.
Loading
Loading