You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (Jira)" <ji...@apache.org> on 2020/01/08 09:22:00 UTC
[jira] [Resolved] (AIRFLOW-915) Allow task context to be modified
by pre_execute hook
[ https://issues.apache.org/jira/browse/AIRFLOW-915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ash Berlin-Taylor resolved AIRFLOW-915.
---------------------------------------
Fix Version/s: 1.10.7
Resolution: Fixed
I think this change that enables this was first included in 1.10.7 (it might be in 1.10.6)
> 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
> Assignee: Paul Rhodes
> Priority: Minor
> Fix For: 1.10.7
>
>
> 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
(v8.3.4#803005)