Skip to content

[prebuilt-skew-protection] feat: adding in automatic deploymentId#88496

Merged
ijjk merged 37 commits intocanaryfrom
revert-88449-revert-88012-brooke/addAutomaticDeploymentId
Jan 22, 2026
Merged

[prebuilt-skew-protection] feat: adding in automatic deploymentId#88496
ijjk merged 37 commits intocanaryfrom
revert-88449-revert-88012-brooke/addAutomaticDeploymentId

Conversation

@brookemosby
Copy link
Contributor

@brookemosby brookemosby commented Jan 13, 2026

Original PR has a bug that attempted to validate on environment variables. Edited function to not run validations on environment variables, only on the user provided deployment id.

@nextjs-bot nextjs-bot added Documentation Related to Next.js' official documentation. tests type: next labels Jan 13, 2026
@vercel
Copy link
Contributor

vercel bot commented Jan 13, 2026

Notifying the following users due to files changed in this PR based on this repo's notify modifiers:

@timneutkens, @ijjk, @shuding, @huozhi:

packages/next/src/server/config.ts

@brookemosby brookemosby marked this pull request as draft January 13, 2026 17:33
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 13, 2026

Allow CI Workflow Run

  • approve CI run for commit: 6389c03

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

})

it('should allow dpl_ prefixed deployment ID from NEXT_DEPLOYMENT_ID env var (Vercel sets this)', () => {
const vercelDeploymentId = 'dpl_abc123xyz'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to prevent regression

@brookemosby brookemosby requested a review from ijjk January 13, 2026 17:56
@brookemosby brookemosby marked this pull request as ready for review January 13, 2026 17:56
@brookemosby brookemosby requested a review from styfle January 14, 2026 16:34
@brookemosby brookemosby changed the title Revert 88449 revert 88012 brooke/add automatic deployment add automatic deployment Jan 14, 2026
@ijjk ijjk added the CI approved Approve running CI for fork label Jan 15, 2026
@ijjk ijjk changed the title add automatic deployment [prebuilt-skew-protection] feat: adding in automatic deploymentId Jan 15, 2026
@ijjk ijjk enabled auto-merge (squash) January 15, 2026 23:07
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 15, 2026

Failing test suites

Commit: 056e895 | About building and testing Next.js

pnpm test-start test/production/deterministic-build/deployment-id.test.ts (job)

  • deterministic build - changing deployment id > should produce identical build outputs even when changing deployment id (DD)
Expand output

● deterministic build - changing deployment id › should produce identical build outputs even when changing deployment id

expect(received).toEqual(expected) // deep equality

- Expected  - 3
+ Received  + 3

@@ -346,13 +346,13 @@
    "server/pages/pages-static/next-font-manifest.json",
    "server/pages/pages-static/pages-manifest.json",
    "server/pages/pages-static/react-loadable-manifest.json",
    "server/server-reference-manifest.js",
    "server/server-reference-manifest.json",
-   "static/Ws_bfo_OaStgBt6ikws1u/_buildManifest.js",
-   "static/Ws_bfo_OaStgBt6ikws1u/_clientMiddlewareManifest.js",
-   "static/Ws_bfo_OaStgBt6ikws1u/_ssgManifest.js",
+   "static/9ppjEja5Id7QlyBP943X3/_buildManifest.js",
+   "static/9ppjEja5Id7QlyBP943X3/_clientMiddlewareManifest.js",
+   "static/9ppjEja5Id7QlyBP943X3/_ssgManifest.js",
    "static/_ssgManifest.js",
    "static/chunks/15a7402474eccd94.js",
    "static/chunks/61511bd68a4f7737.js",
    "static/chunks/69e31b8a57d5549f.js",
    "static/chunks/71b4292c93ff479b.js",

  91 |       let run1FileNames = run1.map(([f, _]) => f)
  92 |       let run2FileNames = run2.map(([f, _]) => f)
> 93 |       expect(run1FileNames).toEqual(run2FileNames)
     |                             ^
  94 |
  95 |       // Then, compare the file contents
  96 |       run1 = run1.filter(([f, _]) => !IGNORE_CONTENT.test(f))

  at Object.toEqual (production/deterministic-build/deployment-id.test.ts:93:29)

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 15, 2026

Stats from current PR

🔴 1 regression

Metric Canary PR Change Trend
node_modules Size 459 MB 460 MB 🔴 +204 kB (+0%) █████
📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 455ms 455ms ▁▁▁██
Cold (Ready in log) 450ms 446ms ▂█▆▄▂
Cold (First Request) 863ms 856ms ▁█▇▃▁
Warm (Listen) 455ms 455ms ▁▁▁█▁
Warm (Ready in log) 446ms 444ms ▃▁▁█▄
Warm (First Request) 355ms 352ms █▇▁▇▅
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 456ms 456ms ▁▁▁▁▁
Cold (Ready in log) 437ms 435ms ▇▄▄▄▅
Cold (First Request) 1.808s 1.799s █▅▃▄▅
Warm (Listen) 456ms 456ms █▁▁▁▁
Warm (Ready in log) 437ms 435ms █▆▆▅▆
Warm (First Request) 1.818s 1.817s █▄▃▃▄

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 4.408s 4.406s ▄▁▁█▆
Cached Build 4.414s 4.444s ▆▁▁█▆
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 13.961s 13.908s ▅▂▁▁▁
Cached Build 14.059s 14.069s ▇▂▁▁▂
node_modules Size 459 MB 460 MB 🔴 +204 kB (+0%) █████
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles: **432 kB** → **431 kB** ✅ -47 B

82 files with content-based hashes (individual files not comparable between builds)

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 762 B 763 B
Total 762 B 763 B ⚠️ +1 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 450 B 451 B
Total 450 B 451 B ⚠️ +1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
2086.HASH.js gzip 169 B N/A -
2161-HASH.js gzip 5.41 kB N/A -
2747-HASH.js gzip 4.48 kB N/A -
4322-HASH.js gzip 52.5 kB N/A -
ec793fe8-HASH.js gzip 62.3 kB N/A -
framework-HASH.js gzip 59.8 kB 59.8 kB
main-app-HASH.js gzip 251 B 253 B
main-HASH.js gzip 38.7 kB 39.1 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
1596.HASH.js gzip N/A 169 B -
2658-HASH.js gzip N/A 52.2 kB -
6349-HASH.js gzip N/A 4.46 kB -
7019-HASH.js gzip N/A 5.43 kB -
b17a3386-HASH.js gzip N/A 62.3 kB -
Total 225 kB 225 kB ⚠️ +31 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 193 B
_error-HASH.js gzip 182 B 182 B
css-HASH.js gzip 336 B 335 B
dynamic-HASH.js gzip 1.8 kB 1.8 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 352 B 349 B
hooks-HASH.js gzip 385 B 384 B
image-HASH.js gzip 580 B 580 B
index-HASH.js gzip 259 B 258 B
link-HASH.js gzip 2.5 kB 2.51 kB
routerDirect..HASH.js gzip 319 B 317 B
script-HASH.js gzip 385 B 387 B
withRouter-HASH.js gzip 316 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.97 kB 7.96 kB ✅ -8 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 125 kB 125 kB
page.js gzip 243 kB 238 kB 🟢 4.74 kB (-2%)
Total 368 kB 363 kB ✅ -4.54 kB
Middleware
Canary PR Change
middleware-b..fest.js gzip 616 B 619 B
middleware-r..fest.js gzip 155 B 156 B
middleware.js gzip 32.9 kB 33.2 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 34.5 kB 34.8 kB ⚠️ +321 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 738 B 738 B
Total 738 B 738 B
Build Cache
Canary PR Change
0.pack gzip 3.67 MB 3.67 MB
index.pack gzip 99.6 kB 99 kB
index.pack.old gzip 99.4 kB 99.6 kB
Total 3.87 MB 3.87 MB ⚠️ +1.7 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 305 kB 305 kB
app-page-exp..prod.js gzip 162 kB 162 kB
app-page-tur...dev.js gzip 305 kB 305 kB
app-page-tur..prod.js gzip 162 kB 162 kB
app-page-tur...dev.js gzip 301 kB 302 kB
app-page-tur..prod.js gzip 160 kB 160 kB
app-page.run...dev.js gzip 302 kB 302 kB
app-page.run..prod.js gzip 160 kB 160 kB
app-route-ex...dev.js gzip 68.8 kB 68.9 kB
app-route-ex..prod.js gzip 47.6 kB 47.7 kB
app-route-tu...dev.js gzip 68.8 kB 68.9 kB
app-route-tu..prod.js gzip 47.6 kB 47.7 kB
app-route-tu...dev.js gzip 68.4 kB 68.5 kB
app-route-tu..prod.js gzip 47.4 kB 47.5 kB
app-route.ru...dev.js gzip 68.4 kB 68.5 kB
app-route.ru..prod.js gzip 47.4 kB 47.4 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 41.2 kB 41.2 kB
pages-api-tu..prod.js gzip 31.3 kB 31.3 kB
pages-api.ru...dev.js gzip 41.1 kB 41.2 kB
pages-api.ru..prod.js gzip 31.2 kB 31.3 kB
pages-turbo....dev.js gzip 50.8 kB 50.9 kB
pages-turbo...prod.js gzip 38.2 kB 38.3 kB
pages.runtim...dev.js gzip 50.8 kB 50.9 kB
pages.runtim..prod.js gzip 38.2 kB 38.3 kB
server.runti..prod.js gzip 62.2 kB 62.2 kB
Total 2.71 MB 2.71 MB ⚠️ +1.73 kB
📝 Changed Files (25 files)

Files with changes:

  • app-page-exp..ntime.dev.js
  • app-page-exp..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page.runtime.dev.js
  • app-page.runtime.prod.js
  • app-route-ex..ntime.dev.js
  • app-route-ex..time.prod.js
  • app-route-tu..ntime.dev.js
  • app-route-tu..time.prod.js
  • app-route-tu..ntime.dev.js
  • app-route-tu..time.prod.js
  • app-route.runtime.dev.js
  • app-route.ru..time.prod.js
  • pages-api-tu..ntime.dev.js
  • pages-api-tu..time.prod.js
  • pages-api.runtime.dev.js
  • pages-api.ru..time.prod.js
  • ... and 5 more
View diffs
app-page-exp..ntime.dev.js

Diff too large to display

app-page-exp..time.prod.js

Diff too large to display

app-page-tur..ntime.dev.js

Diff too large to display

app-page-tur..time.prod.js

Diff too large to display

app-page-tur..ntime.dev.js

Diff too large to display

app-page-tur..time.prod.js

Diff too large to display

app-page.runtime.dev.js

Diff too large to display

app-page.runtime.prod.js

Diff too large to display

app-route-ex..ntime.dev.js

Diff too large to display

app-route-ex..time.prod.js

Diff too large to display

app-route-tu..ntime.dev.js

Diff too large to display

app-route-tu..time.prod.js

Diff too large to display

app-route-tu..ntime.dev.js

Diff too large to display

app-route-tu..time.prod.js

Diff too large to display

app-route.runtime.dev.js

Diff too large to display

app-route.ru..time.prod.js

Diff too large to display

pages-api-tu..ntime.dev.js

Diff too large to display

pages-api-tu..time.prod.js

Diff too large to display

pages-api.runtime.dev.js

Diff too large to display

pages-api.ru..time.prod.js

Diff too large to display

pages-turbo...ntime.dev.js

Diff too large to display

pages-turbo...time.prod.js

Diff too large to display

pages.runtime.dev.js

Diff too large to display

pages.runtime.prod.js

Diff too large to display

server.runtime.prod.js

Diff too large to display

@abdonrd
Copy link
Contributor

abdonrd commented Jan 21, 2026

Related to this PR, I would like to mention that it would be really great to have more documentation on this:

@ijjk ijjk merged commit 7282ce6 into canary Jan 22, 2026
160 checks passed
@ijjk ijjk deleted the revert-88449-revert-88012-brooke/addAutomaticDeploymentId branch January 22, 2026 21:07
mischnic added a commit that referenced this pull request Jan 23, 2026
@eps1lon
Copy link
Member

eps1lon commented Jan 23, 2026

Reverting in #88942 due to incompatibilities with basic CNA deployments

mischnic added a commit that referenced this pull request Jan 23, 2026
@github-actions github-actions bot added the locked label Feb 6, 2026
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CI approved Approve running CI for fork Documentation Related to Next.js' official documentation. locked tests type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants