Repository navigation
Resolve Dr.Egeria credentials at run time with one precedence chain (ISSUE-161) - #477
Merged
dwolfson merged 2 commits intoOct 22, 2026
Merged
Conversation
…r differently Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ain (ISSUE-161) The dr_egeria and dr_egeria_folder CLIs fixed their --userid/--user_pass defaults when the module was imported, and md_processing/dr_egeria.py and common_md_utils.py read EGERIA_USER straight from the environment, bypassing config.json/.env. So the entry points could disagree, and a user set after import was ignored. New pyegeria.core.config.resolve_egeria_credentials(): explicit value > EGERIA_USER/EGERIA_USER_PASSWORD env (read at call time) > settings User Profile (config.json/.env) > quickstart defaults. Both CLIs default the options to None and resolve when they run; the md_processing constants and __main__ path use the same helper. Module-level names are kept. Micro-tests: tests/micro-tests/test_issue_161_dr_egeria_credentials.py (the three behaviour cases fail with the old callers). 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>
1 of 2 tasks
dwolfson
added a commit
that referenced
this pull request
Oct 22, 2026
Ships #477 (ISSUE-161: Dr.Egeria entry points resolve the Egeria user at run time with one precedence chain, via resolve_egeria_credentials) and #478 (Dr.Egeria Postgres Server/Database Element commands take secrets-store attributes; Database User Id / Database Password removed). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ISSUE-161 (PYEGERIA_ISSUES.md; the entry is added in this PR): Dr.Egeria's entry points resolved the Egeria user differently, and two CLIs fixed their user defaults at import time.
Problem
dr_egeriaanddr_egeria_foldercomputed their--userid/--user_passdefaults when the module was imported. A caller that setEGERIA_USERafter importing pyegeria in the same process still got the earlier user.md_processing/dr_egeria.py(its constants and itspython -mentry point) andcommon_md_utils.pyreadEGERIA_USERstraight from the environment, bypassingconfig.jsonand.env. So the entry points disagreed whenever the user was set only in config.Change
pyegeria.core.config.resolve_egeria_credentials(user_id=None, user_pwd=None). Precedence, read when called: explicit value >EGERIA_USER/EGERIA_USER_PASSWORDenvironment variables > the User Profile in pyegeria's settings (config.json/.env) > the quickstart defaults.--userid/--user_passtoNoneand resolve when the command runs. The help text says so.md_processing/dr_egeria.pyandcommon_md_utils.pyuse the same helper. The module-levelEGERIA_USER/EGERIA_USER_PASSWORDnames are kept for code that imports them.Note: the report that prompted this (RE's Dr.Egeria runs writing as erinoverview) turned out to be RE's own configuration. These are the pyegeria inconsistencies found while checking it.
Testing
tests/micro-tests/test_issue_161_dr_egeria_credentials.py: 5 cases.EGERIA_USERset after import, fordr_egeriaanddr_egeria_folder.--useridwins.The three behaviour cases fail with the previous callers and pass with this change.
python:3.13-slimcontainer with no Egeria.🤖 Generated with Claude Code