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

   This PR is a follow-up to #64418 and addresses feedback regarding the 
flask_app initialization.
   
   In certain execution flows (such as isolated CLI commands, specific worker 
lifecycles, or standalone tests), the FabAuthManager can be instantiated 
without the get_fastapi_app() method ever being called. This leaves the 
internal flask_app reference as None, which previously triggered an HTTP 500 
error when the /auth/token or /auth/logout routes were accessed.
   
   This change updates the _get_flask_app() internal helper to lazily 
initialize the Flask app context using create_app(enable_plugins=False) if it 
is found to be uninitialized. This provides a resilient fallback that ensures 
the AppBuilder context is always available regardless of the startup path.
   
    Ensures that the FastAPI login and logout routes are robust against race 
conditions or partial initialization states in the Airflow process lifecycle.
   
   Related Issues:
   
   Closes #64151 (follow-up)
   Addressing feedback on #64418


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