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

Output size of application before compression #186

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

AndrewFeeney
Copy link
Contributor

  • Provides useful feedback for the developer which is otherwise difficult to access without downloading and uncompressing the artifact from Lambda
  • If I'm understanding correctly, the 250MB uncompressed limit includes the size of the custom Lambda runtime and any additional layers, so the check performed by ensureArchiveIsWithinSizeLimits may actually not be providing any useful value since the actual size of the uncompressed application plus the runtime and layers will be larger than the value being checked here
  • This change doesn't address that issue but does at least provide feedback to the developer so that they can understand what effect their changes are having on the uncompressed size of their application
  • Follows output format of subsequent step to keep output consistent in CLI
  • Passes in archive size to ensureArchiveIsWithinSizeLimits via parameter to avoid doing the work of calculating the size twice

NOTES:

  • The AWS Lambda docs specify MB as the unit for the size limits (50MB Archive size limit and 250MB Uncompressed size limit) whereas I believe the MB calculation for the output and size check in this file are both calculating MiB
  • This may warrant another look if a way can be found to provide a more meaningful size check against the 250MB limit imposed by AWS

AndrewFeeney and others added 3 commits June 20, 2022 14:26
- Provides useful feedback for the developer which is otherwise difficult to access without downloading and uncompressing the artifact from Lambda
- If I'm understanding correctly, the 250MB uncompressed limit includes the size of the custom Lambda runtime and any additional layers, so the check performed by ensureArchiveIsWithinSizeLimits may actually not be providing any useful value since the actual size of the uncompressed application plus the runtime and layers will be larger than the value being checked here
- This change doesn't address that issue but does at least provide feedback to the developer so that they can understand what effect their changes are having on the uncompressed size of their application
- Follows output format of subsequent step to keep output consistent in CLI
- Passes in archive size to ensureArchiveIsWithinSizeLimits via parameter to avoid doing the work of calculating the size twice

NOTES:

- The AWS Lambda docs specify MB as the unit for the size limits (50MB Archive size limit and 250MB Uncompressed size limit) whereas I believe the MB calculation for the output and size check in this file are both calculating MiB
- This may warrant another look if a way can be found to provide a more meaningful size check against the 250MB limit imposed by AWS
@taylorotwell taylorotwell merged commit b59fefa into laravel:master Jun 21, 2022
@taylorotwell
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants