uranusjr commented on code in PR #46460:
URL: https://github.com/apache/airflow/pull/46460#discussion_r1952282227


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -174,6 +166,20 @@ def get_template_context(self) -> Context:
             }
             context.update(context_from_server)
 
+            if dag_run.data_interval_start and dag_run.data_interval_end:
+                context.update(
+                    {
+                        "data_interval_end": dag_run.data_interval_end,
+                        "data_interval_start": dag_run.data_interval_start,
+                        "prev_data_interval_start_success": 
lazy_object_proxy.Proxy(
+                            lambda: 
get_previous_dagrun_success(self.id).data_interval_start
+                        ),
+                        "prev_data_interval_end_success": 
lazy_object_proxy.Proxy(
+                            lambda: 
get_previous_dagrun_success(self.id).data_interval_end
+                        ),

Review Comment:
   Doesn’t really matter (because data interval and logical date are always 
None together), but these logically should go under the `if logical_date` block 
instead.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to