aws/amazon-ecs-cli

Add support for deploymentCircuitBreaker arguments

icj217 opened this issue · 3 comments

Given the recent announcement of ECS circuit breakers, it would be nice if this option could be exposed on the ECS CLI, especially the ecs-cli compose up and ecs-cli compose service up commands.

This could be exposed via --deployment-circuit-breaker-enable and --deployment-circuit-breaker-rollback arguments, which would match the existing convention for other deployment-related arguments like --deployment-max-percent and --deployment-min-healthy-percent that the CLI already supports.

I started working on this here https://github.com/benjaminpottier/amazon-ecs-cli/tree/deployment-circuit-breaker ... I should mention that I’m not super familiar with Go.

I managed to get the deployment circuit breaker working, but the waiter logic obviously doesn't have any idea about the new deployment strategy.

I think the waiter would need to include a new WaitUntilServicesStableWithContext that waits for the "rolloutState" to be "COMPLETED" or "FAILED". I could be wrong here.

Instead I decided to check Deployments []*Deployment for the current "PRIMARY" deployment and then getting its "RolloutState". Once the RolloutState is "COMPLETED" or "FAILED" it returns. It also skips the running count timeout when using the circuit breaker.