-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
fix: remove traceparent from cachekey should not remove traceparent from original object #64727
fix: remove traceparent from cachekey should not remove traceparent from original object #64727
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
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.
Hi, could we add a test case for this in
to prevent regressing?8db8355
to
16f10ca
Compare
Sure thing @ijjk, I have added a test! |
…deletes-traceparent-from-request
Stats from current PRDefault Build (Increase detected
|
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
buildDuration | 14.1s | 14s | N/A |
buildDurationCached | 8.6s | 6.5s | N/A |
nodeModulesSize | 199 MB | 199 MB | N/A |
nextStartRea..uration (ms) | 400ms | 400ms | ✓ |
Client Bundles (main, webpack)
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
2453-HASH.js gzip | 31.5 kB | 31.5 kB | N/A |
3304.HASH.js gzip | 169 B | 169 B | ✓ |
3f784ff6-HASH.js gzip | 53.7 kB | 53.7 kB | N/A |
8299-HASH.js gzip | 5.1 kB | 5.1 kB | N/A |
framework-HASH.js gzip | 45.2 kB | 45.2 kB | ✓ |
main-app-HASH.js gzip | 230 B | 228 B | N/A |
main-HASH.js gzip | 29.6 kB | 29.7 kB | N/A |
webpack-HASH.js gzip | 1.64 kB | 1.65 kB | N/A |
Overall change | 45.4 kB | 45.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
_app-HASH.js gzip | 193 B | 194 B | N/A |
_error-HASH.js gzip | 193 B | 191 B | N/A |
amp-HASH.js gzip | 511 B | 511 B | ✓ |
css-HASH.js gzip | 342 B | 343 B | N/A |
dynamic-HASH.js gzip | 2.51 kB | 2.51 kB | N/A |
edge-ssr-HASH.js gzip | 265 B | 265 B | ✓ |
head-HASH.js gzip | 365 B | 364 B | N/A |
hooks-HASH.js gzip | 389 B | 391 B | N/A |
image-HASH.js gzip | 4.28 kB | 4.28 kB | N/A |
index-HASH.js gzip | 269 B | 268 B | N/A |
link-HASH.js gzip | 2.68 kB | 2.69 kB | N/A |
routerDirect..HASH.js gzip | 328 B | 326 B | N/A |
script-HASH.js gzip | 395 B | 397 B | N/A |
withRouter-HASH.js gzip | 323 B | 323 B | ✓ |
1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
Overall change | 1.21 kB | 1.21 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
_buildManifest.js gzip | 483 B | 485 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
index.html gzip | 528 B | 529 B | N/A |
link.html gzip | 540 B | 542 B | N/A |
withRouter.html gzip | 523 B | 524 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Edge SSR bundle Size
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
edge-ssr.js gzip | 94.5 kB | 94.5 kB | N/A |
page.js gzip | 3.05 kB | 3.04 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Middleware size
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
middleware-b..fest.js gzip | 624 B | 626 B | N/A |
middleware-r..fest.js gzip | 155 B | 156 B | N/A |
middleware.js gzip | 25.6 kB | 25.6 kB | N/A |
edge-runtime..pack.js gzip | 839 B | 839 B | ✓ |
Overall change | 839 B | 839 B | ✓ |
Next Runtimes
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
app-page-exp...dev.js gzip | 171 kB | 171 kB | ✓ |
app-page-exp..prod.js gzip | 97.6 kB | 97.6 kB | ✓ |
app-page-tur..prod.js gzip | 99.4 kB | 99.4 kB | ✓ |
app-page-tur..prod.js gzip | 93.6 kB | 93.6 kB | ✓ |
app-page.run...dev.js gzip | 145 kB | 145 kB | ✓ |
app-page.run..prod.js gzip | 92.1 kB | 92.1 kB | ✓ |
app-route-ex...dev.js gzip | 21.5 kB | 21.5 kB | ✓ |
app-route-ex..prod.js gzip | 15.1 kB | 15.1 kB | ✓ |
app-route-tu..prod.js gzip | 15.1 kB | 15.1 kB | ✓ |
app-route-tu..prod.js gzip | 14.9 kB | 14.9 kB | ✓ |
app-route.ru...dev.js gzip | 21.2 kB | 21.2 kB | ✓ |
app-route.ru..prod.js gzip | 14.9 kB | 14.9 kB | ✓ |
pages-api-tu..prod.js gzip | 9.55 kB | 9.55 kB | ✓ |
pages-api.ru...dev.js gzip | 9.82 kB | 9.82 kB | ✓ |
pages-api.ru..prod.js gzip | 9.55 kB | 9.55 kB | ✓ |
pages-turbo...prod.js gzip | 21.4 kB | 21.4 kB | ✓ |
pages.runtim...dev.js gzip | 22.1 kB | 22.1 kB | ✓ |
pages.runtim..prod.js gzip | 21.4 kB | 21.4 kB | ✓ |
server.runti..prod.js gzip | 51.6 kB | 51.6 kB | N/A |
Overall change | 895 kB | 895 kB | ✓ |
build cache Overall increase ⚠️
vercel/next.js canary | Jeffrey-Zutt/next.js fix/delete-traceparent-from-cachekey-also-deletes-traceparent-from-request | Change | |
---|---|---|---|
0.pack gzip | 1.6 MB | 1.6 MB | N/A |
index.pack gzip | 107 kB | 107 kB | |
Overall change | 107 kB | 107 kB |
Diff details
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([
[8358],
{
- /***/ 1552: /***/ (
+ /***/ 4070: /***/ (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/image",
function () {
- return __webpack_require__(5237);
+ return __webpack_require__(396);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 2016: /***/ (module, exports, __webpack_require__) => {
+ /***/ 8490: /***/ (module, exports, __webpack_require__) => {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -40,15 +40,15 @@
__webpack_require__(422)
);
const _head = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6074)
+ __webpack_require__(2457)
);
- const _getimgprops = __webpack_require__(9571);
- const _imageconfig = __webpack_require__(6567);
- const _imageconfigcontextsharedruntime = __webpack_require__(419);
- const _warnonce = __webpack_require__(4486);
- const _routercontextsharedruntime = __webpack_require__(162);
+ const _getimgprops = __webpack_require__(7932);
+ const _imageconfig = __webpack_require__(5706);
+ const _imageconfigcontextsharedruntime = __webpack_require__(9483);
+ const _warnonce = __webpack_require__(9035);
+ const _routercontextsharedruntime = __webpack_require__(4829);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6996)
+ __webpack_require__(7240)
);
// This is replaced by webpack define plugin
const configEnv = {
@@ -379,7 +379,7 @@
/***/
},
- /***/ 9571: /***/ (
+ /***/ 7932: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -395,9 +395,9 @@
return getImgProps;
},
});
- const _warnonce = __webpack_require__(4486);
- const _imageblursvg = __webpack_require__(133);
- const _imageconfig = __webpack_require__(6567);
+ const _warnonce = __webpack_require__(9035);
+ const _imageblursvg = __webpack_require__(2642);
+ const _imageconfig = __webpack_require__(5706);
const VALID_LOADING_VALUES =
/* unused pure expression or super */ null && [
"lazy",
@@ -772,7 +772,7 @@
/***/
},
- /***/ 133: /***/ (__unused_webpack_module, exports) => {
+ /***/ 2642: /***/ (__unused_webpack_module, exports) => {
"use strict";
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -827,7 +827,7 @@
/***/
},
- /***/ 4085: /***/ (
+ /***/ 503: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -854,10 +854,10 @@
},
});
const _interop_require_default = __webpack_require__(2430);
- const _getimgprops = __webpack_require__(9571);
- const _imagecomponent = __webpack_require__(2016);
+ const _getimgprops = __webpack_require__(7932);
+ const _imagecomponent = __webpack_require__(8490);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6996)
+ __webpack_require__(7240)
);
function getImageProps(imgProps) {
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -889,7 +889,7 @@
/***/
},
- /***/ 6996: /***/ (__unused_webpack_module, exports) => {
+ /***/ 7240: /***/ (__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -924,7 +924,7 @@
/***/
},
- /***/ 5237: /***/ (
+ /***/ 396: /***/ (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -941,8 +941,8 @@
// EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(1527);
- // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/image.js
- var next_image = __webpack_require__(1577);
+ // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/image.js
+ var next_image = __webpack_require__(73);
var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
/* harmony default export */ const nextjs = {
src: "/_next/static/media/nextjs.cae0b805.png",
@@ -972,12 +972,8 @@
/***/
},
- /***/ 1577: /***/ (
- module,
- __unused_webpack_exports,
- __webpack_require__
- ) => {
- module.exports = __webpack_require__(4085);
+ /***/ 73: /***/ (module, __unused_webpack_exports, __webpack_require__) => {
+ module.exports = __webpack_require__(503);
/***/
},
@@ -987,7 +983,7 @@
/******/ var __webpack_exec__ = (moduleId) =>
__webpack_require__((__webpack_require__.s = moduleId));
/******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
- __webpack_exec__(1552)
+ __webpack_exec__(4070)
);
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for 2453-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
Tests Passed |
commit ea37c04 Author: Hendrik Liebau <mail@hendrik-liebau.de> Date: Wed Apr 17 21:59:01 2024 +0200 Fix vscode launch configs to allow setting breakpoints in the IDE commit 47fe8e8 Author: Hendrik Liebau <mail@hendrik-liebau.de> Date: Sat Apr 20 21:23:37 2024 +0200 Add and load React production source maps This can be reverted when a React canary version is used that includes facebook/react#28881. commit c8f3798 Author: Hendrik Liebau <mail@hendrik-liebau.de> Date: Sat Apr 20 21:18:35 2024 +0200 Inline Next.js sources content into source map files This avoids a `loadNetworkResource` error in Chrome DevTools when trying to set breakpoints in the Next.js sources, for both server and client. commit c286c02 Author: Tim Neutkens <tim@timneutkens.nl> Date: Sat Apr 20 15:45:35 2024 +0200 Disable ncc cache instead of cache cleaning (#64804) `ncc cache clean` is running each time we call `ncc-compiled`. This PR removes the cache cleaning and instead just always passes `cache: false` to disable the built-in ncc cache. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change Closes NEXT- Fixes # --> Closes NEXT-3174 commit b914ad8 Author: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Fri Apr 19 18:11:32 2024 -0600 fix interception route rewrite regex not supporting hyphenated segments (#64805) The function we use to generate a string with named parameters to pass into `path-to-regexp` currently doesn't properly handle non-word characters (namely, for the purposes of this bugfix, hyphens). As a result, `pathToRegexp` will convert something like `/foo/:bar-baz` into `/^\/foo(?:\/([^\/#\?]+?))-baz[\/#\?]?$/i`, effectively only treating the `:foo` as part of the regex capture group and leaving a dangling -baz. This means using an interception route within a dynamic segment (such as `/foo/[bar-baz]`) would not properly trigger the route interception Fixes #64766 commit 02e5f65 Author: vercel-release-bot <infra+release@vercel.com> Date: Fri Apr 19 23:23:22 2024 +0000 v14.3.0-canary.13 commit c1ca6ac Author: Jeffrey Zutt <jeffrey@hang-out.nl> Date: Sat Apr 20 01:13:58 2024 +0200 fix: remove traceparent from cachekey should not remove traceparent from original object (#64727) I submitted PR #64499 , it got merged, but it contains a mistake. I'm terribly sorry about this! By removing the traceparent from the cachekey, we mistakenly removed the header from the original object. Causing the actual request to be executed without the traceparent header. Creating a cachekey should not alter the original object. Flip the arguments for Object.assign --------- Co-authored-by: Jeffrey <jeffrey@jeffreyzutt.nl> Co-authored-by: JJ Kasper <jj@jjsweb.site> commit ea0f516 Author: Sean O'Neil <59893658+sean-rallycry@users.noreply.github.com> Date: Fri Apr 19 15:43:26 2024 -0500 Update 06-bundle-analyzer.mdx (#64740) The[ existing code example](https://nextjs.org/docs/app/building-your-application/optimizing/bundle-analyzer) generates the following warning when using `--turbo` in the current latest version of NextJS (14.2.2): ⚠ Webpack is configured while Turbopack is not, which may cause problems. ⚠ See instructions if you need to configure Turbopack: https://nextjs.org/docs/app/api-reference/next-config-js/turbo This modification ensures that the bundle analyzer is only applied when the user intends to generate a report. Fixes # #64739 --------- Co-authored-by: Lee Robinson <me@leerob.io> Co-authored-by: Maxim Svetlakov <maxim@ebookapplications.com> Co-authored-by: JJ Kasper <jj@jjsweb.site> commit cf038a3 Author: Steven Primeaux <58159084+Auxdible@users.noreply.github.com> Date: Fri Apr 19 14:36:25 2024 -0400 docs: "generateMetadata" to "generateViewport" in doc "generateViewport" (#64795) Changed "generateMetadata" to "generateViewport" in generate-viewport.mdx Co-authored-by: Sam Ko <sam@vercel.com> commit a0f334c Author: Kushagra Sharma <162145291+IAmKushagraSharma@users.noreply.github.com> Date: Sat Apr 20 00:04:21 2024 +0530 Update index.mdx (#64794) Removed a type annotation from a code block <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change Closes NEXT- Fixes # --> commit bd6ab04 Author: Tim Neutkens <tim@timneutkens.nl> Date: Fri Apr 19 20:26:54 2024 +0200 Upgrade Turborepo (#64767) Upgrade Turborepo to the latest version and enable the new terminal UI to dogfood: https://turbo.build/blog/turbo-1-13-0#new-terminal-ui. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change Closes NEXT- Fixes # --> Closes NEXT-3164
…rom original object (#64727) ### What? I submitted PR #64499 , it got merged, but it contains a mistake. I'm terribly sorry about this! By removing the traceparent from the cachekey, we mistakenly removed the header from the original object. Causing the actual request to be executed without the traceparent header. ### Why? Creating a cachekey should not alter the original object. ### How? Flip the arguments for Object.assign --------- Co-authored-by: Jeffrey <jeffrey@jeffreyzutt.nl> Co-authored-by: JJ Kasper <jj@jjsweb.site>
What?
I submitted PR #64499 , it got merged, but it contains a mistake.
I'm terribly sorry about this!
By removing the traceparent from the cachekey, we mistakenly removed the header from the original object.
Causing the actual request to be executed without the traceparent header.
Why?
Creating a cachekey should not alter the original object.
How?
Flip the arguments for Object.assign