fix(ecs): DeploymentAlarms property is specified for ECS service with CODE_DEPLOY and EXTERNAL deployment controller#26317
Conversation
… CODE_DEPLOY and EXTERNAL deployment controller
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
|
Exemption Request for this quick fix. If integration tests and snapshot are still needed, please let me know. |
|
I checked failed build. I want to take a new snapshot for I usually use devcontainer, so I tried to use Gitpod, but the problem does not solved. |
|
@tam0ri Is your branch up-to-date? We made a change to how we import |
| } else if (props.deploymentController?.type !== DeploymentControllerType.CODE_DEPLOY && | ||
| props.deploymentController?.type !== DeploymentControllerType.EXTERNAL && this.deploymentAlarmsAvailableInRegion()) { |
There was a problem hiding this comment.
Any particular reason you are checking for the negative here (not CODE_DEPLOY, not EXTERNAL) and not if the controller is ECS?
There was a problem hiding this comment.
There is no particular reason. I fix this not to use negative condition.
|
I pushed the fix. If you have any comment, please feel free to point it out!
Yes, I already pulled the latest main branch. I'll dig it further more later, but it really helpful that you add a new snapshot. |
|
I could execute integ-runner on Gitpod, so I added a new snapshot by myself. The previous snapshot includes the invalid configuration (alarm based rollback + CODE_DEPLOY deployment controller). This led creation failure for CFn stack when I executed integration test. So, I created the new snapshot by |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
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). |
… 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*
From #25840, ECS L2 construct sets the default configuration for the
CfnService.deploymentConfiguration.alarmsproperty to: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.alarmsproperty.This PR solves the issue by skipping to set default configuration for the
CfnService.deploymentConfiguration.alarmsproperty 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