aws-extensions-for-dotnet-cli
aws-extensions-for-dotnet-cli copied to clipboard
"Failed to create CloudFormation change set: No updates are to be performed." generates error code -1
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.
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.
@mciureanu unable to publish application to AWS as it generates when tried to publish
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
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?
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?
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:
- Based on existing stack status of StackStatus.UPDATE_COMPLETE, it uses
ChangeSetType.UPDATE
for CreateChangeSetRequest - It then executes CloudFormationClient.CreateChangeSetAsync(changeSetRequest).
- It then polls the status of changeset via call to CloudFormationClient.DescribeChangeSetAsync(request).
- The
CloudFormationClient.DescribeChangeSetAsync
returns statusChangeSetStatus.FAILED
with status reasonNo updates are to be performed.
. - This method then returns
false
to the method call stack, where application exits with status code-1
in Application.Execute().
This feature request to support command line argument no-fail-on-empty-changeset
needs to be reviewed by the team.
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.