You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by je...@apache.org on 2021/10/24 16:06:06 UTC
[airflow] 04/11: Crerate TI context with data interval compat layer
(#19148)
This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 6c6017dc87629efd5332a11786749da9c78ecbcf
Author: Tzu-ping Chung <tp...@astronomer.io>
AuthorDate: Fri Oct 22 14:50:22 2021 +0800
Crerate TI context with data interval compat layer (#19148)
(cherry picked from commit 1159133040b3513bcc88921823fa001e9773276d)
---
airflow/models/taskinstance.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py
index 71ab107..a9f30dc 100644
--- a/airflow/models/taskinstance.py
+++ b/airflow/models/taskinstance.py
@@ -1778,6 +1778,7 @@ class TaskInstance(Base, LoggingMixin):
integrate_macros_plugins()
dag_run = self.get_dagrun(session)
+ data_interval = dag.get_run_data_interval(dag_run)
params = ParamsDict(suppress_exception=ignore_param_exceptions)
@@ -1998,8 +1999,8 @@ class TaskInstance(Base, LoggingMixin):
'conf': conf,
'dag': dag,
'dag_run': dag_run,
- 'data_interval_end': timezone.coerce_datetime(dag_run.data_interval_end),
- 'data_interval_start': timezone.coerce_datetime(dag_run.data_interval_start),
+ 'data_interval_end': timezone.coerce_datetime(data_interval.end),
+ 'data_interval_start': timezone.coerce_datetime(data_interval.start),
'ds': ds,
'ds_nodash': ds_nodash,
'execution_date': deprecated_proxy(