You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jeremiah Lowin (JIRA)" <ji...@apache.org> on 2017/02/26 03:19:44 UTC

[jira] [Created] (AIRFLOW-915) Allow task context to be modified by pre_execute hook

Jeremiah Lowin created AIRFLOW-915:
--------------------------------------

             Summary: Allow task context to be modified by pre_execute hook
                 Key: AIRFLOW-915
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-915
             Project: Apache Airflow
          Issue Type: Improvement
          Components: operators
    Affects Versions: 1.8.0
            Reporter: Jeremiah Lowin
            Priority: Minor


Currently, Operators do two things that prevent the pre_execute hook from modifying the jinja context:

1. the Operator templates are rendered immediately BEFORE calling pre_execute
2. even though a context was already generated for the operator, the context is regenerated for template rendering, meaning that modifications to the operator context wouldn't matter anyway.

The proper course of events should be:
1. generate operator context
2. pass context to pre_execute where it could (potentially) be modified
3. use that context to render operator templates



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)