waiter = ecs_client.get_waiter("services_stable")
waiter.wait(cluster=cluster, services=[service])
"In function length(), invalid type for value: None, expected one of: ['string', 'array', 'object'], received: \"null\""
"errorMessage": "In function length(), invalid type for value: None, expected one of: ['string', 'array', 'object'], received: \"null\"",
"errorType": "JMESPathTypeError",
"requestId": "94d7b720-8490-4577-9ce7-93b19726c814",
"stackTrace": [
REDACTED
" File \"/var/lang/lib/python3.11/site-packages/botocore/waiter.py\", line 55, in wait\n Waiter.wait(self, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/botocore/waiter.py\", line 348, in wait\n if acceptor.matcher_func(response):\n",
" File \"/var/lang/lib/python3.11/site-packages/botocore/waiter.py\", line 229, in acceptor_matches\n return expression.search(response) == expected\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/parser.py\", line 509, in search\n result = interpreter.visit(self.parsed, value)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 145, in visit_comparator\n self.visit(node['children'][0], value),\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 169, in visit_function_expression\n current = self.visit(child, value)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 180, in visit_filter_projection\n if self._is_true(self.visit(comparator_node, element)):\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 259, in visit_not_expression\n original_result = self.visit(node['children'][0], value)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 253, in visit_and_expression\n matched = self.visit(node['children'][0], value)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 145, in visit_comparator\n self.visit(node['children'][0], value),\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 94, in visit\n return method(node, *args, **kwargs)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/visitor.py\", line 171, in visit_function_expression\n return self._functions.call_function(node['value'], resolved_args)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/functions.py\", line 80, in call_function\n self._validate_arguments(resolved_args, signature, function_name)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/functions.py\", line 91, in _validate_arguments\n return self._type_check(args, signature, function_name)\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/functions.py\", line 97, in _type_check\n self._type_check_single(actual[i], allowed_types,\n",
" File \"/var/lang/lib/python3.11/site-packages/jmespath/functions.py\", line 111, in _type_check_single\n raise exceptions.JMESPathTypeError(\n"
]
I'm unsure what causes a service to not have the deployments element, the service is deployed using CodeDeploy's Blue/Green deployment
Describe the bug
The ServicesStable waiter in Boto3 fails for some services with the following error message
This appears to happen when the
services[*].deploymentselement is absent from the DescribeServices responseRegression Issue
Expected Behavior
The waiter should wait until the services are stable, and not throw an error
Current Behavior
Reproduction Steps
I'm unsure what causes a service to not have the deployments element, the service is deployed using CodeDeploy's Blue/Green deployment
Possible Solution
No response
Additional Information/Context
I believe the line causing the issue is here but I'm unsure what it's trying to achieve by checking deployments
SDK version used
1.35.45
Environment details (OS name and version, etc.)
AWS Lambda, Python 3.11 Runtime