Skip to content

Propagate adapter preferred regions#94123

Merged
timneutkens merged 4 commits into
canaryfrom
codex/adapter-preferred-region
May 28, 2026
Merged

Propagate adapter preferred regions#94123
timneutkens merged 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

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 1b7e45a

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Stats cancelled

Commit: 1b7e45a
View workflow run

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

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

@timneutkens timneutkens merged commit c0ce532 into canary May 28, 2026
298 of 302 checks passed
@timneutkens timneutkens deleted the codex/adapter-preferred-region branch May 28, 2026 14:48
timneutkens added a commit that referenced this pull request May 28, 2026
Backports [Propagate adapter preferred
regions](#94123) to `next-16-2`.

<!-- NEXT_JS_LLM_PR -->
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