Skip to content

My Profile: wait for Egeria at startup, Change User from the main menu - #501

Merged
dwolfson merged 3 commits into
odpi:mainfrom
pcoldico:my-egeria-connection-and-credentials
Oct 27, 2026
Merged

dwolfson merged 3 commits into
odpi:mainfrom
pcoldico:my-egeria-connection-and-credentials

Conversation

@pcoldico

Copy link
Copy Markdown
Contributor

Summary

  • No Egeria at startup no longer exits the app. If the profile can't be loaded (the platform is unreachable, or Egeria rejects the credentials), My Profile shows a new ConnectionErrorScreen instead of exiting with 402. It shows the platform URL, view server, user and the reason, and retries every 10 seconds. As soon as Egeria accepts the credentials it closes and the profile loads, so the app can be started before Egeria. Its buttons are Retry Now (r), Change User (u) and Quit (q, exits 402).
  • Change User from the main screen. A new Change User option in the Other Functions menu opens a new ChangeUserScreen. The splash screen's Change User button and the connection error screen use the same screen.
  • Credentials are checked before switching. The new check_egeria_access() in profile_utils.py requests a token and reports why it failed. A successful create_egeria_bearer_token() isn't enough on its own: on a 401 it returns Egeria's JSON error body as if it were the token, so that case is detected and its exceptionErrorMessage is shown. Previously the splash screen only built a client, so bad credentials weren't found until the profile load failed.
  • change_user() updates settings.User_Profile, exports EGERIA_USER / EGERIA_USER_PASSWORD for pyegeria clients and commands started from the app, sets the main screen subtitle to the new user and reloads the profile.
  • Docs: user manual (new "When Egeria Can't Be Reached" and "Change User screen" sections, keys, return codes, troubleshooting), reference guide (redrawn startup flowchart, new flow notes, menu routing, tests), developer guide §7.3, docs/README.md and RETURN_CODES.md.

Test plan

  • New tests/micro-tests/my_profile/test_connection_and_change_user.py covers check_egeria_access, both new screens, the splash Change User button, and the app callbacks (reload when Egeria is back, change user from the error screen and the menu, cancel back to the error screen, quit with 402)
  • test_my_egeria.py updated: a failed profile load shows the connection error screen instead of exiting; change_user updates settings, the environment and the subtitle
  • pytest tests/micro-tests/my_profile tests/micro-tests/test_my_egeria_serve.py: 553 passed, 1 skipped (after merging current main)

🤖 Generated with Claude Code

… and changes to allow a user to log in as a different user from the main menu

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…egeria-connection-and-credentials

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@dwolfson
dwolfson merged commit 5089457 into odpi:main Oct 27, 2026
5 checks passed
@pcoldico
pcoldico deleted the my-egeria-connection-and-credentials branch October 27, 2026 20:12
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.

2 participants