Surface keyring failures instead of silently dropping the token - #71195
Open
rjgoyln wants to merge 1 commit into
Open
Surface keyring failures instead of silently dropping the token#71195rjgoyln wants to merge 1 commit into
rjgoyln wants to merge 1 commit into
Conversation
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.
rjgoyln
marked this pull request as ready for review
August 5, 2026 20:48
rjgoyln
requested review from
bugraoz93,
dheerajturaga,
henry3260 and
potiuk
as code owners
August 5, 2026 20:48
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.
Summary
airflowctl auth logincould 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 theTypeErrorhandler only raised forClientKind.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
TypeErrorunrelated 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?
Generated-by: Claude Code (Opus 5) following the guidelines