Skip to content
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

dotnet lambda package-ci CodeUri unchanged if hash of project is the same #83

Open
lmunro opened this issue Jul 5, 2019 · 3 comments
Open
Labels
feature-request A feature should be added or improved. module/cli-ext p2 This is a standard priority issue queued

Comments

@lmunro
Copy link

lmunro commented Jul 5, 2019

The SAM Serverless::Function property AutoPublishAlias will attempt to re-deploy a lambda if the CodeUri changes.

The CodeUri produced from

dotnet lambda package-ci

is always different, even if the lambda code doesn't change.

This causes issues deploying changes to the other resources in the SAM template, because if you don't also change the lambda code you get a "A version for this Lambda function exists" error and the stack update rolls back.

Is there a way to set the zip file name in the codeuri to a hash of some sort?

@klaytaybai klaytaybai added the feature-request A feature should be added or improved. label Jul 8, 2019
@hauntingEcho
Copy link

it looks like it's currently re-uploading the artifact entirely, even if it's unchanged. Avoiding this could get a lot of gains:

  • fewer uploads - saving time, traffic, and S3 space
  • fewer spurious artifacts, which get in the way when digging through version history
  • fewer spurious function updates, or CloudFormation updates when nothing else has changed. Unnecessary moving pieces during a deployment cause more risk, and add noise to the event log. Some source changes like testing & documentation won't cause changes to the built artifact.

I'm currently using <Deterministic>True</Deterministic> in my .csproj files and have verified that the zipfiles match between packaging. It looks like verifying the MD5 sum against the ETag can be used as a heuristic to reduce spurious uploads, although it won't always prevent them.

@github-actions
Copy link

We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Aug 11, 2022
@hauntingEcho
Copy link

This is still needed

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Aug 12, 2022
@ashishdhingra ashishdhingra added the p2 This is a standard priority issue label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/cli-ext p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

4 participants