-
Notifications
You must be signed in to change notification settings - Fork 4k
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(ecs): DeploymentAlarms property is specified for ECS service with CODE_DEPLOY and EXTERNAL deployment controller #26317
Conversation
… CODE_DEPLOY and EXTERNAL deployment controller
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no particular reason. I fix this not to use negative condition.
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.
Code looks good. Thank you! Just the one small question. If you add the test I can run the snapshots for you.
Edit: Just realized you only need a new snapshot. I can do that.
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. Lines 445 to 462 in 9fca790
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.alarms
property 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.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