PCTEJA commented on code in PR #77527:
URL: https://github.com/apache/airflow/pull/77527#discussion_r4742300438


##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -171,6 +174,35 @@ async def get_user_from_token(self, token: str) -> 
BaseUser:
             log.error("Couldn't deserialize user from token, JWT token is not 
valid: %s", e)
             raise InvalidTokenError(str(e))
 
+    @staticmethod
+    def _is_token_revoked(jti: str) -> bool:
+        """
+        Return whether the token ``jti`` has been revoked, tolerating a stale 
DB connection.
+
+        This is the first database access in the auth path and runs on the 
shared scoped
+        session. A prior request can leave that session bound to a connection 
the database

Review Comment:
   I checked main again and couldn't find a leak either. But you did approve 
this same fix in #71396 before it got closed in that batch cleanup, and the 
reporter had it running in prod for weeks with no more 500s.
   
   I am running the MySQL idle repro on main on my laptop now, so I'll know for 
sure. If it doesn't repro I'll close.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to