ashb commented on a change in pull request #18088:
URL: https://github.com/apache/airflow/pull/18088#discussion_r704505068
##########
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:
If we change the operator, then we will need to add a requirement of
`apache-airflow>=2.2` on this provider, otherwise it won't work.
In this case it might be easier to have the provider work with both new an
old versions of Airflow?
--
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]