Skip to content

fix: Keep plugins working for logins from older versions - #295

Merged
scotwells merged 2 commits into
mainfrom
fix/294-plugins-after-auth-switch
Sep 25, 2026
Merged

scotwells merged 2 commits into
mainfrom
fix/294-plugins-after-auth-switch

Conversation

@scotwells

@scotwells scotwells commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

After #293, a user whose login predates the session config, and whose first command after upgrading is a plugin, gets no API host and the plugin cannot reach Datum Cloud. Before #293 that case worked.

Plugin setup now looks up the account the same way auth get-token and docs openapi do, which also creates the missing session from the stored login.

Test plan

  • A login made with an older datumctl runs a plugin as its first command after upgrading
  • After datumctl auth switch, plugin commands act as the switched-to account
  • Unit tests pass, and the new cases fail without this change

Related to #292
Fixes #294

🤖 Generated with Claude Code

@scotwells
scotwells force-pushed the fix/294-plugins-after-auth-switch branch from 765f552 to bfd0fbd Compare September 25, 2026 17:12
@scotwells scotwells changed the title fix: Keep plugins working after switching accounts fix: Keep plugins working for logins from older versions Sep 25, 2026
@scotwells
scotwells force-pushed the fix/294-plugins-after-auth-switch branch from bfd0fbd to 3ddf991 Compare September 25, 2026 17:19
@scotwells
scotwells marked this pull request as ready for review September 25, 2026 17:21
@scotwells
scotwells enabled auto-merge September 25, 2026 17:21
A user whose login predates the session config, and whose first command
after upgrading is a plugin, got an empty API host, so the plugin could
not reach Datum Cloud. Plugin setup now resolves the account the same
way docs openapi and auth get-token do, which creates the missing
session from the stored login.

The switch test now stores credentials for the previous account, so it
fails on the old code with that account's host rather than an empty
one. Tests that build plugin settings start from an empty mock keyring
so they never read a developer's real credentials.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scotwells
scotwells force-pushed the fix/294-plugins-after-auth-switch branch from 3ddf991 to d9ed2ad Compare September 25, 2026 17:22
@scotwells
scotwells requested a review from a team September 25, 2026 17:23
@scotwells
scotwells merged commit 1b7ae30 into main Sep 25, 2026
1 check passed
@scotwells
scotwells deleted the fix/294-plugins-after-auth-switch branch September 25, 2026 17:23
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.

Plugins fail after switching accounts

2 participants