-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: "compose service up" sets desired count to 1 #988
Conversation
Compose service up now creates service with desired count = 1:
|
Previous behavior (made two separate API calls):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the documentation for the up
command:
Creates an Amazon ECS service from your compose file (if it does not already exist) and runs one instance of that task on your cluster (a combination of the create and start commands). This command updates the desired count of the service to 1.
Can we make sure the command is idempotent in the sense that if customers run compose service create
and follow it with compose service up
it should succeed.
This might require us to check for ServiceAlreadyExists Error in line 249 and call updateService instead
I believe we'll go inside if the if-block iff the service does not exist or is inactive. So the behavior of the command should still be like before :) |
|
Previously, we would first call CreateService with desired count 0 then
call UpdateService to set the desired count to 1. This eliminates extra
API calls, as well as the need to wait until the service is describable
before "starting" it.
Note: This effectively reverts 264fe13
Related: #79
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Documentation
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.