feat(ecs): enable alarm-based rollbacks#25840
Merged
mergify[bot] merged 46 commits intoaws:mainfrom Jul 5, 2023
Merged
Conversation
Closes aws#24243. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
madeline-k
previously requested changes
Jun 26, 2023
Contributor
madeline-k
left a comment
There was a problem hiding this comment.
Hey @bvtujo, thanks for your patience on this one. It was a bit of a challenge.
All of my feedback I have implemented in another branch, which you can merge into your branch if you are aligned with it. Checkout the commit here: 8017b6f?diff=split
madeline-k
previously requested changes
Jul 5, 2023
Contributor
madeline-k
left a comment
There was a problem hiding this comment.
This looks great! Thanks for incorporating all of my feedback. I have a few tiny comments remaining on the documentation.
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Contributor
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
mergify bot
pushed a commit
that referenced
this pull request
Jul 12, 2023
… CODE_DEPLOY and EXTERNAL deployment controller (#26317) From #25840, ECS L2 construct sets the default configuration for the `CfnService.deploymentConfiguration.alarms` property to: ``` alarmNames: [], rollback: false, enable: false, ``` However, alarm based rollback feature is only supported for ECS services that use the rolling update (ECS) deployment controller. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-alarm-failure.html Due to this limitation, when deploymentController is set to CODE_DEPLOY or EXTERNAL, creation for the service will fail by conflict with `deploymentConfiguration.alarms` property. This PR solves the issue by skipping to set default configuration for the `CfnService.deploymentConfiguration.alarms` property for CODE_DEPLOY and EXTERNAL deployment controller. Closes #26307 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
bmoffatt
pushed a commit
to bmoffatt/aws-cdk
that referenced
this pull request
Jul 29, 2023
… CODE_DEPLOY and EXTERNAL deployment controller (aws#26317) From aws#25840, ECS L2 construct sets the default configuration for the `CfnService.deploymentConfiguration.alarms` property to: ``` alarmNames: [], rollback: false, enable: false, ``` However, alarm based rollback feature is only supported for ECS services that use the rolling update (ECS) deployment controller. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-alarm-failure.html Due to this limitation, when deploymentController is set to CODE_DEPLOY or EXTERNAL, creation for the service will fail by conflict with `deploymentConfiguration.alarms` property. This PR solves the issue by skipping to set default configuration for the `CfnService.deploymentConfiguration.alarms` property for CODE_DEPLOY and EXTERNAL deployment controller. Closes aws#26307 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This was referenced May 14, 2024
mergify bot
pushed a commit
that referenced
this pull request
May 15, 2024
…ttings (#30217) ### Issue # (if applicable) Internal ticket tracking V1142791950 ### Reason for this change Originally in this PR #25840, we added default deployment alarm settings to fix an issue where adding deployment alarms, deploying your CFN stack, then removing the deployment alarms from the CFN template, and deploying again WILL NOT remove the deployment alarms from the service. ECS now already supports default deployment alarm settings. We will remove the default setting of deploymentAlarms. Reason for removing this default behaviour is for region build where the deployment alarm service may not be available in new regions but is set by default by CDK. ### Description of changes Remove default deployment alarm. ### Description of how you validated changes All new tests and integration tests pass. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
2 tasks
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.
This PR enables the new Deployment Alarms feature in ECS for Service L2s blog post.
This PR contains changes after the first round of revision by the CDK team.
Continuation of #25346
Why are so many integration tests impacted by this change? There are 2 reasons:
CfnService.deploymentConfiguration.alarmsproperty to:This is necessary, because adding deployment alarms, deploying your CFN stack, then removing the deployment alarms from the CFN template, and deploying again WILL NOT remove the deployment alarms from the service. To remove previously configured deployment alarms, you must explicitly use the configuration shown above. Making this update will cause no interruption to existing ECS services, and does not trigger any update to the service itself during the CFN update.
The ECS UpdateService API is stateful, meaning that if a field is not present in the CloudFormation object, it will be ignored in the update. This was originally implemented due to the problems with desiredCount resetting to bad values after autoscaling changed it, but requires us to set an explicit disableDeploymentAlarms() method to cause the service update to behave correctly.
Detailed list of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license