This is an automated email from the ASF dual-hosted git repository.
onikolas 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 b67a4f78e5 Update ECS executor healthcheck with a catchall except
(#35512)
b67a4f78e5 is described below
commit b67a4f78e57a85ce2891e72edcc760285cefad35
Author: Niko Oliveira <[email protected]>
AuthorDate: Tue Nov 7 12:59:04 2023 -0800
Update ECS executor healthcheck with a catchall except (#35512)
Previously only ClientError was being caught. However, there are cases
where Botocore (or perhaps other) exceptions can be thrown. Add a
catchall except Exception to catch these cases.
---
airflow/providers/amazon/aws/executors/ecs/ecs_executor.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py
b/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py
index 5d5bef6b87..afad23f387 100644
--- a/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py
+++ b/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py
@@ -145,6 +145,9 @@ class AwsEcsExecutor(BaseExecutor):
else:
# Catch all for unexpected failures
status = f"failed because: {error_message}. "
+ except Exception as e:
+ # Any non-ClientError exceptions. This can include Botocore
exceptions for example
+ status = f"failed because: {e}. "
finally:
msg_prefix = "ECS Executor health check has %s"
if status == success_status: