pierrejeambrun commented on code in PR #61310:
URL: https://github.com/apache/airflow/pull/61310#discussion_r2789063002


##########
airflow-core/src/airflow/api_fastapi/app.py:
##########
@@ -137,8 +139,11 @@ def get_auth_manager_cls() -> type[BaseAuthManager]:
 
 def create_auth_manager() -> BaseAuthManager:
     """Create the auth manager."""
-    auth_manager_cls = get_auth_manager_cls()
-    _AuthManagerState.instance = auth_manager_cls()
+    if _AuthManagerState.instance is None:
+        with _AuthManagerState.lock:
+            if _AuthManagerState.instance is None:

Review Comment:
   Those checks are reundant. We have `if _AuthManagerState.instance is None:` 
two times.



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