You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "rjgoyln (via GitHub)" <gi...@apache.org> on 2026/08/05 18:01:23 UTC

[PR] Surface keyring failures instead of silently dropping the token [airflow]

rjgoyln opened a new pull request, #71195:
URL: https://github.com/apache/airflow/pull/71195

   ## 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?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Surface keyring failures instead of silently dropping the token [airflow]

Posted by "rjgoyln (via GitHub)" <gi...@apache.org>.
rjgoyln closed pull request #71195: Surface keyring failures instead of silently dropping the token
URL: https://github.com/apache/airflow/pull/71195


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Surface keyring failures instead of silently dropping the token [airflow]

Posted by "rjgoyln (via GitHub)" <gi...@apache.org>.
rjgoyln commented on PR #71195:
URL: https://github.com/apache/airflow/pull/71195#issuecomment-5652972680

   Superseded by #70991, which fixed the same bug from the other side: `Credentials.save()` now raises `AirflowCtlCredentialNotFoundException` before it ever reaches `keyring.set_password`, and the `except TypeError` handler this PR was widening has been removed entirely. #70991 also carries the equivalent coverage — `test_save_propagates_unexpected_keyring_error` and `test_save_without_token`, the latter additionally asserting that `set_password` is not called.
   
   Checked against current `main`: both tests added here pass with this PR's production change reverted, so there is nothing left for them to distinguish. Closing.
   
   ---
   Drafted-by: Claude Opus 5 (1M context) (no human review before posting)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org