This is an automated email from the ASF dual-hosted git repository.
vincbeck 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 b392f66c42 Set `EcsRunTaskOperator` default waiter duration to 70 days
(#34928)
b392f66c42 is described below
commit b392f66c424fc3b8cbc957e02c67847409551cab
Author: Mike Mwanje <[email protected]>
AuthorDate: Mon Oct 16 22:27:18 2023 +0200
Set `EcsRunTaskOperator` default waiter duration to 70 days (#34928)
---
airflow/providers/amazon/aws/operators/ecs.py | 4 ++--
tests/providers/amazon/aws/operators/test_ecs.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/airflow/providers/amazon/aws/operators/ecs.py
b/airflow/providers/amazon/aws/operators/ecs.py
index ad500db40a..7d5d1d0583 100644
--- a/airflow/providers/amazon/aws/operators/ecs.py
+++ b/airflow/providers/amazon/aws/operators/ecs.py
@@ -475,8 +475,8 @@ class EcsRunTaskOperator(EcsBaseOperator):
number_logs_exception: int = 10,
wait_for_completion: bool = True,
waiter_delay: int = 6,
- waiter_max_attempts: int = 1000000 * 365 * 24 * 60 * 10,
- # Set the default waiter duration to 1M years (attempts*delay)
+ waiter_max_attempts: int = 1000000,
+ # Set the default waiter duration to 70 days (attempts*delay)
# Airflow execution_timeout handles task timeout
deferrable: bool = conf.getboolean("operators", "default_deferrable",
fallback=False),
**kwargs,
diff --git a/tests/providers/amazon/aws/operators/test_ecs.py
b/tests/providers/amazon/aws/operators/test_ecs.py
index c3a33ab47f..ba00407844 100644
--- a/tests/providers/amazon/aws/operators/test_ecs.py
+++ b/tests/providers/amazon/aws/operators/test_ecs.py
@@ -347,7 +347,7 @@ class TestEcsRunTaskOperator(EcsBaseTestCase):
self.ecs._wait_for_task_ended()
client_mock.get_waiter.assert_called_once_with("tasks_stopped")
client_mock.get_waiter.return_value.wait.assert_called_once_with(
- cluster="c", tasks=["arn"], WaiterConfig={"Delay": 6,
"MaxAttempts": 1000000 * 365 * 24 * 60 * 10}
+ cluster="c", tasks=["arn"], WaiterConfig={"Delay": 6,
"MaxAttempts": 1000000}
)
@mock.patch.object(EcsBaseOperator, "client")