-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
E2E for useServerlessTraceTarget #787
Conversation
packages/e2e-tests/next-app-using-serverless-trace/serverless.yml
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #787 +/- ##
=======================================
Coverage 80.00% 80.00%
=======================================
Files 56 56
Lines 1835 1835
Branches 406 406
=======================================
Hits 1468 1468
Misses 309 309
Partials 58 58 Continue to review full report at Codecov.
|
packages/e2e-tests/next-app-using-serverless-trace/package.json
Outdated
Show resolved
Hide resolved
packages/e2e-tests/next-app-using-serverless-trace/package.json
Outdated
Show resolved
Hide resolved
@danielcondemarin LGTM besides that. I'm not so sure about setting serverless trace target as the default build though, since although it reduces code duplication, it can have cold start perf impact, since it's now having to load a bunch of smaller JS modules instead of a single file for a page. From my experience AWS Lambda code size has very little impact on cold start, it's more the I/O/requires that makes up the majority of the time. There are ways to optimize code size like minifying the pages JS files or manually removing page JS only used for pre-rendering (e.g we do it automatically if you do not use any API routes). I added |
That's a fair point. I'm mainly proposing the change because the Next team uses this as their build target for Vercel deployments. The other is that I suspect they will be deprecating the serverless target. |
Yep, I did try Vercel's deployment and found it slow for that same reason - a while back I had opened an issue but had no responses. I hope they do not remove the serverless target. |
Looks like e2e tests failed here: https://github.com/serverless-nextjs/serverless-next.js/actions/runs/358701235 |
@@ -0,0 +1,25 @@ | |||
module.exports = function (...args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops, overlooked this, I will fix for you @danielcondemarin
This is literally a copy of
e2e-tests/next-app
with one difference, it setsuseServerlessTraceTarget: true
.I think we should aim to set serverless trace as the default build target in future, maybe for 1.19. Hopefully the last few fixes and #779 have made it stable enough.