aws-extensions-for-dotnet-cli icon indicating copy to clipboard operation
aws-extensions-for-dotnet-cli copied to clipboard

"Failed to create CloudFormation change set: No updates are to be performed." generates error code -1

Open mciureanu opened this issue 5 years ago • 7 comments

Hello,

When calling deploy-serverless with a package created with package-ci command, the second time I call the command with the same package I get this as an error message: "Failed to create CloudFormation change set: No updates are to be performed." and the cli tool returns with exit code -1

This is processed by the most CI tools (for example Teamcity - the one I use) as an error, and the build fails.

I think the normal behavior, at least from the "deploy-serverless" point of view should be not to return exit code -1. I don't know if the aws-sdk-net should return ChangeSetStatus.FAILED or not, probably this is somehow another discussion (that should happen in the aws-sdk-net project, since there is no special status like SKIPPED), but as a user of "deploy-serverless" function I believe this should only seen as a warning, not an error. Even if this means checking the error message I guess.

mciureanu avatar Mar 13 '19 09:03 mciureanu

Hi @mciureanu, thank you for your feedback on this. Related commands in other products of ours seem to now either suppress the error automatically and generate a warning or allow a user to use an option to suppress the error. I think it is reasonable that we do the same here.

klaytaybai avatar Mar 13 '19 20:03 klaytaybai

@mciureanu unable to publish application to AWS as it generates when tried to publish

pravindra-rathore avatar Feb 25 '20 22:02 pravindra-rathore

I faced this issue while creating a lamda funtion. Changing the KeyID parameter value to a different one worked for me. It was successfully deployed

Rashmi-278 avatar Oct 12 '20 04:10 Rashmi-278

I have a similar desire to see the "no-fail-on-empty-changeset" flag supported by these extensions, for largely the same reason. Our automated deployment finds the non-zero exit code and flags as an error/failure. Is there any update on whether support for this might be added?

steveshiny avatar Jul 21 '21 13:07 steveshiny

The status code should be inline with the CF returned response. If CF says no-changeset is success, CLI should return 0.

@ashishdhingra could you verify it?

ganeshnj avatar Mar 31 '22 19:03 ganeshnj

The status code should be inline with the CF returned response. If CF says no-changeset is success, CLI should return 0.

@ashishdhingra could you verify it?

Findings:

This feature request to support command line argument no-fail-on-empty-changeset needs to be reviewed by the team.

ashishdhingra avatar Aug 31 '22 22:08 ashishdhingra

Another issue https://github.com/aws/aws-lambda-dotnet/issues/1495 was also opened. Related issue https://github.com/aws/serverless-application-model/issues/71.

ashishdhingra avatar Apr 25 '23 16:04 ashishdhingra