diogobaeder opened a new issue, #24120:
URL: https://github.com/apache/airflow/issues/24120

   ### Apache Airflow version
   
   2.2.5
   
   ### What happened
   
   Even if I set `AIRFLOW__DATABASE__SQL_ALCHEMY_CONN` to connect to 
PostgreSQL, and `AIRFLOW__DATABASE__LOAD_DEFAULT_CONNECTIONS` to `"False"`, 
Airflow still forces the database connection to be set to SQLite file in my 
`AIRFLOW_HOME` - which is super odd because the home folder is being honored, 
just not the `AIRFLOW__DATABASE__SQL_ALCHEMY_CONN` env var.
   
   ### What you think should happen instead
   
   The `AIRFLOW__DATABASE__SQL_ALCHEMY_CONN` env var should be picked up by 
Airflow, consider it's `"postgresql+psycopg2://***"` as I set it to be, and 
create the database in PG and not SQLite.
   
   ### How to reproduce
   
   1. Create a database in PostgreSQL
   2. Set the URI for that database for SQLAlchemy (starting with 
`"postgresql+psycopg2://"`) and assign it to the 
`AIRFLOW__DATABASE__SQL_ALCHEMY_CONN` env var
   3. Either run `airflow info` or `airflow db init`
   4. Take a look at where the database was created/populated
   
   ### Operating System
   
   Arch Linux
   
   ### Versions of Apache Airflow Providers
   
   ```
   apache-airflow-providers-ftp    | 2.1.2
   apache-airflow-providers-http   | 2.1.2
   apache-airflow-providers-imap   | 2.2.3
   apache-airflow-providers-sqlite | 2.1.3
   ```
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   I'm actually running Airflow through Poetry, so inside a virtualenv 
controlled by it.
   
   ### Anything else
   
   The `AIRFLOW__CORE__DAGS_FOLDER` env var is being picked up correctly by 
Airflow, just `AIRFLOW__DATABASE__SQL_ALCHEMY_CONN` isn't.
   
   ### 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)
   


-- 
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: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to