fix(ecs): detect rollback after service stability wait#859
Open
ebihimself wants to merge 3 commits intoaws-actions:masterfrom
Open
fix(ecs): detect rollback after service stability wait#859ebihimself wants to merge 3 commits intoaws-actions:masterfrom
ebihimself wants to merge 3 commits intoaws-actions:masterfrom
Conversation
|
Howdy @ebihimself , you're missing the changes for the |
Author
|
Hey @NahutabDevelop, wazap? 🤠 Pushed! 🚀 |
s3cube
reviewed
Apr 21, 2026
| // even if the service is "stable", ECS may have rolled back to the | ||
| // previous task definition. In that case, the PRIMARY deployment | ||
| // will not match the task definition we expected to promote. | ||
| if (primaryDeployment.taskDefinition !== expectedTaskDefArn) { |
Contributor
There was a problem hiding this comment.
There's a few parameters on the action for which this approach doesn't work. These are parameters called in the UpdateService call that trigger a deployment such as service-managed-ebs-volume or force-new-deployment
Basically, the task-definition would not change for these across deployments
Author
There was a problem hiding this comment.
Makes sense! I will change the design. I think the safest way to check is to use the deployment ID.
Contributor
There was a problem hiding this comment.
Yes, there might be a cleaner way, let me confirm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #191 by validating the final ECS deployment after service stabilization.
Problem
The action currently waits for ECS service stability, but a failed deployment with deployment circuit breaker + rollback can still leave the service stable after ECS rolls back to the previous deployment.
Change
After
waitUntilServicesStable(...), callDescribeServicesand:FAILEDPRIMARYdeployment task definition is not the expected task definitionWhy
This ensures the action only succeeds when the intended deployment actually wins, rather than when ECS stabilizes via rollback.