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

Would be good to expose --no-fail-on-empty-changeset to CLI

Open haus opened this issue 6 years ago • 2 comments

In https://github.com/aws/aws-cli/pull/2922 a flag for the AWS cli was added to that a cloudformation stack/template that was deployed with no changes would not return non-zero (useful for automated deploys that may not always contain changes). It would be super if this could be leveraged in the dotnet extensions. I am currently working around this by inspecting the output for a specific string, but it feels very fragile.

haus avatar Nov 15 '18 22:11 haus

Makes sense to add. Out of curiosity since this tool always uploads new zip files for the compiled .NET Core projects with a timestamp how are you getting no changes?

normj avatar Nov 17 '18 05:11 normj

I can answer this question, since we have the same problem. We are using a staging and a production environment, and we want to have the same version on both, so we use "dotnet lambda package-ci" on staging, and on production we use the generated template to deploy. If nothing changes and we try the production build again, we get the error that nothing changed.

mciureanu avatar Feb 18 '20 14:02 mciureanu

aws-extensions-for-dotnet-cli can only deploy Lambda functions via CloudFormation. This tool zips the output of dotnet publish and uploads it to S3 before attempting to create a CloudFormation stack. During re-deployments, the zip files would again be uploaded to the same S3 bucket but using a different S3 key. Since the S3 key differs during each re-deployment (regardless of whether the Lambda function logic has changed or not), CloudFormation always creates a new change set and thus it always a returns a zero exit code.

Closing this issue since the tooling will never encounter the scenario of an empty CloudFormation change set.

96malhar avatar Mar 28 '24 22:03 96malhar

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Mar 28 '24 22:03 github-actions[bot]