-
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
aws-cdk: direct deploy return error when there are no stack updates #23141
Comments
I was able to reproduce this with the sample you posted, thanks for reporting! What's interesting is that I tried to reproduce this first using a bucket (with auto delete set to true, which will create a custom resource), and wasn't able to reproduce. I wonder if there's something specific with the SSM parameter that is messing things up here |
Okay as far as I can see, I think this is the problem: From:
switch (deploymentMethod.method) {
case 'change-set':
return this.changeSetDeployment(deploymentMethod);
case 'direct':
return this.directDeployment();
} But only
So seems like some of that code should be reused in the |
Started to experience this issue when deploying only DynamoDB tables stack after bumping:
with:
|
I'm experiencing the same error on version It seems like an easy bug to fix, by adding support for a |
Just ran into this trying to speed up the deployment of a large project (100s of stacks) by avoiding ChangeSet creation. |
+1 also experiencing the same issue |
dropped here in the same situation as @polothy |
@otaviomacedo could you please share: is there an ETA for this issue? |
|
Yeah same here, the weird thing is it doesn't happen for all our stacks, only some. |
And it comes back from time to time -> i.e. sometimes --method=direct works as expected when there are no changes, and sometimes it causes failures. |
We're having the same issue by the way. Deploying without |
Seems a fix went in this release: https://github.com/aws/aws-cdk/releases/tag/v2.118.0 |
Awesome, thanks for letting us know @ChrisSargent ! I've tried it with my reproduction scenario and it is now working as intended when upgraded to CDK 2.118.0. 🎉 |
|
Describe the bug
Using
cdk deploy --method=direct
when there are no stack updates:It return
❌ Deployment failed
and exit code 1.Compared to
cdk deploy
that return✅ HelloCdkStack (no changes)
and exit code 0.Expected Behavior
When there are no updates.
Current Behavior
Debug output:
Result:
Exit code: 1
Reproduction Steps
Modified sample app:
mkdir hello-cdk cd hello-cdk npx aws-cdk@2.x init sample-app --language typescript
Modify stack:
Deploy first time:
Second time (no updates):
Possible Solution
Check if
this.cfn.updateStack
indirectDeployment()
return "no updates to be performed"-ValidationError then returnnoOp: true
.Additional Information/Context
It works as expected on stacks that doesn't resolve SSM parameters.
CDK CLI Version
2.53.0 (build 7690f43)
Framework Version
2.53.0
Node.js Version
v16.18.1
OS
Mac OS
Language
Typescript
Language Version
No response
Other information
We would like to use this nice new direct deploy feature #22079 👏 in our CI/CD process, and it would therefor be nice if it doesn't return error when there are no updates.
The text was updated successfully, but these errors were encountered: