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

feat(after): wait for after-callbacks before server shutdown #72590

Merged
merged 19 commits into from
Nov 27, 2024

Conversation

lubieowoce
Copy link
Member

@lubieowoce lubieowoce commented Nov 11, 2024

What

This PR improves the reliability of unstable_after in a self-hosted context, i.e. on a long-running server (next start).
when the server receives a signal to gracefully shutdown, we'll wait for any operations scheduled with unstable_after to finish, and then exit.

Why

It's less surprising than dropping pending operations on the floor if an instance is getting shut down. This mirrors the standard behavior of finishing handling pending requests before exiting -- we're just extending this a bit to include after tasks.

How

Previously waitUntil was just a noop in next start, so passing a promise to it did nothing. This PR changes the implementation to instead use an "awaiter" that stores promises passed to it and lets us wait for all of them to complete. We then use some existing onCleanup machinery to make sure that they're actually awaited before shutdown.

Note that I've now made NextServer.close() execute before shutdown. This is notable because AFAICT this wasn't being called anywhere before, which is a bit suspicious.

How (in a bit more detail)

This is all a bit hard to follow so here's an overview of how it works:

  • We have two entrypoints: startServer and NextCustomServer

  • startServer:

    • creates onDevServerCleanup using a cleanup set (AsyncCallbackSet)
    • calls createRequestHandlers, which...
      • passes onDevServerCleanup to turbopack's hot reloader (previously onCleanup)
      • creates a NextServer
        • which will create a NextNodeServer
          • which sets up an Awaiter to ensure all after callbacks finished running.
    • when we receive SIGINT/SIGTERM, we:
      • run NextServer.close(), which runs NextNodeServer.close(), which waits for pending after callbacks to finish using the Awaiter.
      • await any cleanups set up via onDevServerCleanup
  • NextCustomServer:

    • does basically the same setup with a cleanup set and createRequestHandlers
    • but it does not set up a SIGINT/SIGTERM handler to run the cleanups. instead, it expects the user to call its cleanup() method when appropriate (basically like we do in startServer)
      • i'm gonna do a follow up and update the custom server docs to reflect this
      • also going to try to warn if a cleanup was needed but the process exited without it calling it

@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch 2 times, most recently from 4e5dc72 to 585c54d Compare November 11, 2024 20:09
@ijjk
Copy link
Member

ijjk commented Nov 11, 2024

Failing test suites

Commit: 8030f7f

pnpm test test/integration/server-side-dev-errors/test/index.test.js (turbopack)

  • server-side dev errors > should show server-side error for api route correctly
Expand output

● server-side dev errors › should show server-side error for api route correctly

expect(received).toStartWith(expected)

Expected string to start with:
  " ⨯ test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler
 ⨯ test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler"
