ecs-deploy icon indicating copy to clipboard operation
ecs-deploy copied to clipboard

Make deploys work when > 100 containers

Open awinder opened this issue 6 years ago • 1 comments

We ran into a problem over at @sparkpost with AWS ECS where AWS' API was returning nextPage tokens that were invalid, and this affected us downstream with ecs-deploy because the list-tasks command failed on a service we run with over 100 container instances. But looking more into the code, I realized that the later call:

$AWS_ECS describe-tasks --cluster "$CLUSTER" --tasks $RUNNING_TASKS

would fail with this service because that --tasks command can take 100 container IDs max. So ecs-deploy seemingly cannot work for ECS services with > 100 container instances.

This PR refactors the logic somewhat substantially, but there's a way to call into the describe-service command and pull the status of deployments, ensure that the new service successfully launched all containers, and then ensure that there is only 1 active deploy left. I think this logic mirrors the original logic, but since it only calls the describe-service API, I think this will be gentler on AWS services as well as having a narrow surface area for errors on AWS' end. And it'll also work for larger fleets of container instances 😀

awinder avatar Feb 11 '19 23:02 awinder

@fillup I don't know why this problem is still not merged. In order to use ecs-deploy even when operating heavy infrastructure, it must be merged. Please review.

jybaek avatar Apr 23 '21 10:04 jybaek

Given the age of this PR and that it has conflicts, I'm going to close it out. If you still want to pursue this, please submit a new PR based on the latest code.

devon-sil avatar Jan 23 '24 16:01 devon-sil