mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
UpdateService with a new taskDefinition recorded a deployment but left the running tasks on the old revision forever: a redeploy (new image tag, new environment) never reached the containers, and the only way to apply it was to StopTask by hand so the reconciler relaunched. The reconciler now counts only tasks on the service's current task definition towards desiredCount, so replacements start first, and when the service is over desiredCount it drains the stale tasks before anything else — the shape of AWS's rolling deployment with the ECS deployment controller. Stopped reason names the replaced task definition. The service pins the resolved task-definition ARN on CreateService and UpdateService (AWS stores and reports the ARN), so a family or family:revision reference compares exactly with each task's taskDefinitionArn; a service persisted with a raw reference is pinned on its first reconciler tick. Co-authored-by: Hisham Mohammed <hisham.ma.mohammed@gmail.com>