Received:
  "
 ⨯ test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler
 ⨯ test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler
 ⨯ ReferenceError: missingVar is not defined

  at handler (integration/server-side-dev-errors/pages/api/hello.js:2:3)
  at async DevServer.runApi (../packages/next/dist/server/next-server.js:623:9)
  at async NextNodeServer.handleCatchallRenderRequest (../packages/next/dist/server/next-server.js:278:37)
  at async DevServer.handleRequestImpl (../packages/next/dist/server/base-server.js:854:17)
  at async (../packages/next/dist/server/dev/next-dev-server.js:371:20)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:153:20)
  at async DevServer.handleRequest (../packages/next/dist/server/dev/next-dev-server.js:368:24)
  at async invokeRender (../packages/next/dist/server/lib/router-server.js:183:21)
  at async handleRequest (../packages/next/dist/server/lib/router-server.js:361:24)
  at async requestHandlerImpl (../packages/next/dist/server/lib/router-server.js:385:13)
  at async Server.requestListener (../packages/next/dist/server/lib/start-server.js:146:13)
    1 | export default function handler(req, res) {
  > 2 |   missingVar;res.status(200).json({ hello: 'world' })
      |   ^
    3 | }
    4 |
   ⨯ Error: missingVar is not defined
  at handler (integration/server-side-dev-errors/pages/api/hello.js:2:3)
  at async DevServer.runApi (../src/server/next-server.ts:547:4)
  at async NextNodeServer.handleCatchallRenderRequest (../src/server/next-server.ts:1042:24)
  at async DevServer.handleRequestImpl (../src/server/base-server.ts:1463:8)
  at async (../src/server/dev/next-dev-server.ts:512:13)
  at async Span.traceAsyncFn (../src/trace/trace.ts:143:13)
  at async DevServer.handleRequest (../src/server/dev/next-dev-server.ts:510:19)
  at async invokeRender (../src/server/lib/router-server.ts:284:10)
  at async handleRequest (../src/server/lib/router-server.ts:530:15)
  at async requestHandlerImpl (../src/server/lib/router-server.ts:576:6)
  at async Server.requestListener (../src/server/lib/start-server.ts:152:6)
    545 |     delete query.__nextInferredLocaleFromDefault
    546 |
  > 547 |     await module.render(req.originalRequest, res.originalResponse, {
        |    ^
    548 |       previewProps: this.renderOpts.previewProps,
    549 |       revalidate: this.revalidate.bind(this),
    550 |       trustHostHeader: this.nextConfig.experimental.trustHostHeader, {
    digest: undefined
  }
    1 | export default function handler(req, res) {
  > 2 |   missingVar;res.status(200).json({ hello: 'world' })
      |   ^
    3 | }
    4 |
  "
  at Object.toStartWith (integration/server-side-dev-errors/test/index.test.js:228:30)

Read more about building and testing Next.js in contributing.md.

@ijjk
Copy link
Member

ijjk commented Nov 11, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
buildDuration 36.1s 35.2s N/A
buildDurationCached 33.9s 30s N/A
nodeModulesSize 405 MB 405 MB ⚠️ +35.1 kB
nextStartRea..uration (ms) 840ms 851ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
131a20d7-HASH.js gzip 52.8 kB 52.8 kB N/A
1515-HASH.js gzip 48.9 kB 48.9 kB N/A
9408.HASH.js gzip 169 B 169 B
9705-HASH.js gzip 5.31 kB 5.3 kB N/A
framework-HASH.js gzip 57.6 kB 57.6 kB
main-app-HASH.js gzip 231 B 232 B N/A
main-HASH.js gzip 33.7 kB 33.7 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 57.8 kB 57.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
_app-HASH.js gzip 193 B 192 B N/A
_error-HASH.js gzip 194 B 192 B N/A
amp-HASH.js gzip 509 B 512 B N/A
css-HASH.js gzip 342 B 342 B
dynamic-HASH.js gzip 1.84 kB 1.85 kB N/A
edge-ssr-HASH.js gzip 265 B 265 B
head-HASH.js gzip 363 B 362 B N/A
hooks-HASH.js gzip 392 B 392 B
image-HASH.js gzip 4.43 kB 4.44 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.35 kB 2.34 kB N/A
routerDirect..HASH.js gzip 325 B 328 B N/A
script-HASH.js gzip 397 B 398 B N/A
withRouter-HASH.js gzip 325 B 323 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 1.37 kB 1.37 kB
Client Build Manifests
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
_buildManifest.js gzip 746 B 750 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
index.html gzip 523 B 523 B
link.html gzip 536 B 538 B N/A
withRouter.html gzip 519 B 518 B N/A
Overall change 523 B 523 B
Edge SSR bundle Size
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
edge-ssr.js gzip 128 kB 128 kB N/A
page.js gzip 200 kB 200 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
middleware-b..fest.js gzip 670 B 667 B N/A
middleware-r..fest.js gzip 155 B 155 B
middleware.js gzip 31 kB 31 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 999 B 999 B
Next Runtimes Overall increase ⚠️
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
732-experime...dev.js gzip 322 B 322 B
732.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 323 kB 323 kB
app-page-exp..prod.js gzip 125 kB 125 kB
app-page-tur..prod.js gzip 138 kB 138 kB
app-page-tur..prod.js gzip 133 kB 133 kB
app-page.run...dev.js gzip 314 kB 314 kB
app-page.run..prod.js gzip 121 kB 121 kB
app-route-ex...dev.js gzip 36 kB 36 kB
app-route-ex..prod.js gzip 24.4 kB 24.4 kB
app-route-tu..prod.js gzip 24.4 kB 24.4 kB
app-route-tu..prod.js gzip 24.2 kB 24.2 kB
app-route.ru...dev.js gzip 37.7 kB 37.7 kB
app-route.ru..prod.js gzip 24.2 kB 24.2 kB
pages-api-tu..prod.js gzip 9.57 kB 9.57 kB
pages-api.ru...dev.js gzip 11.4 kB 11.4 kB
pages-api.ru..prod.js gzip 9.56 kB 9.56 kB
pages-turbo...prod.js gzip 21 kB 21 kB
pages.runtim...dev.js gzip 26.6 kB 26.6 kB
pages.runtim..prod.js gzip 21 kB 21 kB
server.runti..prod.js gzip 916 kB 916 kB ⚠️ +138 B
Overall change 2.34 MB 2.34 MB ⚠️ +138 B
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js lubieowoce/waituntil-before-server-exit Change
0.pack gzip 2.04 MB 2.04 MB ⚠️ +1.52 kB
index.pack gzip 150 kB 148 kB N/A
Overall change 2.04 MB 2.04 MB ⚠️ +1.52 kB
Diff details
Diff for page.js
@@ -15,7 +15,7 @@
       /***/
     },
 
-    /***/ 2047: /***/ (
+    /***/ 3466: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -30,7 +30,7 @@
         default: () => /* binding */ nHandler,
       });
 
