You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Eric Chang (JIRA)" <ji...@apache.org> on 2018/09/24 23:38:00 UTC

[jira] [Created] (AIRFLOW-3111) Confusing comments and instructions for log templates in UPDATING.md and default_airflow.cfg

Eric Chang created AIRFLOW-3111:
-----------------------------------

             Summary: Confusing comments and instructions for log templates in UPDATING.md and default_airflow.cfg
                 Key: AIRFLOW-3111
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3111
             Project: Apache Airflow
          Issue Type: Bug
            Reporter: Eric Chang
            Assignee: Eric Chang


The new 1.10 release includes instructions on updating the *airflow.cfg* options core.log_filename_template and elasticsearch.elasticsearch_log_id_template that are technically incorrect:

 
{code:java}
// UPDATING.md

...the following defaults need to be added.

[core]
log_filename_template = {{{{ ti.dag_id }}}}/{{{{ ti.task_id }}}}/{{{{ ts }}}}/{{{{ try_number }}}}.log

[elasticsearch]
elasticsearch_log_id_template = {{dag_id}}-{{task_id}}-{{execution_date}}-{{try_number}}{code}
 

Inserting the above options into an existing *airflow.cfg* will result in a jinja parse failure because `{{{{` is not a valid template string. The reason the extra braces are necessary is because the default *airflow.cfg* copied to AIRFLOW_HOME is a rendered version of *default_airflow.cfg* (rendered by *airflow.configuration.parameterized_config*).

The confusion is compounded by several comments copied over to *airflow.cfg* stating that

 
{code:java}
# we need to escape the curly braces by adding an additional curly brace
{code}
But that's is only true for *default_airflow.cfg* and doesn't apply to the actual *airflow.cfg*.

I'll submit a PR that corrects this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)