fix(fab): recover from first idle MySQL disconnect in token auth#62919
Merged
Conversation
potiuk
approved these changes
Mar 5, 2026
Member
|
Should be rebase I think and fixed :( |
vincbeck
reviewed
Mar 5, 2026
7bdca6c to
f12a64d
Compare
vincbeck
approved these changes
Mar 5, 2026
1 task
eladkal
reviewed
Mar 5, 2026
Retry user deserialization once after clearing the poisoned scoped session so the first request after a server-side idle timeout does not return 500. Add regression coverage for transient disconnect recovery and factorize deserialization lookup logic to avoid duplication.
f12a64d to
d99b042
Compare
potiuk
approved these changes
Mar 10, 2026
dominikhei
pushed a commit
to dominikhei/airflow
that referenced
this pull request
Mar 11, 2026
…che#62919) * fix(fab): recover from first idle MySQL disconnect in token auth Retry user deserialization once after clearing the poisoned scoped session so the first request after a server-side idle timeout does not return 500. Add regression coverage for transient disconnect recovery and factorize deserialization lookup logic to avoid duplication. * test(fab): rename retry mock for clarity
Pyasma
pushed a commit
to Pyasma/airflow
that referenced
this pull request
Mar 13, 2026
…che#62919) * fix(fab): recover from first idle MySQL disconnect in token auth Retry user deserialization once after clearing the poisoned scoped session so the first request after a server-side idle timeout does not return 500. Add regression coverage for transient disconnect recovery and factorize deserialization lookup logic to avoid duplication. * test(fab): rename retry mock for clarity
f-necas
added a commit
to georchestra/datafeeder
that referenced
this pull request
May 27, 2026
1 task
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.
Fix FAB auth token deserialization to recover from transient MySQL idle disconnects in the same request by clearing scoped session state and retrying once; add regression coverage for this recovery path.
This PR closes: #62903
Was generative AI tooling used to co-author this PR?
What this PR changes
FabAuthManager.deserialize_user()aftersession.remove()onSQLAlchemyError.NoResultFound(still raisesValueError).Why
With MySQL idle timeouts, the first request can hit a dead connection and return 500, while the next request succeeds. Retrying once after scoped-session cleanup makes the first request recover instead of failing.
Unit Tests
Have updated the existing unit test and validated the same