ecs-deplojo
ecs-deplojo copied to clipboard
Status of deployment invalid
This part:
for deployment in service['deployments']:
if deployment.get('status') != 'PRIMARY':
continue
desired = deployment['desiredCount']
pending = deployment['pendingCount']
running = deployment['runningCount']
return '%s (%s/%s)' % (name, pending + running, desired)
return name
Often a deployment is primary and has a running count of 2 when the desired count is also 2 (more or less also occurs). In this scenario tasks in other non-primary deployments are draining.
Maybe we should determine when the primary deployment has reached it's desired count (when running counts matches), that the deployment is waiting until other tasks are drained.
With this scenario you probably prevent staring at log outputs were it says 'Web (2/2)' for some time, where people expect the deployment 'should' already be completed (but it's not, since tasks are draining).
Agree?