From 3f2358eada3a593147bcf2aec5ed3422816ad581 Mon Sep 17 00:00:00 2001 From: Simon Westphahl Date: Wed, 9 Apr 2025 13:02:50 +0200 Subject: [PATCH] Capitalize AWS image filter key/value arguments ERROR zuul.Launcher: [e: ...] [req: ...] Marking node as failed Traceback (most recent call last): [ ... some output omitted ...] File "/opt/zuul/lib/python3.11/site-packages/zuul/driver/aws/awsendpoint.py", line 1285, in _getLatestImageIdByFilters res = list(self.ec2_client.describe_images( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/zuul/lib/python3.11/site-packages/botocore/client.py", line 570, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/zuul/lib/python3.11/site-packages/botocore/context.py", line 124, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/zuul/lib/python3.11/site-packages/botocore/client.py", line 988, in _make_api_call request_dict = self._convert_to_request_dict( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/zuul/lib/python3.11/site-packages/botocore/client.py", line 1055, in _convert_to_request_dict request_dict = self._serializer.serialize_to_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/zuul/lib/python3.11/site-packages/botocore/validate.py", line 381, in serialize_to_request raise ParamValidationError(report=report.generate_report()) botocore.exceptions.ParamValidationError: Parameter validation failed: Unknown parameter in Filters[0]: "name", must be one of: Name, Values Unknown parameter in Filters[0]: "values", must be one of: Name, Values Change-Id: Ic6d9b1eb253a68299446e5b75a684f2039a685ae --- zuul/driver/aws/awsendpoint.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zuul/driver/aws/awsendpoint.py b/zuul/driver/aws/awsendpoint.py index 7df530cbe8..0cfe0973a7 100644 --- a/zuul/driver/aws/awsendpoint.py +++ b/zuul/driver/aws/awsendpoint.py @@ -1284,7 +1284,10 @@ class AwsProviderEndpoint(BaseProviderEndpoint): with self.non_mutating_rate_limiter: res = list(self.ec2_client.describe_images( - Filters=image_filters + Filters=[ + {k.capitalize(): v for k, v in fltr.items()} + for fltr in image_filters + ] ).get("Images")) images = sorted(