Skip to content

[wrangler] Guide Preview configuration onboarding - #15600

Merged
podonnell-dev merged 15 commits into
cloudflare:mainfrom
podonnell-dev:podonnell/preview-config-improvements
Sep 16, 2026
Merged

podonnell-dev merged 15 commits into
cloudflare:mainfrom
podonnell-dev:podonnell/preview-config-improvements

Conversation

@podonnell-dev

@podonnell-dev podonnell-dev commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Fixes WC-5927 and WC-5834.

First two commit are same as #15478 (already reviewed)

Last commit 58656af is handling previews onboarding. When a user runs npx wrangler preview and has no local previews block, we recommend a code snippet for the user to paste into wrangler config.

There are generally two paths:

  • user configured preview settings in dashboard (base configuration)
  • user has some production settings and is trying previews for the first time

We expect that regardless of where the user is coming from, they receive a configuration with REPLACE_ME placeholders. We also handle a few specific cases for user guidance


A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4d9e0fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Sep 11, 2026
@podonnell-dev
podonnell-dev force-pushed the podonnell/preview-config-improvements branch from b310ab2 to 34232fb Compare September 11, 2026 01:01
@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15600

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15600

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@15600

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15600

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@15600

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@15600

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15600

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@15600

miniflare

npm i https://pkg.pr.new/miniflare@15600

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15600

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@15600

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@15600

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@15600

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@15600

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15600

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@15600

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15600

wrangler

npm i https://pkg.pr.new/wrangler@15600

commit: 4d9e0fc

@podonnell-dev
podonnell-dev force-pushed the podonnell/preview-config-improvements branch 2 times, most recently from faa1478 to 58656af Compare September 15, 2026 18:37
@podonnell-dev
podonnell-dev marked this pull request as ready for review September 15, 2026 18:47
@workers-devprod
workers-devprod requested review from a team and NuroDev and removed request for a team September 15, 2026 18:47
@workers-devprod

workers-devprod commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread packages/workers-utils/src/config/validation.ts
Comment thread packages/wrangler/src/preview/preview-config.ts
Comment thread packages/wrangler/src/preview/preview-config.ts Outdated
Comment thread packages/wrangler/src/preview/ensure-config.ts
devin-ai-integration[bot]

This comment was marked as resolved.

@anowardear062-svg

Copy link
Copy Markdown

This is the most important part

@dario-piotrowicz
dario-piotrowicz removed the request for review from NuroDev September 15, 2026 20:42
Comment thread packages/deploy-helpers/src/preview/shared.ts Outdated
Comment thread packages/wrangler/src/preview/preview-config.ts Outdated
Comment thread packages/wrangler/src/preview/preview-config.ts Outdated
Comment thread packages/workers-utils/tests/config/patch-config.test.ts
Comment thread packages/wrangler/src/preview/ensure-config.ts Outdated
Comment thread packages/wrangler/src/preview/preview-config.ts

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally looks good to me, I just left some small comments here and there 🙂

Please let's fix all the typescript/eslint issues and address devin's comments too (in particular this one: #15600 (comment))

Besides that this for me is good to go 😄

devin-ai-integration[bot]

This comment was marked as resolved.

@podonnell-dev

Copy link
Copy Markdown
Contributor Author

aligning supported bindings here while fixing ai.staging validation. my general rule is: if we supported this in previews during this private beta, then it should be present (ie. no API layer changes) 2b80826

@podonnell-dev

Copy link
Copy Markdown
Contributor Author

last bug 🤞 459e8c2

ignoring local config warnings if base config (settings in dashboard) are present. this was your previous point, i'm making this more explicit now

@podonnell-dev
podonnell-dev force-pushed the podonnell/preview-config-improvements branch from 459e8c2 to eca9254 Compare September 16, 2026 14:30
@podonnell-dev

Copy link
Copy Markdown
Contributor Author

lint fix eca9254

devin-ai-integration[bot]

This comment was marked as resolved.

@podonnell-dev

Copy link
Copy Markdown
Contributor Author

fixing tests: f40d193

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 😄

(Besides all the broken docs links, which seems to be expected since wrangler preview is private beta 🙂)

Comment thread packages/wrangler/src/utils/omit-nullish.ts Outdated

@workers-devprod workers-devprod 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.

Codeowners reviews satisfied

@podonnell-dev
podonnell-dev merged commit bac0c6a into cloudflare:main Sep 16, 2026
56 checks passed
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants