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

Since 1.54.1 the package bundling is no longer "deterministic", that means we are re-deploying packages with no code changes. #557

Closed
bnegrao opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bnegrao
Copy link
Contributor

bnegrao commented Oct 10, 2024

Describe the bug
The commit in version 1.54.1 introduced a bug in the bundling process. The produced zip files are always binary different, with no code changes involved.

The consequence is that the packages are being re-deployed every time, as if they contain changes.

To Reproduce
In any repository, run:

# create a package
npx sls package
# save the zip file
mv .serverless/*.zip first.zip
# repeat package creation
npx sls package
# save the second zip file
mv .serverless/*.zip second.zip
# Now compare them
diff first.zip second.zip
# diff will tell the "binary files differ".

The cause is the modification date. You can unzip -l first.zip and unzip -l second.zip to see.

Expected behavior
The zip files should be bundled in a "deterministic" way, that means, bundling the same code should always produce the exact same bundle.

Additional context
If you downgrade to version 1.53.0, the plugin works in the expected way.

@bnegrao
Copy link
Contributor Author

bnegrao commented Oct 12, 2024

I created a PR to fix it: #558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants