[
https://issues.apache.org/jira/browse/AIRFLOW-4490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17052491#comment-17052491
]
ASF GitHub Bot commented on AIRFLOW-4490:
-----------------------------------------
stale[bot] commented on pull request #5388: [AIRFLOW-4490] DagRun.conf should
return empty dictionary by default
URL: https://github.com/apache/airflow/pull/5388
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> dag_run.conf should be an empty dictionary by default
> -----------------------------------------------------
>
> Key: AIRFLOW-4490
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4490
> Project: Apache Airflow
> Issue Type: Improvement
> Components: DagRun
> Reporter: Omer Yampel
> Assignee: Omer Yampel
> Priority: Trivial
>
> Currently, if no conf is provided when running a dag, the `dag_run.conf`
> instance is None.
> When a DAG might not always be triggered with a configuration, this leads to
> needing to handle an "empty" configuration like this :
> {code}
> {{ if dag_run.conf and dag_run.conf.get('value') and ... }}
> {code}
> If dag_run.conf was an empty dictionary by default, this could simply become:
> {code}
> {{ if dag_run.conf.get('key') and ....}}
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)