Skip to content

Fix remaining template-placeholder gaps: Postgres secrets, unset optionals, UC/Kafka (ISSUE-160 follow-up) - #475

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:fix/issue-160-remaining-placeholders
Oct 21, 2026
Merged

dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:fix/issue-160-remaining-placeholders

Conversation

@dwolfson

@dwolfson dwolfson commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Rebased onto main after #474 merged: this PR now contains only its own two commits.

Follow-up to ISSUE-160 (PYEGERIA_ISSUES.md), at the owner's request: "fix them all in a new pr". It fixes the template-placeholder gaps that #474 left open.

Changes (pyegeria/omvs/automated_curation.py)

  • No more literal ~{name}~ from unset arguments. Egeria stores any placeholder that isn't sent as the literal ~{name}~, and body_slimmer drops None values. A new helper, _placeholder_values, now sends "" for unset placeholders in all 13 hard-coded template builders. One visible effect: a folder created without a file system gets the qualified name FileFolder:::/path.
  • Postgres server and database:
    • New optional parameters secrets_store_path_name and secrets_collection_name, sent as secretsStorePathName and secretsCollectionName; Egeria's templates now take credentials from a secrets store.
    • New optional version on both, and resource_name on the server (defaults to the server name).
    • db_user and db_pwd are now optional and deprecated. The templates no longer have those placeholders, so the values aren't sent, and passing either one raises a DeprecationWarning.
  • Kafka: sends resourceName (defaults to the server name) and versionIdentifier.
  • Unity Catalog: new optional parameters on each async method and its sync wrapper:
    • server: resource_name;
    • catalog: uc_server_qualified_name;
    • table and function: root_schema_type_qualified_name;
    • volume: directory_path_name and local_storage_location.
  • "Keystore File" fallback: unchanged. It's a real Egeria template, and on the live platform both "YAML File Secrets Collection" and "Keystore File" resolve to it.

Existing calls keep working: every new parameter is optional and comes after the existing ones.

Not in this PR: Dr.Egeria's "Postgres Server Element" and "Postgres Database Element" commands still pass the user ID and password, which are now ignored with a warning. Their command specs need secrets-store attributes; that's a separate change.

Testing

  • tests/micro-tests/test_issue_160_remaining_placeholders.py: 11 cases. All fail on Fix template builders missing placeholders Egeria added: directoryAddress, fileAddress and more (ISSUE-160) #474's code and pass with this change.
  • The full micro-test suite (1,420 tests) passes in a clean python:3.13-slim container with no Egeria.
  • Live, on Egeria main 05a5e982: a throwaway PostgreSQL server created with the secrets-store options and no user ID or password, and a folder created with no optional arguments. Neither left any ~{...}~ on the element, its Connection or its Endpoint. The server was never registered as a JDBC catalog target. Both were purged and every GUID verified gone. Not confirmed: where Egeria stored the secrets-store values.

🤖 Generated with Claude Code

dwolfson and others added 2 commits October 21, 2026 10:31
- Unset optional placeholders are sent as "" (new _placeholder_values
  helper on all 13 hard-coded template builders), so Egeria never
  stores a literal ~{name}~.
- Postgres server/database: new optional secrets_store_path_name /
  secrets_collection_name (secretsStorePathName /
  secretsCollectionName) and version; db_user / db_pwd are deprecated,
  ignored and warn, since the templates no longer take them.
- Kafka and Unity Catalog builders send resourceName,
  ucServerQualifiedName, rootSchemaTypeQualifiedName, directoryPathName
  and localStorageLocation via new optional parameters.
- The "Keystore File" fallback is a real template; left unchanged.

Micro-tests: tests/micro-tests/test_issue_160_remaining_placeholders.py
(11 cases, all fail on the previous code). Full micro-test suite passes
in a clean python:3.13-slim container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…crets, folder with no optionals)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson force-pushed the fix/issue-160-remaining-placeholders branch from d4acbd7 to 009fbf1 Compare October 21, 2026 15:32
@dwolfson
dwolfson marked this pull request as ready for review October 21, 2026 15:32
@dwolfson
dwolfson merged commit 9587fb4 into odpi:main Oct 21, 2026
5 checks passed
dwolfson added a commit that referenced this pull request Oct 21, 2026
Ships the ISSUE-160 template-placeholder fixes from #474 and #475:
AutomatedCuration's template builders now send directoryAddress,
fileAddress, deployedImplementationType, databaseDescription, the
Postgres secrets-store placeholders and the UC/Kafka placeholders, and
send "" for unset optional placeholders, so no created element keeps a
literal ~{name}~. db_user/db_pwd on the Postgres builders are
deprecated and ignored.

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