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

fix(serverless): Adjust v6 Lambda layer hotfix for v7 #5006

Merged
merged 3 commits into from Apr 28, 2022

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 28, 2022

This PR adapts the hotfix for the Lambda layer creation introduced in 6.19.7 (in #4982) for v7.

More specifically, this PR

  • ensures that the s/dist/cjs change is applied to the .npmignore files added in fix(serverless): Re-add missing modules in Node AWS Lambda Layer #4982 and to build-awslambda-layer.js
  • adds or adjusts .npmignore files in all Sentry packages that are dependencies of @sentry/serverless
    • therefore, the unnecessary source, test or config files that previously bloated the lambda layer zip are no longer present
  • improves the build-awslambda-layer.js script by
    • improving documentation
    • changing variable names to be more expressive
    • (as a result, the changes in the script seem bigger than they actually are)

ref: https://getsentry.atlassian.net/browse/WEB-871

- add or adjust .npmignore paths to all sentry dependencies of @sentry/serverless
- add basic documentation to `build-awslambda-layer.js`
@github-actions
Copy link
Contributor

github-actions bot commented Apr 28, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.12 KB (-10.06% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 56.96 KB (-11.85% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 16.89 KB (-10.43% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 51.2 KB (-11.69% 🔽)
@sentry/browser - Webpack (gzipped + minified) 18.8 KB (-19.09% 🔽)
@sentry/browser - Webpack (minified) 60.98 KB (-25.38% 🔽)
@sentry/react - Webpack (gzipped + minified) 18.82 KB (-19.13% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.51 KB (-11.54% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 23.89 KB (-8.4% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.41 KB (-8.45% 🔽)

@Lms24 Lms24 marked this pull request as ready for review April 28, 2022 08:15
@Lms24 Lms24 changed the title fix(serverless): adjust v6 Lambda layer hotfix to v7 fix(serverless): adjust v6 Lambda layer hotfix for v7 Apr 28, 2022
Copy link
Member

@lforst lforst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still kinda want the lambda layer to just build its own bundles but this looks good in the meanwhile. Thanks for cleaning up that file!

packages/core/.npmignore Outdated Show resolved Hide resolved
@Lms24 Lms24 changed the title fix(serverless): adjust v6 Lambda layer hotfix for v7 fix(serverless): Adjust v6 Lambda layer hotfix for v7 Apr 28, 2022
@Lms24 Lms24 merged commit ebc938a into 7.x Apr 28, 2022
@Lms24 Lms24 deleted the lms-fix-lambda-layer-v7 branch April 28, 2022 11:37
@Lms24 Lms24 added this to the 7.0.0 milestone Apr 28, 2022
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
- ensure that the `s/dist/cjs` change is applied to the .npmignore files added and to build-awslambda-layer.js
- add or adjusts .npmignore files in all Sentry packages that are dependencies of @sentry/serverless
therefore, the unnecessary source, test or config files that previously bloated the lambda layer zip are no longer present
- improve the build-awslambda-layer.js script by improving documentation and changing variable names to be more expressive
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.

None yet

2 participants