-      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSv586B%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSv586B%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       var page_next_edge_ssr_entry_namespaceObject = {};
       __webpack_require__.r(page_next_edge_ssr_entry_namespaceObject);
       __webpack_require__.d(page_next_edge_ssr_entry_namespaceObject, {
@@ -84,43 +84,43 @@
         workUnitAsyncStorage: () => entry_base /* workUnitAsyncStorage */.FP,
       });
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/web/globals.js
-      var globals = __webpack_require__(2779);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
-      var adapter = __webpack_require__(7343);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 84 modules
-      var render = __webpack_require__(1122);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 5 modules
-      var incremental_cache = __webpack_require__(5992);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/app-render/app-render.js + 68 modules
-      var app_render = __webpack_require__(8010);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
-      var module_compiled = __webpack_require__(5465);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/route-kind.js
-      var route_kind = __webpack_require__(3294);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/client/components/error-boundary.js
-      var error_boundary = __webpack_require__(2504);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/app-render/entry-base.js + 26 modules
-      var entry_base = __webpack_require__(7051); // ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSv586B%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/web/globals.js
+      var globals = __webpack_require__(1516);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
+      var adapter = __webpack_require__(3158);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 84 modules
+      var render = __webpack_require__(3885);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 5 modules
+      var incremental_cache = __webpack_require__(4901);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/app-render/app-render.js + 68 modules
+      var app_render = __webpack_require__(967);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
+      var module_compiled = __webpack_require__(8712);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/route-kind.js
+      var route_kind = __webpack_require__(8407);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/client/components/error-boundary.js
+      var error_boundary = __webpack_require__(3439);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/app-render/entry-base.js + 26 modules
+      var entry_base = __webpack_require__(7170); // ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSv586B%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       const module0 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 7997)
+          __webpack_require__.bind(__webpack_require__, 3039)
         );
       const module1 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 7364)
+          __webpack_require__.bind(__webpack_require__, 6413)
         );
       const module2 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 773)
+          __webpack_require__.bind(__webpack_require__, 8880)
         );
       const module3 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 9458)
+          __webpack_require__.bind(__webpack_require__, 4193)
         );
       const page4 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 5191)
