GitHub user starkmarkus added a comment to the discussion: Airflow cli response 
times

Thanks for clarifying, that makes sense. If 
`AIRFLOW__DATABASE__SQL_ALCHEMY_CONN` was deliberately set to an empty string, 
then the traceback is a useful sanity check that the CLI reads and parses 
config during startup, but it does not mean Airflow is actually attempting a 
database connection.

So I agree with your updated interpretation. Even for `airflow --help`, Airflow 
seems to import and initialize a fair amount before it reaches the specific CLI 
action, so the remaining question is how much of the observed time is normal 
startup and import overhead versus environment-specific overhead.

For comparison, it would be useful if people reported the exact setup together 
with the timing, for example:

```bash
docker run --rm -it --entrypoint=bash docker.io/apache/airflow:3.2.2
time airflow --help
```

and maybe also:

```bash
python -V
python -X importtime -m airflow --help 2> importtime.log
```

The second command might help identify whether the time is mostly Python import 
overhead, provider discovery, filesystem or I/O latency, or something else in 
the initialization path.

So I would summarize it as:

- the empty `sql_alchemy_conn` traceback is expected from the deliberate 
invalid config test
- it does not show that `--help` connects to the database
- but it does show that Airflow initializes configuration early
- the remaining performance question is whether 4 to 8 seconds for `airflow 
--help` is normal for the 3.2.2 container image or specific to the test 
environment

GitHub link: 
https://github.com/apache/airflow/discussions/68707#discussioncomment-17391575

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to