aws / aws/aws-extensions-for-dotnet-cli
dotnet lambda package is not reproducible
- Dominant language
- C#
- Stars
- 393
- Forks
- 90
- Avg merge
- 2d 19m
- Merged PRs (30d)
- 3
Description
### 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
1. Run `dotnet lambda package`.
2. Use `cdk deploy` to deploy a stack with that lambda function.
3. Run `dotnet lambda package` again.
4. 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
Contributor guide
Assessment
This issue has not been assessed yet.