Skip to content

Conversation

@antonpirker
Copy link
Contributor

This PR does basically two things:

  • Changed build-awslambda-layer.js to NOT zip the layer and put all layer contents in /dist-serverless
  • Use custom GitHub action that:
    • adds Lambda extension to /dist-serverless
    • zips everything and
    • uploads artifact to GitHub (where then the craft release script takes it and puts it into AWS Lambda.)

@github-actions
Copy link
Contributor

github-actions bot commented May 12, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.75 KB (-6.91% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 58.19 KB (-9.95% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.49 KB (-7.25% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 52.43 KB (-9.56% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.33 KB (-16.84% 🔽)
@sentry/browser - Webpack (minified) 61.44 KB (-24.82% 🔽)
@sentry/react - Webpack (gzipped + minified) 19.35 KB (-16.88% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.81 KB (-10.92% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.41 KB (-6.4% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.96 KB (-6.24% 🔽)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Thanks for improving the Lambda layer build experience! I think it's good to unify the build process of the Node layer as much as possible with the Python layer. And anything that makes build-aws-lambda-layer.js script shorter and less complex is a good change IMO :D
Just left a small comment with a possible improvement for the future
EDIT: Found one more thing, see below

Co-authored-by: Lukas Stracke <[email protected]>
@antonpirker antonpirker marked this pull request as ready for review May 13, 2022 09:07
@antonpirker antonpirker merged commit 8a4039d into 7.x May 13, 2022
@antonpirker antonpirker deleted the antonpirker/WEBBACKEND-146-build-aws-lambda-layer-w-github-action branch May 13, 2022 09:08
Comment on lines +536 to +537
echo "SDK_VERSION=$SDK_VERSION"
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo "SDK_VERSION=$SDK_VERSION"
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
echo "SDK_VERSION=$SDK_VERSION" | tee -a $GITHUB_ENV

Copy link
Contributor

Choose a reason for hiding this comment

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

tee -a does exactly what you did in 2 lines :)

@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 13, 2022
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
…5093)

* Removed zipping from build script
* Assemble Lambda Layer zip using GitHub action.

Co-authored-by: Lukas Stracke <[email protected]>
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.

5 participants