Skip to content

Fix ECS ServicesStable waiter when deployments key is absent#3632

Open
veeceey wants to merge 1 commit intoboto:developfrom
veeceey:fix/issue-3314-ecs-waiter
Open

Fix ECS ServicesStable waiter when deployments key is absent#3632
veeceey wants to merge 1 commit intoboto:developfrom
veeceey:fix/issue-3314-ecs-waiter

Conversation

@veeceey
Copy link
Copy Markdown

@veeceey veeceey commented Feb 13, 2026

Fixes #3314

The ServicesStable waiter crashes with a JMESPathTypeError when the
DescribeServices response doesn't include a deployments field for a
service. This can happen when a service is deployed using CodeDeploy's
Blue/Green deployment strategy.

The root cause is the JMESPath expression length(deployments) receiving
null when the key is absent. I've changed it to length(deployments || [])
so it falls back to an empty array. A service without deployments will have
length 0 (not 1), so it's correctly treated as not yet stable and the waiter
retries instead of blowing up.

Testing

Added functional tests in tests/functional/test_ecs.py covering:

  • Service response with missing deployments key (previously crashed, now retries)
  • Service response with deployments present and stable (succeeds as before)

All existing waiter config lint tests continue to pass (tests/functional/test_waiter_config.py — 148 tests).

@veeceey
Copy link
Copy Markdown
Author

veeceey commented Feb 19, 2026

Friendly ping - any chance someone could take a look at this when they get a chance? Happy to make any changes if needed.

When a service is deployed using CodeDeploy Blue/Green, the DescribeServices response may not include a `deployments` field. The `length(deployments)` call in the JMESPath expression then receives null, causing a JMESPathTypeError. Use `deployments || `[]`` to default to an empty array when the field is absent, so `length()` always receives a valid input. A service without deployments will have length 0 (not equal to 1), so it is correctly treated as not yet stable. Fixes boto#3314
@veeceey veeceey force-pushed the fix/issue-3314-ecs-waiter branch from 1bcfc27 to 1be7648 Compare February 23, 2026 01:58
@veeceey
Copy link
Copy Markdown
Author

veeceey commented Mar 10, 2026

hi there, just following up — let me know if I should make any changes on this

@SamRemis
Copy link
Copy Markdown
Contributor

SamRemis commented Mar 10, 2026

Hi @veeceey,

Thank you for your PR. We explain a bit more in our contribution guide, but all of the files in the data folder aren't able to be edited directly in botocore. These files are owned by the service team and submitted to all SDKs, not just botocore.

@adev-code , could you take a look at this and contact the service team so we can get this confirmed and fixed upstream?

@RyanFitzSimmonsAK
Copy link
Copy Markdown
Contributor

I've raised this issue to the service team for them to address upstream.

Ticket # for internal use : P397024257

@veeceey
Copy link
Copy Markdown
Author

veeceey commented Mar 12, 2026

Thanks @SamRemis and @RyanFitzSimmonsAK — appreciate you flagging this to the service team. Makes total sense that the data files are generated upstream. I'll keep an eye on the ticket and happy to help if there's anything else needed on this end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants