This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 562d11e9b57 Fix Cloud Composer system test external task sensors 
(#74786)
562d11e9b57 is described below

commit 562d11e9b57235e0e0fc9195ec2d27d0485f5392
Author: olegkachur-e <[email protected]>
AuthorDate: Thu Nov 19 07:31:51 2026 +0100

    Fix Cloud Composer system test external task sensors (#74786)
    
    Revert the execution_range change from #72194: timedelta(days=1) is
    relative to the logical date, so the sensors never find the
    airflow_monitoring runs and wait until timeout. execution_range is not
    a template field, so datetime.now() does not change the Dag version.
---
 .../tests/system/google/cloud/composer/example_cloud_composer.py    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/providers/google/tests/system/google/cloud/composer/example_cloud_composer.py 
b/providers/google/tests/system/google/cloud/composer/example_cloud_composer.py
index 5b73858068e..9060faa63ac 100644
--- 
a/providers/google/tests/system/google/cloud/composer/example_cloud_composer.py
+++ 
b/providers/google/tests/system/google/cloud/composer/example_cloud_composer.py
@@ -19,7 +19,7 @@ from __future__ import annotations
 
 import logging
 import os
-from datetime import datetime, timedelta
+from datetime import UTC, datetime, timedelta
 from typing import Any
 
 from google.api_core.exceptions import NotFound
@@ -310,7 +310,7 @@ with DAG(
         composer_external_dag_id="airflow_monitoring",
         composer_external_task_id="echo",
         allowed_states=["success"],
-        execution_range=timedelta(days=1),
+        execution_range=[datetime.now(tz=UTC) - timedelta(days=1), 
datetime.now(tz=UTC) + timedelta(days=1)],
     )
     # [END howto_sensor_external_task]
 
@@ -323,7 +323,7 @@ with DAG(
         composer_external_dag_id="airflow_monitoring",
         composer_external_task_id="echo",
         allowed_states=["success"],
-        execution_range=timedelta(days=1),
+        execution_range=[datetime.now(tz=UTC) - timedelta(days=1), 
datetime.now(tz=UTC) + timedelta(days=1)],
         deferrable=True,
     )
     # [END howto_sensor_external_task_deferrable_mode]

Reply via email to