menghot commented on PR #59953:
URL: https://github.com/apache/airflow/pull/59953#issuecomment-3707210117

   Please try apache-airflow-providers-fab:3.0.2, it works fine.
   AirflowAppBuilder should use sqlalchemy.orm.scoping.scoped_session
   instead of sqlalchemy.orm.session.Session
   
   The fix is override by the PR #58644. (Since fab 3.0.3+)
   where sqlalchemy.orm.scoping.scoped_session() returns a new instance of 
sqlalchemy.orm.session.Session
   which can't close automatically.
   
   By default, scoped_session uses thread-local storage, meaning it returns the 
same Session instance when called within the same thread.
   It acts as a registry for Session objects. If a session for the current 
thread already exists, it is returned; otherwise, it is created.
   In Web env, Flask automatic cleanup session when HTTP request done.
   
   I find a new PR #59953 has re-applying the fix, and also can fix the mypy 
errors 
   


-- 
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