+          __webpack_require__.bind(__webpack_require__, 7993)
         );
 
       // We inject the tree and pages here so that we can use them in the route
@@ -188,12 +188,12 @@
       });
 
       //# sourceMappingURL=app-page.js.map
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/lib/page-types.js
-      var page_types = __webpack_require__(3721);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/app-render/encryption-utils.js
-      var encryption_utils = __webpack_require__(1672);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/esm/server/app-render/action-utils.js
-      var action_utils = __webpack_require__(8587); // ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VFeHRlbnNpb25zIjpbInRzeCIsInRzIiwianN4IiwianMiXSwicG93ZXJlZEJ5SGVhZGVyIjp0cnVlLCJjb21wcmVzcyI6dHJ1ZSwiaW1hZ2VzIjp7ImRldmljZVNpemVzIjpbNjQwLDc1MCw4MjgsMTA4MCwxMjAwLDE5MjAsMjA0OCwzODQwXSwiaW1hZ2VTaXplcyI6WzE2LDMyLDQ4LDY0LDk2LDEyOCwyNTYsMzg0XSwicGF0aCI6Ii9fbmV4dC9pbWFnZSIsImxvYWRlciI6ImRlZmF1bHQiLCJsb2FkZXJGaWxlIjoiIiwiZG9tYWlucyI6W10sImRpc2FibGVT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zRCE=","sriEnabled":false,"middlewareConfig":"e30=","cacheHandlers":"{}"}!
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/lib/page-types.js
+      var page_types = __webpack_require__(8018);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/app-render/encryption-utils.js
+      var encryption_utils = __webpack_require__(3655);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/esm/server/app-render/action-utils.js
+      var action_utils = __webpack_require__(8840); // ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAw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YWdlPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZVBhdGg9cHJpdmF0ZS1uZXh0LWFwcC1kaXIlMkZhcHAtZWRnZS1zc3IlMkZwYWdlLmpzJmFwcERpcj0lMkZ0bXAlMkZuZXh0LXN0YXRzU3Y1ODZCJTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JmZseWluZ1NodXR0bGU9ZmFsc2UmcHJlZmVycmVkUmVnaW9uPSZtaWRkbGV3YXJlQ29uZmlnPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30=","cacheHandlers":"{}"}!
       var _self___RSC_MANIFEST;
 
       const incrementalCacheHandler = null;
@@ -479,105 +479,105 @@
       /***/
     },
 
-    /***/ 4344: /***/ (
+    /***/ 4381: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9800)
+        __webpack_require__.bind(__webpack_require__, 9527)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1842)
+        __webpack_require__.bind(__webpack_require__, 2791)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2132)
+        __webpack_require__.bind(__webpack_require__, 939)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2504)
+        __webpack_require__.bind(__webpack_require__, 3439)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5515)
+        __webpack_require__.bind(__webpack_require__, 5822)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1451)
+        __webpack_require__.bind(__webpack_require__, 538)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9637)
+        __webpack_require__.bind(__webpack_require__, 6286)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2784)
+        __webpack_require__.bind(__webpack_require__, 5224)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 7754)
+        __webpack_require__.bind(__webpack_require__, 1093)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1129)
+        __webpack_require__.bind(__webpack_require__, 5362)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2792)
+        __webpack_require__.bind(__webpack_require__, 8575)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4226)
+        __webpack_require__.bind(__webpack_require__, 253)
       );
 
       /***/
     },
 
