barunpuri commented on code in PR #64418:
URL: https://github.com/apache/airflow/pull/64418#discussion_r3043324535
##########
providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/routes/login.py:
##########
@@ -37,6 +36,26 @@
get_cookie_path = lambda: "/"
+def _get_flask_app():
+ from airflow.providers.fab.auth_manager.fab_auth_manager import
FabAuthManager
+
+ auth_manager = get_auth_manager()
+ if not isinstance(auth_manager, FabAuthManager):
+ raise HTTPException(
+ status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
+ detail=(
+ "FabAuthManager is not configured as the auth manager. "
+ "Ensure AUTH_MANAGER is set to FabAuthManager in your Airflow
configuration."
+ ),
+ )
+ if not auth_manager.flask_app:
+ raise HTTPException(
+ status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
+ detail="Flask app is not initialized. Check that FabAuthManager
started up correctly.",
+ )
Review Comment:
@kalluripradeep , @jscheffl
Sorry for the late reply.
I tested it with the current version, but it seems the issue is still
occurring. So, I took a closer lookâinstead of raising an error on this line,
how about initializing `auth_manager.flask_app`?
--
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]