You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (Jira)" <ji...@apache.org> on 2019/11/14 10:14:00 UTC
[jira] [Commented] (AIRFLOW-2572) Airflow /admin/configurationview/
Running Configuration not accurate
[ https://issues.apache.org/jira/browse/AIRFLOW-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974119#comment-16974119 ]
jack commented on AIRFLOW-2572:
-------------------------------
[~joejasinski] can you recheck this with newer version of Airflow?
> Airflow /admin/configurationview/ Running Configuration not accurate
> --------------------------------------------------------------------
>
> Key: AIRFLOW-2572
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2572
> Project: Apache Airflow
> Issue Type: Bug
> Affects Versions: 1.10.0
> Environment: Debian 8 (in a Docker container)
> Reporter: Joe Jasinski
> Priority: Minor
>
> The admin Runtime Configuration section of /admin/configurationview/ is showing config settings from the config file but not the environment variables set.
> When that page renders, this loop is called, which uses the config.as_dict() method:
> https://github.com/apache/incubator-airflow/blob/master/airflow/www/views.py#L2868
> The conf.as_dict() method doesn't properly read in from the environment variables. In the example below, see how we can get the expected value from conf.get() but not from conf.as_dict(). I think it has to do with the implementation of as_dict()
> export AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:****@postgres:5432/airflow
> >>> from airflow import configuration as conf
> >>> import os
> >>> os.environ["AIRFLOW__CORE__SQL_ALCHEMY_CONN"]
> 'postgresql+psycopg2://airflow:****@postgres:5432/airflow'
> >>> dict(conf.as_dict(True, True))['core']['sql_alchemy_conn']
> ('sqlite:////usr/local/airflow/airflow/airflow.db', 'bash cmd')
> >>> conf.get('core', 'sql_alchemy_conn')
> 'postgresql+psycopg2://airflow:****@postgres:5432/airflow'
--
This message was sent by Atlassian Jira
(v8.3.4#803005)