-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
(ecs): Can't update FargateService with CODE_DEPLOY deploymentController #23564
Comments
@cplee @clareliguori Any ideas? |
@sergeivalko What does the CloudFormation changeset look like for the ECS service? |
[
{
"resourceChange": {
"logicalResourceId": "DeploymentGroup6D277AF0",
"action": "Modify",
"physicalResourceId": "default",
"resourceType": "AWS::CodeDeploy::DeploymentGroup",
"replacement": "False",
"moduleInfo": null,
"details": [
{
"target": {
"name": "ECSServices",
"requiresRecreation": "Never",
"attribute": "Properties"
},
"causingEntity": "ServiceD69D759B.Name",
"evaluation": "Dynamic",
"changeSource": "ResourceAttribute"
}
],
"changeSetId": null,
"scope": [
"Properties"
]
},
"hookInvocationCount": null,
"type": "Resource"
},
{
"resourceChange": {
"logicalResourceId": "ServiceD69D759B",
"action": "Modify",
"physicalResourceId": "[ARN]-service/n2p-uniteplatform-dev/n2p-unite-call-queue-metrics-service",
"resourceType": "AWS::ECS::Service",
"replacement": "False",
"moduleInfo": null,
"details": [
{
"target": {
"name": "DesiredCount",
"requiresRecreation": "Never",
"attribute": "Properties"
},
"causingEntity": null,
"evaluation": "Static",
"changeSource": "DirectModification"
}
],
"changeSetId": null,
"scope": [
"Properties"
]
},
"hookInvocationCount": null,
"type": "Resource"
},
{
"resourceChange": {
"logicalResourceId": "ServiceTaskCountTarget23E25614",
"action": "Modify",
"physicalResourceId": "service/n2p-uniteplatform-dev/n2p-unite-call-queue-metrics-service|ecs:service:DesiredCount|ecs",
"resourceType": "AWS::ApplicationAutoScaling::ScalableTarget",
"replacement": "Conditional",
"moduleInfo": null,
"details": [
{
"target": {
"name": "ResourceId",
"requiresRecreation": "Always",
"attribute": "Properties"
},
"causingEntity": "ServiceD69D759B.Name",
"evaluation": "Dynamic",
"changeSource": "ResourceAttribute"
}
],
"changeSetId": null,
"scope": [
"Properties"
]
},
"hookInvocationCount": null,
"type": "Resource"
}
] |
@cplee Did you manage to reproduce? |
Does it only happen when you specify the deploymentController: {
type: ecs.DeploymentControllerType.CODE_DEPLOY,
}, |
@pahud i'll check and let you know. |
@pahud yes, it only happens when i specify |
Hello @sergeivalko, please open an issue in the CloudFormation coverage roadmap - this is an issue with the way that CloudFormation handles ECS service updates, not an issue with CDK. As you stated, the CloudFormation handler always fills in all parameters in the ECS UpdateService API call, regardless of whether those values have changed in the current changeset. When the CODE_DEPLOY deployment controller is used, ECS UpdateService API calls will be rejected if the network configuration, platform version, task definition, or load balancer is provided in the call. |
@clareliguori Hello, thanks, done aws-cloudformation/cloudformation-coverage-roadmap#1529 |
Thank you @clareliguori for clarifying. I am closing this now as it is not relevant to CDK. Feel free to re-open if necessary. |
|
Does anyone has a workaround? |
@ankit-agrawal-berlin Still happening to me and the issue was created on CloudFormation coverage roadmap #1529 6 months ago as @clareliguori suggested, but it was closed 2 months ago by a bot, and last week was reopened without any comment from AWS at all. @clareliguori Is it possible for you to tag someone from AWS on that issue? I would love to see some updates if possible. |
Describe the bug
When i update properties related to a service like
desiredCount
or any allowed cloudformation throws an exceptionExpected Behavior
Service updated
Current Behavior
Error:
Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment
Reproduction Steps
Possible Solution
Modify request
UpdateService
Additional Information/Context
I found the
![image](https://user-images.githubusercontent.com/21295107/210610423-7823a06e-7d86-4209-8121-e42cfa04ef7b.png)
Update Service
event and it looks like the cloudformation also sent other information liketaskDefinition
,network
, etc in therequestParameters
and I think that's not correct.cdk diff:
![image](https://user-images.githubusercontent.com/21295107/210614037-3ba6c57f-7617-4b9e-9c5d-5241ed8ef1b4.png)
CDK CLI Version
2.59.0
Framework Version
No response
Node.js Version
v14.18.0
OS
Windows
Language
Typescript
Language Version
4.9.4
Other information
No response
The text was updated successfully, but these errors were encountered: