o-nikolas commented on code in PR #73870:
URL: https://github.com/apache/airflow/pull/73870#discussion_r4138734040
##########
providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:
##########
@@ -134,6 +140,8 @@ def wait(
break
attempt += 1
else:
+ if all_attempts_no_credentials:
+ raise WaiterNoCredentialsError("Waiter error: max attempts reached
due to missing credentials")
Review Comment:
Maybe save the last no credentials exception so that you can include it in
this message so that users have the actual error boto is raising for diagnosis.
Same for the async version.
##########
providers/amazon/src/airflow/providers/amazon/aws/exceptions.py:
##########
@@ -125,3 +125,7 @@ def __reduce__(self):
class WaiterMaxAttemptsError(AirflowException):
"""Raised when an AWS waiter exhausts its configured attempts."""
+
+
+class WaiterNoCredentialsError(AirflowException):
Review Comment:
Previously consumers would be expecting `WaiterMaxAttemptsError` maybe base
this exception off that one? Otherwise I think you're going to get some
undefined behaviour if you haven't gone through all the consumers of this to
see how they handle a new exception being raised. This will be a behaviour
change.
--
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]