Skip to content

feat(dr-egeria): add Automation family (initiate processes, surveys, subscriptions) - #414

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:feat/automation-family
Oct 2, 2026
Merged

dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:feat/automation-family

Conversation

@dwolfson

@dwolfson dwolfson commented Oct 2, 2026

Copy link
Copy Markdown
Member

Summary

A new Dr.Egeria Automation family, requested by Mandy Chessell, for commands that set Egeria's governance engines running. It also fixes three automated-curation SDK methods whose request bodies had drifted from Egeria's.

Commands (md_processing/v2/automation.py)

Command What it does
Initiate Governance Action Process Runs a process. Action Targets takes action target name: element pairs; Request Parameters takes name: value pairs.
Initiate Governance Action Type Runs a single governance action type.
Initiate Survey Runs a survey type against one resource. The action target name each survey expects is read from the survey type.
Initiate Subscription Runs a digital product's subscription process (ProvisioningActionProcess::<product>::Create Subscription::<type>) with a requester and destination data set. This provisions the subscription, its license and data delivery.
Cancel Subscription Runs the cancel process Egeria links to each subscription (resource list, resourceUse = "Cancel Subscription").
Create Element Moved here unchanged from Asset Maker.

Egeria has no direct create/cancel-subscription call: both are governance action processes, so the subscription commands run processes. That's why it's Initiate Subscription. The existing Create Digital Subscription only records the element.

The Action Author attributes shared with this family (Governance Action Process, Governance Action Type, Request Parameters, Request Source Elements, Action Target Name) had link-specific descriptions. Those descriptions are generalised, and the definitions are identical in both files.

pyegeria fixes (automated_curation.py)

Egeria's request bodies changed after these methods were written, and Egeria ignores unknown fields, so these failed silently:

  • Request sources and start time: initiate_gov_action_process / initiate_gov_action_type sent requestSourceGUIDs, and the process call also sent startTime. Egeria expects actionSourceGUIDs / startDate, so request sources and start times were dropped.
  • Survey action target names: every initiate_*_survey helper sent the action target name serverToSurvey. The live server declares postgresDatabase, postgreSQLServer, fileToSurvey, unityCatalogServer and so on. _async_initiate_survey now reads the name from the survey type, using the new _async_get_supported_action_target_names. It also takes an optional override, and falls back to serverToSurvey when the type accepts any name (*).

Testing

  • New tests/micro-tests/test_automation_family.py runs all five commands through the real dispatcher, including Cancel Subscription failing clearly when there's no cancel process. It also covers the SDK request bodies and survey target-name selection. The full tests/micro-tests suite passes.
  • validate_compact_specs: 0 errors.
  • Live, against a 6.2-SNAPSHOT server:
    • Survey: Initiate Survey started the PostgreSQL database survey of adventureworks with postgresDatabase. The survey service then failed with role "default" does not exist; that's an environment issue with the catalogued connection's database user.
    • Subscription: Initiate Subscription provisioned an evaluation subscription to the Reference Data Set: facilityType product. Its Cancel Subscription resource appeared on the subscription, and Cancel Subscription found and ran it, which removed the subscription.
    • Cleanup: the throwaway destination was deleted afterwards.

🤖 Generated with Claude Code

…subscriptions)

Requested by Mandy Chessell. A new Dr.Egeria family for commands that set
Egeria's governance engines running (md_processing/v2/automation.py):

- Initiate Governance Action Process / Initiate Governance Action Type: run a
  process or a single action type; Action Targets takes "action target name:
  element" pairs, Request Parameters "name: value" pairs.
- Initiate Survey: run a survey type against one resource. The action target
  name each survey expects is read from the survey type's specification.
- Initiate Subscription: Egeria has no direct create-subscription call -- a
  digital product offers each subscription type as a SubscribingActionProcess
  (ProvisioningActionProcess::<product>::Create Subscription::<type>) that
  already carries everything except the requester and destination. Running it
  provisions the subscription, its license and data delivery. (Named Initiate,
  not Create, because it runs a process; Create Digital Subscription only
  records the element.)
- Cancel Subscription: runs the DeletingActionProcess Egeria links to each
  subscription via ResourceList (resourceUse "Cancel Subscription").
- Create Element moves here from Asset Maker (same AssetMakerProcessor).
- Shared Action Author attribute descriptions generalised (they described
  linking); definitions kept identical in both files.

pyegeria (automated_curation.py) -- Egeria's request bodies changed since
these methods were written, and Egeria ignores unknown fields, so:
- initiate_gov_action_process / initiate_gov_action_type sent
  requestSourceGUIDs (and the process call startTime); Egeria's beans expect
  actionSourceGUIDs / startDate, so request sources and start time were
  silently dropped.
- every initiate_*_survey helper sent action target name "serverToSurvey";
  survey types now declare their own (postgresDatabase, postgreSQLServer,
  fileToSurvey, unityCatalogServer, ...). _async_initiate_survey now reads it
  from the survey type (new _async_get_supported_action_target_names), with an
  optional override and "serverToSurvey" when the type accepts any name ("*").

Verified against a live server: Initiate Survey started the PostgreSQL
database survey with postgresDatabase (the survey then failed on the
catalogued connection's database user -- an environment issue);
Initiate Subscription provisioned an evaluation subscription, whose
"Cancel Subscription" process Cancel Subscription found and ran, removing it.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 1ecd77a into odpi:main Oct 2, 2026
4 checks passed
@dwolfson
dwolfson deleted the feat/automation-family branch October 2, 2026 18:41
dwolfson added a commit that referenced this pull request Oct 2, 2026
Release carrying the Dr.Egeria Automation family and automated-curation SDK
fixes (#414), and the My Profile performance work with the exec_report_spec
graph_query_depth fix, the my_egeria packaging fix (console scripts now work
from a pip install) and the serve/startup-check fixes (#417).

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