Skip to content

Propagate adapter preferred regions#94123

Open
timneutkens wants to merge 4 commits into
canaryfrom
codex/adapter-preferred-region
Open

Propagate adapter preferred regions#94123
timneutkens wants to merge 4 commits into
canaryfrom
codex/adapter-preferred-region

Conversation

@timneutkens
Copy link
Copy Markdown
Contributor

What?

Propagate edge runtime preferredRegion metadata into adapter outputs and add adapter-config coverage for an edge app route.

Why?

Adapters need access to preferred region metadata from edge outputs when generating provider-specific deployment output.

How?

Copy edge function regions into output.config.preferredRegion and assert the adapter build-complete output for a fixture route with preferredRegion set to cdg1.

Verification

  • pnpm --filter=next build
  • NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/production/adapter-config/adapter-config.test.ts

@timneutkens timneutkens marked this pull request as ready for review May 26, 2026 12:02
@timneutkens timneutkens requested a review from ijjk May 26, 2026 12:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Failing test suites

Commit: 1b7e45a | About building and testing Next.js

pnpm test-dev test/development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts (job)

  • instant-nav-panel > SPA captures > should re-arm capture and return to awaiting navigation after Continue Rendering from SPA state (DD)
Expand output

● instant-nav-panel › SPA captures › should re-arm capture and return to awaiting navigation after Continue Rendering from SPA state

expect(received).toMatch(expected)

Expected pattern: /next-instant-navigation-testing=[^;]+/
Received string:  ""

  25 |     await retry(async () => {
  26 |       const cookie = await browser.eval(() => document.cookie)
> 27 |       expect(cookie).toMatch(/next-instant-navigation-testing=[^;]+/)
     |                      ^
  28 |     })
  29 |   }
  30 |

  at toMatch (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:27:22)
  at retry (lib/next-test-utils.ts:867:14)
  at waitForInstantModeCookie (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:25:5)
  at Object.<anonymous> (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:542:7)

Other failing CI jobs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Stats cancelled

Commit: 1b7e45a
View workflow run

Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

The app/preferred-region/route.ts fixture with dynamic = 'force-dynamic' and runtime = 'edge' is not excluded from the output: 'export' test build, causing it to fail.

Fix on Vercel

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.

3 participants