You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "George Leslie-Waksman (JIRA)" <ji...@apache.org> on 2016/11/01 18:50:58 UTC
[jira] [Comment Edited] (AIRFLOW-610) Configuration parsing order
doesn't work properly.
[ https://issues.apache.org/jira/browse/AIRFLOW-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15626310#comment-15626310 ]
George Leslie-Waksman edited comment on AIRFLOW-610 at 11/1/16 6:49 PM:
------------------------------------------------------------------------
Can you please provide more details around what is NOT working.
For me, in master, trying the following seems to work just fine:
{code}
from airflow import configuration
configuration.conf.remove_option('core', 'sql_alchemy_conn')
configuration.conf.set('core', 'sql_alchemy_conn_cmd', 'echo foo bar baz')
configuration.get('core', 'sql_alchemy_conn') # returns b'foo bar baz\n'
{code}
was (Author: gwax):
Can you please provide more details around what is NOT working.
For me, in master, trying the following seems to work just fine:
{code:python}
from airflow import configuration
configuration.conf.remove_option('core', 'sql_alchemy_conn')
configuration.conf.set('core', 'sql_alchemy_conn_cmd', 'echo foo bar baz')
configuration.get('core', 'sql_alchemy_conn') # returns b'foo bar baz\n'
{code}
> Configuration parsing order doesn't work properly.
> --------------------------------------------------
>
> Key: AIRFLOW-610
> URL: https://issues.apache.org/jira/browse/AIRFLOW-610
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Yongjun Park
> Assignee: Yongjun Park
>
> I'm testing Airflow using master branch, precisely 527e3ec.
> Documents says configuration is evaluated following order.
> # environment variable
> # configuration in airflow.cfg
> # command in airflow.cfg
> # default
> However, it can't recognize *_cmd* options.
> I added *sql_alchemy_conn_cmd* option. but it printed error below:
> {code}
> Traceback (most recent call last):
> File "/usr/local/bin/airflow", line 6, in <module>
> exec(compile(open(__file__).read(), __file__, 'exec'))
> File "/usr/local/airflow/airflow/bin/airflow", line 17, in <module>
> from airflow import configuration
> File "/home/airflow/airflow/__init__.py", line 30, in <module>
> from airflow import configuration as conf
> File "/home/airflow/airflow/configuration.py", line 733, in <module>
> conf.read(AIRFLOW_CONFIG)
> File "/home/airflow/airflow/configuration.py", line 585, in read
> self._validate()
> File "/home/airflow/airflow/configuration.py", line 497, in _validate
> self.get('core', 'executor')))
> {code}
> I think it is affected by DEFAULT configuration. It should be changed evaluation order as document's saying.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)