-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Generated zip files always have new timestamps and force stack updates #186
Comments
Some solutions that come to mind:
I'm partial to switching to |
Very interesting. I'd second going back to archiver, as I am no fan of bestzip. However, as this was an improvement for some heavy duty use cases, it might be a good idea to follow the (still unmerged it seems) PR of serverless webpack, and add a |
Hey, @olup, I can't remember exactly what benefit we got from migrating to bestzip? are those improvements worth the issues we have currently? I'd also vote for reverting back to |
The original issue should be here somewhere. Someone argued, with benchmarks, that it made a huge performance difference when zipping many many functions. My concerns with bestzip were low maintenance and no typings. |
bestzip preserves file timestamps, which causes function zips to be different after every esbuild. Because there are scenarios where native js zipping is unacceptably slower than native system zip, the option to use it is preserved as an option. Fixes: #186
🎉 This issue has been resolved in version 1.18.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Every invocation of bestzip generates a zip file with a different sha256 hash because of the contents' timestamps. Similar issue exists for serverless-webpack as well.
When Serverless is creating zips, it avoids this by explicitly setting the files' timestamps to the epoch. Bestzip could copy this for platforms without a
zip
executable, but it would require a different approach for when it shells out tozip
(which doesn't have a flag to override timestamps).The text was updated successfully, but these errors were encountered: