Skip to content

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

Merged
Lms24 merged 3 commits into
7.xfrom
lms-fix-lambda-layer-v7
Apr 28, 2022
Merged

fix(serverless): Adjust v6 Lambda layer hotfix for v7#5006
Lms24 merged 3 commits into
7.xfrom
lms-fix-lambda-layer-v7

Conversation

@Lms24

@Lms24Lms24 commented Apr 28, 2022

Copy link
Copy Markdown
Member

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

Lms24 added 2 commits April 27, 2022 18:01
- add or adjust .npmignore paths to all sentry dependencies of @sentry/serverless
- add basic documentation to `build-awslambda-layer.js`
@github-actions

github-actionsBot commented Apr 28, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@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
@Lms24Lms24 changed the title fix(serverless): adjust v6 Lambda layer hotfix to v7fix(serverless): adjust v6 Lambda layer hotfix for v7Apr 28, 2022

@lforstlforst left a comment

Copy link
Copy Markdown
Contributor

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!

Comment threadpackages/core/.npmignore Outdated
@Lms24Lms24 changed the title fix(serverless): adjust v6 Lambda layer hotfix for v7fix(serverless): Adjust v6 Lambda layer hotfix for v7Apr 28, 2022
@Lms24
Lms24 merged commit ebc938a into 7.xApr 28, 2022
@Lms24
Lms24 deleted the lms-fix-lambda-layer-v7 branch April 28, 2022 11:37
@Lms24Lms24 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 freeto 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

@Lms24@lforst