Closed zbentzinger closed 2 years ago
Thanks for opening your first issue here! Be sure to follow the issue template!
# Copy over our Airflow DAGs and config
COPY --chown=airflow:root ./wait-for-it.sh /usr/local/bin
COPY --chown=airflow:root ./airflow /opt/airflow/
apache-airflow-spike-web-1 | File "/opt/airflow/webserver_config.py", line 30, in <module>
apache-airflow-spike-web-1 | SQLALCHEMY_DATABASE_URI = conf.get('core', 'SQL_ALCHEMY_CONN')
Change in your webserver_config.py
in line 30 _conf.get('core', 'SQL_ALCHEMYCONN') -> _conf.get('database', 'sql_alchemyconn')
Confirmed, this fixed my issue - thank you! I forgot that on airflow's first run it generates webserver_config.py. Removed that file and it regenerated on next run and issue is fixed; was still using the old Airflow 1.10 version.
Apache Airflow version
2.3.2 (latest released)
What happened
When configuration of database.sql_alchemy_conn value is set via environment variable
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
, runningairflow webserver
raisesairflow.exceptions.AirflowConfigException: section/key [core/sql_alchemy_conn] not found in config exception
Workaround is to export the variable as:
AIRFLOW__CORE__SQL_ALCHEMY_CONN
, which only raises a warning:What you think should happen instead
Should not raise this error as the configuration is being provided by environment instead of airflow.cfg.
How to reproduce
Dockerfile:
requirements.txt:
docker-compose yaml:
airflow.cfg:
Recreation Steps:
Workaround is to export the variable as:
AIRFLOW__CORE__SQL_ALCHEMY_CONN
, which only raises a DeprecatedWarning:Operating System
MacOS 12.4
Versions of Apache Airflow Providers
Deployment
Other Docker-based deployment
Deployment details
Extended image, to be able to pip install a custom requirements.txt file.
Anything else
Am in the process of upgrading our deployment from Airflow 1.10.* to 2.3.2. Issue is not present on Airflow 1.10.15.
Are you willing to submit PR?
Code of Conduct