BasPH commented on code in PR #28827:
URL: https://github.com/apache/airflow/pull/28827#discussion_r1066381947
##########
airflow/providers/amazon/aws/utils/waiter.py:
##########
@@ -60,14 +60,20 @@ def waiter(
break
if state in failure_states:
raise AirflowException(f"{object_type.title()} reached failure
state {state}.")
- if countdown > check_interval_seconds:
- countdown -= check_interval_seconds
+
+ if countdown is None:
Review Comment:
Of course! Good one🙂
Small suggestion though, I think defaulting the waiter `countdown` to
infinity would be a better default. 25 minutes is such an arbitrary number,
plus there's already `task.execution_timeout` and I don't see the need for yet
another limit.
So instead of requiring a user to configure `countdown=float("inf")`, I
suggest leaving the default `None` and converting `None` to `float("inf")` just
before the while loop for convenience. Alternatively, we could allow types `int
| float` for `countdown` and default the value of `countdown` to `float("inf")`?
WDYT?
--
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]