lbny22727-create commented on issue #77806:
URL: https://github.com/apache/airflow/issues/77806#issuecomment-7288427717

   
   
   بتاريخ ٣٠ نوفمبر ٢٠٢٦ ٨:٤٧:٢٨ م GMT+02:00، Jagdish Kumawat ***@***.***> 
الرسالة:
   >jagdish-kumawat created an issue (apache/airflow#77806)
   >
   >### Under which category would you file this issue?
   >
   >Airflow Core
   >
   >### Apache Airflow version
   >
   >3.4.0
   >
   >### What happened and how to reproduce it?
   >
   >Every time a log server starts (the scheduler's on 8793 and the triggerer's 
on 8794), uvicorn prints a warning:
   >
   >```
   >scheduler  | 2026-11-30T18:24:54.424150Z [info     ] Starting log server on 
http://[::]:8793 [airflow.utils.serve_logs.core] loc=core.py:50
   >triggerer  | 2026-11-30T18:24:54.462086Z [info     ] Starting log server on 
http://[::]:8794 [airflow.utils.serve_logs.core] loc=core.py:50
   >scheduler  | 2026-11-30T18:24:55.402612Z [warning  ] ASGI app factory 
detected. Using it, but please consider setting the --factory flag explicitly. 
[uvicorn.error] loc=config.py:521
   >triggerer  | 2026-11-30T18:24:55.402700Z [warning  ] ASGI app factory 
detected. Using it, but please consider setting the --factory flag explicitly. 
[uvicorn.error] loc=config.py:521
   >```
   >
   >`serve_logs()` passes the import string of a factory function to uvicorn 
without `factory=True`:
   >
   >```python
   >uvicorn.run(
   >    "airflow.utils.serve_logs.log_server:get_app",
   >    host="",
   >    ...
   >)
   >```
   >
   
>https://github.com/apache/airflow/blob/6196a32433a70e9d0da76644dfffdd47161a7420/airflow-core/src/airflow/utils/serve_logs/core.py#L60-L67
   >
   >uvicorn (0.54.0 in the 3.4.0 constraints) loads `get_app`, finds that 
calling it returns the app, and warns because `factory` isn't set. The API 
server doesn't warn because it passes an app object 
(`"airflow.api_fastapi.main:app"`).
   >
   >**Steps to reproduce** (Python 3.14.10, uv 0.13.10, macOS):
   >
   >```bash
   >uv venv --python 3.14
   >source .venv/bin/activate
   >uv pip install "apache-airflow==3.4.0" --constraint 
"https://raw.githubusercontent.com/apache/airflow/constraints-3.4.0/constraints-3.14.txt";
   >export AIRFLOW_HOME="$PWD"
   >airflow standalone
   >```
   >
   >Both warnings appear during start-up, before `Airflow is ready`. The same 
line already shows up in logs pasted into other issues (#56477, #56865, #57979, 
#58441), but none of them is about it.
   >
   >### What you think should happen instead?
   >
   >No warning: pass `factory=True` to `uvicorn.run()` in `serve_logs()`, as 
uvicorn's message suggests.
   >
   >### Operating System
   >
   >macOS 26.7.4 (arm64)
   >
   >### Deployment
   >
   >Virtualenv installation
   >
   >### Apache Airflow Provider(s)
   >
   >_No response_
   >
   >### Versions of Apache Airflow Providers
   >
   >Not relevant (airflow-core). uvicorn 0.54.0 from the 3.4.0 constraints.
   >
   >### Official Helm Chart version
   >
   >Not Applicable
   >
   >### Kubernetes Version
   >
   >Not Applicable
   >
   >### Helm Chart configuration
   >
   >Not Applicable
   >
   >### Docker Image customizations
   >
   >Not Applicable
   >
   >### Anything else?
   >
   >It happens on every start of the scheduler and the triggerer.
   >
   >### Are you willing to submit PR?
   >
   >- [ ] Yes I am willing to submit a PR!
   >
   >### Code of Conduct
   >
   >- [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   >
   >
   >-- 
   >Reply to this email directly or view it on GitHub:
   >https://github.com/apache/airflow/issues/77806
   >You are receiving this because you are subscribed to this thread.
   >
   >Message ID: ***@***.***>


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