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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]