-    /***/ 5016: /***/ (
+    /***/ 8349: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4089)
+        __webpack_require__.bind(__webpack_require__, 212)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9302)
+        __webpack_require__.bind(__webpack_require__, 619)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3880)
+        __webpack_require__.bind(__webpack_require__, 6647)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 6044)
+        __webpack_require__.bind(__webpack_require__, 3371)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3940)
+        __webpack_require__.bind(__webpack_require__, 7210)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1791)
+        __webpack_require__.bind(__webpack_require__, 9488)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 7161)
+        __webpack_require__.bind(__webpack_require__, 986)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3171)
+        __webpack_require__.bind(__webpack_require__, 4086)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5782)
+        __webpack_require__.bind(__webpack_require__, 105)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4085)
+        __webpack_require__.bind(__webpack_require__, 9670)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1444)
+        __webpack_require__.bind(__webpack_require__, 4515)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 950)
+        __webpack_require__.bind(__webpack_require__, 8777)
       );
 
       /***/
     },
 
-    /***/ 8594: /***/ () => {
+    /***/ 5055: /***/ () => {
       /***/
     },
 
-    /***/ 6746: /***/ () => {
+    /***/ 4887: /***/ () => {
       /***/
     },
 
-    /***/ 5191: /***/ (
+    /***/ 7993: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -597,7 +597,7 @@
       /***/
     },
 
-    /***/ 7997: /***/ (
+    /***/ 3039: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -609,7 +609,7 @@
         /* harmony export */
       });
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(2036);
+        __webpack_require__(9466);
 
       function RootLayout({ children }) {
         return /*#__PURE__*/ (0,
@@ -628,7 +628,7 @@
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ __webpack_require__.O(0, [630, 333], () => __webpack_exec__(2047));
+    /******/ __webpack_require__.O(0, [752, 58], () => __webpack_exec__(3466));
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)[
       "middleware_app/app-edge-ssr/page"
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [2983],
   {
-    /***/ 1277: /***/ (
+    /***/ 7740: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(7750);
+          return __webpack_require__(9582);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 141: /***/ (module, exports, __webpack_require__) => {
+    /***/ 2169: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
         __webpack_require__(4961)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(9272)
+        __webpack_require__(6404)
       );
-      const _getimgprops = __webpack_require__(9353);
-      const _imageconfig = __webpack_require__(6004);
-      const _imageconfigcontextsharedruntime = __webpack_require__(558);
-      const _warnonce = __webpack_require__(1444);
-      const _routercontextsharedruntime = __webpack_require__(4231);
+      const _getimgprops = __webpack_require__(4173);
+      const _imageconfig = __webpack_require__(8672);
+      const _imageconfigcontextsharedruntime = __webpack_require__(4154);
+      const _warnonce = __webpack_require__(1512);
+      const _routercontextsharedruntime = __webpack_require__(1075);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3109)
+        __webpack_require__(3697)
       );
-      const _usemergedref = __webpack_require__(1082);
+      const _usemergedref = __webpack_require__(5598);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
       /***/
     },
 
-    /***/ 1082: /***/ (module, exports, __webpack_require__) => {
+    /***/ 5598: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -432,7 +432,7 @@
       /***/
     },
 
-    /***/ 9353: /***/ (
+    /***/ 4173: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -448,9 +448,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(1444);
-      const _imageblursvg = __webpack_require__(6240);
-      const _imageconfig = __webpack_require__(6004);
+      const _warnonce = __webpack_require__(1512);
+      const _imageblursvg = __webpack_require__(2356);
+      const _imageconfig = __webpack_require__(8672);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -824,7 +824,7 @@
       /***/
     },
 
-    /***/ 6240: /***/ (__unused_webpack_module, exports) => {
+    /***/ 2356: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -879,7 +879,7 @@
       /***/
     },
 
-    /***/ 9893: /***/ (
+    /***/ 1609: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -906,10 +906,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(1739);
-      const _getimgprops = __webpack_require__(9353);
-      const _imagecomponent = __webpack_require__(141);
+      const _getimgprops = __webpack_require__(4173);
+      const _imagecomponent = __webpack_require__(2169);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3109)
+        __webpack_require__(3697)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -941,7 +941,7 @@
       /***/
     },
 
-    /***/ 3109: /***/ (__unused_webpack_module, exports) => {
+    /***/ 3697: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -976,7 +976,7 @@
       /***/
     },
 
-    /***/ 7750: /***/ (
+    /***/ 9582: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -993,8 +993,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(9035);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_kp7s4ef2voul2kphq24roenapq/node_modules/next/image.js
-      var next_image = __webpack_require__(5912);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-b01722d5-20241114_re_g2b75t4yyljcdn7exmmiht4tum/node_modules/next/image.js
+      var next_image = __webpack_require__(761);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1024,12 +1024,12 @@
       /***/
     },
 
-    /***/ 5912: /***/ (
+    /***/ 761: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(9893);
+      module.exports = __webpack_require__(1609);
 
       /***/
     },
@@ -1039,7 +1039,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(1277)
+      __webpack_exec__(7740)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 1515-HASH.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for server.runtime.prod.js

Diff too large to display

Commit: 8030f7f

@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch 2 times, most recently from 2a23bb6 to 153e122 Compare November 14, 2024 14:39
@lubieowoce lubieowoce marked this pull request as ready for review November 14, 2024 17:24
@lubieowoce lubieowoce changed the title feat(after): wait for callbacks before next start exits feat(after): wait for after-callbacks before server shutdown Nov 14, 2024
packages/next/src/server/lib/start-server.ts Outdated Show resolved Hide resolved
packages/next/src/server/lib/start-server.ts Outdated Show resolved Hide resolved
packages/next/src/server/lib/start-server.ts Outdated Show resolved Hide resolved
packages/next/src/server/next-server.ts Outdated Show resolved Hide resolved
packages/next/src/server/next.ts Outdated Show resolved Hide resolved
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch 3 times, most recently from 1e39bcb to 6955e5d Compare November 21, 2024 15:20
@lubieowoce lubieowoce changed the base branch from canary to lubieowoce/no-duplicate-custom-server November 21, 2024 15:20
Copy link
Member Author

lubieowoce commented Nov 21, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Member Author

@lubieowoce lubieowoce Nov 21, 2024

Choose a reason for hiding this comment

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

this doesn't do very much, but we've got the same thing in a couple places, and the naive implementation of runAll has two bugs:

Promise.all(callbacks.map((f) => f()))
  1. if one of the callbacks throws, we reject the whole thing, and we want this to be fire-and-forget, so it should be Promise.allSettled
  2. we have to wrap the callbacks in an async function in case they throw synchronously, which'd bring down the whole call (see also: Promise.try), i.e callbacks.map(async (f) => f())

i figure this is annoyingly subtle enough that it's worth encapsulating. also makes it easier to find the 3 places that do it.

@lubieowoce lubieowoce force-pushed the lubieowoce/no-duplicate-custom-server branch from 2de8d17 to eff7fd2 Compare November 21, 2024 15:53
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch from 6955e5d to c6f64b4 Compare November 21, 2024 15:53
@lubieowoce lubieowoce force-pushed the lubieowoce/no-duplicate-custom-server branch from be93797 to da3b85e Compare November 21, 2024 17:42
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch from c6f64b4 to d742724 Compare November 21, 2024 17:42
@lubieowoce lubieowoce force-pushed the lubieowoce/no-duplicate-custom-server branch from da3b85e to cf8320c Compare November 22, 2024 19:02
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch 2 times, most recently from 5c96b1e to 62811ff Compare November 22, 2024 20:09
@lubieowoce lubieowoce changed the base branch from lubieowoce/no-duplicate-custom-server to graphite-base/72590 November 22, 2024 21:25
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch from 62811ff to 4aa61cf Compare November 22, 2024 21:26
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch 6 times, most recently from 31ff7ae to f13fc32 Compare November 27, 2024 14:45
@lubieowoce lubieowoce force-pushed the lubieowoce/waituntil-before-server-exit branch from f13fc32 to 8030f7f Compare November 27, 2024 17:36
@lubieowoce lubieowoce merged commit 4055dd0 into canary Nov 27, 2024
107 of 112 checks passed
@lubieowoce lubieowoce deleted the lubieowoce/waituntil-before-server-exit branch November 27, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants