pierrejeambrun commented on code in PR #52408:
URL: https://github.com/apache/airflow/pull/52408#discussion_r2176889411
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py:
##########
@@ -46,17 +48,29 @@
responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]),
dependencies=[Depends(requires_authenticated())],
)
-def get_configs() -> ConfigResponse:
+async def get_configs(user: GetUserDep) -> ConfigResponse:
Review Comment:
> get_config depends on GetUserDep which is async and as per FastAPI rule:
any route function that calls an async dependency must also be async.
Where do you get this information from ? I tend to think that it does not
matter and this is confirmed by FastAPI documentation:
https://fastapi.tiangolo.com/tutorial/dependencies/#to-async-or-not-to-async
--
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]