Skip to content

feat: warn if zip is too large, and log the largest files #730

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

Merged
merged 4 commits into from
Oct 25, 2021

Conversation

ascorbic
Copy link
Contributor

Summary

Errors when trying to upload lambdas are common, and are usually the result of accidentally bundling a large dependency such as electron or chromium. The error message is cryptic and not actionable for users. This PR adds a post-build check on the size of the zip. If it's larger than 50MB (the documented max compressed size) it logs some helpful(?) information. It also lists the 10 largest files in the zip, which should help in diagnosing the problem. In most cases the problem is a single module.

It would benefit from having some docs, which we can add a shortlink to. If we merge #728 then we could add info there about enabling the feature that moves the files outside the bundle.

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal (small picture)

image

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Oct 21, 2021
@ascorbic ascorbic self-assigned this Oct 21, 2021
@ascorbic ascorbic force-pushed the feat/zip-size-warning branch from 9a1d993 to 9fffa23 Compare October 21, 2021 13:57
@kodiakhq
Copy link
Contributor

kodiakhq bot commented Oct 25, 2021

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

@kodiakhq kodiakhq bot merged commit 9989c0a into main Oct 25, 2021
@kodiakhq kodiakhq bot deleted the feat/zip-size-warning branch October 25, 2021 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants