uranusjr commented on code in PR #43902:
URL: https://github.com/apache/airflow/pull/43902#discussion_r1839367563
##########
providers/src/airflow/providers/google/cloud/sensors/gcs.py:
##########
@@ -179,16 +183,21 @@ def ts_function(context):
Act as a default callback for the GoogleCloudStorageObjectUpdatedSensor.
The default behaviour is check for the object being updated after the data
interval's end,
- or execution_date + interval on Airflow versions prior to 2.2 (before
AIP-39 implementation).
+ or logical_date + interval on Airflow versions prior to 2.2 (before AIP-39
implementation).
"""
try:
return context["data_interval_end"]
except KeyError:
from airflow.utils import timezone
- data_interval = context["dag"].infer_automated_data_interval(
- timezone.coerce_datetime(context["execution_date"])
- )
+ if AIRFLOW_V_3_0_PLUS:
+ data_interval = context["dag"].infer_automated_data_interval(
+ timezone.coerce_datetime(context["logical_date"])
+ )
+ else:
+ data_interval = context["dag"].infer_automated_data_interval(
+ timezone.coerce_datetime(context["execution_date"])
+ )
Review Comment:
Weird… `logical_date` should be available since Airflow 2.3. I’ll take a
look at this.
https://github.com/apache/airflow/commit/25a50bb1fbf0e228706c7927cb36570921881adb
--
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]