You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/09 00:29:18 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #18088: Make next_dagrun_info take a data interval

uranusjr commented on a change in pull request #18088:
URL: https://github.com/apache/airflow/pull/18088#discussion_r704863788



##########
File path: airflow/providers/google/cloud/operators/gcs.py
##########
@@ -793,14 +793,8 @@ def __init__(
 
     def execute(self, context: dict) -> None:
         # Define intervals and prefixes.
-        timespan_start = context["execution_date"]
-        timespan_end = context["dag"].following_schedule(timespan_start)
-        if timespan_end is None:
-            self.log.warning("No following schedule found, setting timespan end to max %s", timespan_end)
-            timespan_end = datetime.datetime.max
-
-        timespan_start = timespan_start.replace(tzinfo=timezone.utc)
-        timespan_end = timespan_end.replace(tzinfo=timezone.utc)
+        timespan_start = context["data_interval_start"].in_timezone(timezone.utc)
+        timespan_end = context["data_interval_end"].in_timezone(timezone.utc)

Review comment:
       You’re right, I’ll add some compatibility code here.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org