You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/02 17:50:15 UTC

[GitHub] [airflow] diogobaeder opened a new issue, #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

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-unsubscribe@airflow.apache.org.apache.org

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


[GitHub] [airflow] potiuk commented on issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24120:
URL: https://github.com/apache/airflow/issues/24120#issuecomment-1145363374

   Also this in config guide ("New in version 2.3.0")
   
   <img width="1312" alt="Screenshot 2022-06-02 at 23 32 18" src="https://user-images.githubusercontent.com/595491/171742015-3504bee6-0f30-40f0-a7ab-d00368815105.png">
   
   


-- 
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-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24120:
URL: https://github.com/apache/airflow/issues/24120#issuecomment-1145361375

   AIRFLOW__DATABASE__SQL_ALCHEMY_CONN is only available in Airlfow 2.3. 


-- 
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-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] boring-cyborg[bot] commented on issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #24120:
URL: https://github.com/apache/airflow/issues/24120#issuecomment-1145142843

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24120:
URL: https://github.com/apache/airflow/issues/24120#issuecomment-1145362345

   See https://airflow.apache.org/docs/apache-airflow/2.2.5/configurations-ref.html for 2.2.5 configuration details.


-- 
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-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] diogobaeder commented on issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

Posted by GitBox <gi...@apache.org>.
diogobaeder commented on issue #24120:
URL: https://github.com/apache/airflow/issues/24120#issuecomment-1146091466

   Thanks man, using `AIRFLOW__CORE__SQL_ALCHEMY_CONN` in 2.2.x worked like a charm. Cheers!


-- 
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-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk closed issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #24120: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN env var not honored
URL: https://github.com/apache/airflow/issues/24120


-- 
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-unsubscribe@airflow.apache.org

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