The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix/revoked-token-stale-session-retry-71395 has failed.
Run started by GitHub user uplsh580 (triggered by uplsh580).

Head commit for run:
7781cc146e4960fbff5f3e556811bb686d9121e6 / Seonghwan Lee <[email protected]>
Recover the revoked-token check from a stale DB connection

The JWT revocation check added in 3.2.0 (RevokedToken.is_revoked in
BaseAuthManager.get_user_from_token) is the first DB access in the auth path
and runs on the shared scoped session. A prior request (e.g. FAB's
deserialize_user) can leave that session bound to a connection the database
later drops on idle timeout (MySQL error 4031, "disconnected ... because of
inactivity"). The connection is never re-checked-out, so pool_pre_ping /
pool_recycle cannot detect it, and the first authenticated request after an
idle period fails with HTTP 500.

deserialize_user already recovers from this class of failure (#62919), but the
revocation check runs earlier in get_user_from_token and had no recovery, so
the 500 simply returned one step sooner. Apply the same discard-and-retry: on
SQLAlchemyError, remove the poisoned scoped session and retry the check once on
a fresh connection.

Related to #71395

Report URL: https://github.com/apache/airflow/actions/runs/31514449232

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to