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

ref(serverless): Remove relay extension from AWS layer #8080

Merged
merged 1 commit into from May 16, 2023

Conversation

sl0thentr0py
Copy link
Member

we're reverting back to the older setup since the whole 'relay as AWS extension' experiment didn't really work out.

  • remove gh action that bundles relay
  • remove port override in DSN
  • zip in place as part of buildLambdaLayer

part of getsentry/team-webplatform-meta#58
see python PR - getsentry/sentry-python#2068

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.03 KB (+0.03% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 65.63 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.57 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 58.09 KB (+0.02% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.17 KB (0%)
@sentry/browser - Webpack (minified) 69.04 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.19 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.12 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.65 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.89 KB (+0.04% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 48.13 KB (+1.08% 🔺)
@sentry/replay - Webpack (gzipped + minified) 42.02 KB (+1.35% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 67.09 KB (+0.88% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 59.99 KB (+1.02% 🔺)

@sl0thentr0py sl0thentr0py force-pushed the neel/remove-aws-relay branch 3 times, most recently from c022489 to 3d02e93 Compare May 12, 2023 12:26
@sl0thentr0py sl0thentr0py marked this pull request as ready for review May 12, 2023 12:26
scripts/aws-delete-local-layers.sh Outdated Show resolved Hide resolved
scripts/aws-deploy-local-layer.sh Outdated Show resolved Hide resolved
@@ -46,6 +46,12 @@ async function buildLambdaLayer(): Promise<void> {
'../build/npm/cjs/awslambda-auto.js',
'build/aws/dist-serverless/nodejs/node_modules/@sentry/serverless/dist/awslambda-auto.js',
);

const version = run("cat package.json | jq --raw-output '.version'", { stdio: 'pipe' }).trim();
Copy link
Member

Choose a reason for hiding this comment

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

h: the jq command errors for me locally because I don't have jq installed on my machine. Can we make sure that this doesn't become a requirement for a successful local build? I think we can either import/require the or read and JSON.parse the package.json instead to get the version.

Copy link
Member

Choose a reason for hiding this comment

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

Another idea: I just saw that read-pkg is still registered as a dev dependency but we don't seem to use it anywhere. So we could use it to read the package.json here, too. (Or alternatively, let's get rid of it)

Copy link
Member Author

Choose a reason for hiding this comment

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

  • removed read-pkg
  • imported version from package.json (needed "resolveJsonModule": true in tsconfig.json)

@sl0thentr0py sl0thentr0py force-pushed the neel/remove-aws-relay branch 3 times, most recently from 55ae2f5 to 234a678 Compare May 16, 2023 11:01
@sl0thentr0py sl0thentr0py requested a review from Lms24 May 16, 2023 11:02
we're reverting back to the older setup since the whole 'relay as AWS extension' experiment didn't really work out.
* revert port override in DSN
* remove gh action that bundles relay
* zip in place as part of `buildLambdaLayer`

part of getsentry/team-webplatform-meta#58
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 adjusting, LGTM now and it builds successfully for me. Just to confirm: You testes this on AWS, right? especially the aws-auto command?

@Lms24 Lms24 changed the title Remove relay extension from AWS layer ref(serverless): Remove relay extension from AWS layer May 16, 2023
@sl0thentr0py
Copy link
Member Author

yep, tested manually, will test whole prod flow once released

@sl0thentr0py sl0thentr0py merged commit a036a63 into develop May 16, 2023
62 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/remove-aws-relay branch May 16, 2023 12:55
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