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 2022/03/24 12:50:13 UTC

[GitHub] [airflow] lwyszomi commented on a change in pull request #22501: Remove coerce_datetime usage from GCSTimeSpanFileTransformOperator

lwyszomi commented on a change in pull request #22501:
URL: https://github.com/apache/airflow/pull/22501#discussion_r834271294



##########
File path: airflow/providers/google/cloud/operators/gcs.py
##########
@@ -740,19 +740,19 @@ def execute(self, context: "Context") -> List[str]:
         try:
             timespan_start = context["data_interval_start"]
             timespan_end = context["data_interval_end"]
-        except KeyError:  # Data interval context variables are only available in Airflow 2.2+
-            timespan_start = timezone.coerce_datetime(context["execution_date"])
-            timespan_end = timezone.coerce_datetime(context["dag"].following_schedule(timespan_start))
+        except KeyError:
+            timespan_start = context["execution_date"]

Review comment:
       @uranusjr I will convert to the `pendulum` object. but regarding `following_schedule` we checking if the result is `None`, what additional check you have in mind?




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