-
Notifications
You must be signed in to change notification settings - Fork 87
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 is not reproducible #232
Comments
@rittneje Good afternoon. I'm not sure if this is an issue. The |
The problem is not that it modified the file attributes. In fact, it's the opposite. It is required for |
@rittneje So are you saying it is not doing it right now and should do it (i.e. set all the mtimes to some static value) as a feature request? I would also advise to set proper issue title for easy review. |
Regardless of whether you want to consider it a bug or a feature request, the problem is that |
Probably a duplicate of #195. |
Facing the same issue and haven't found a fix |
Hi,
In addition, the timestamps had to be eliminated. Fortunately, there is a ready solution for this:
If you are on a debian system, you can install it easily:
After that, cdk did not detect any changes in successive pipeline runs if no source code was changed. I checked the hash values in the pipeline to always identify the cause of changes:
|
Describe the bug
Because
dotnet lambda package
does not zero out the mtimes of the files in the zip, the zip file itself constantly changes on every build. This means that even rerunning a build of the same exact commit will lead to a cdk diff.Expected Behavior
dotnet lambda package
should produce identical results given identical inputs.Current Behavior
The original mtimes are preserved, so there is always a diff.
Reproduction Steps
dotnet lambda package
.cdk deploy
to deploy a stack with that lambda function.dotnet lambda package
again.cdk diff
.Possible Solution
Set all mtimes to zero (or provide a flag for this).
Additional Information/Context
No response
Targeted .NET platform
.NET Core 3.1
CLI extension version
amazon.lambda.tools 4.0.0 dotnet-lambda
Environment details (OS name and version, etc.)
Debian
The text was updated successfully, but these errors were encountered: