Skip to content

Surface keyring failures instead of silently dropping the token - #71195

Open
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:fix-airflowctl-save-swallowing-typeerror
Open

Surface keyring failures instead of silently dropping the token#71195
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:fix-airflowctl-save-swallowing-typeerror

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

airflowctl auth login could report success while the token never reached the keyring. Credentials.save() writes the API url config before storing the token, and when keyring rejected the token the TypeError handler only raised for ClientKind.CLI — a kind neither call site passes. Every other case, including a genuine keyring backend failure, returned as though the save had worked, leaving the user with a config file and no credentials.

Behavior change

A missing token now fails for every client kind, and a TypeError unrelated to a missing token propagates instead of being discarded. An unavailable keyring backend still reports the keyring error first, as before.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

airflowctl auth login wrote the API url config and reported success even
when the token never reached the keyring: the TypeError handler only
converted the error for CLI clients, and every other client kind — plus
any unrelated TypeError from the keyring backend — returned as if the
save had worked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant