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
- Run
dotnet lambda package.
- Use
cdk deploy to deploy a stack with that lambda function.
- Run
dotnet lambda package again.
- Run
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
Describe the bug
Because
dotnet lambda packagedoes 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 packageshould 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 deployto deploy a stack with that lambda function.dotnet lambda packageagain.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