Skip to content

WC-6046 simplify preview onboarding - #15748

Draft
podonnell-dev wants to merge 4 commits into
mainfrom
podonnell/WC-6046-simplify-preview-onboarding
Draft

podonnell-dev wants to merge 4 commits into
mainfrom
podonnell/WC-6046-simplify-preview-onboarding

Conversation

@podonnell-dev

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

Copy link
Copy Markdown
Contributor

Fixes WC-6046.

Simplifying preview onboarding logic, which covers the printing of a suggest previews block based on the user's current wrangler configuration file or dashboard settings. Reduced our process to a few principles

  • align binding types with API shape; the only real difference here is the treatment of d1.database_idvs d1.id (deprecated)
  • redact user's binding and setting values by default in the suggested config
  • only specify fields that should not be redacted (very few, currently: placement.mode and r2_buckets.jurisdiction)
  • only exclude fields or nested fields from the suggested config

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

@changeset-bot

changeset-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 214e46a

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

@podonnell-dev podonnell-dev changed the title Podonnell/wc 6046 simplify preview onboarding WC-6046 simplify preview onboarding Sep 21, 2026
@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Sep 21, 2026
@podonnell-dev podonnell-dev added the ci:e2e Run wrangler + vite-plugin E2E tests on a pull request label Sep 21, 2026
placement: config.placement,
cache: config.cache,
containers: config.containers,
tail_consumers: config.tail_consumers,

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.

assemblePreviewScriptSettings() only sends the tail consumer service name to the Preview API, so an environment copied into this generated snippet is silently ignored. Since it is redacted, this also blocks the user until they replace a value that cannot affect the Preview. Exclude it while deriving the suggested Preview configuration.

Suggested change
tail_consumers: config.tail_consumers,
tail_consumers: config.tail_consumers?.map(({ service }) => ({ service })),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

generally a hidden field based on docs. silently omitted here is okay for now, but needs to be revisited

https://developers.cloudflare.com/workers/observability/logs/tail-workers/
https://developers.cloudflare.com/workers/wrangler/configuration/#non-inheritable-keys

@ask-bonk

ask-bonk Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

I'm Bonk, and I've done a quick review of your PR.

Simplifies Preview onboarding and centralizes binding/config proposal handling.

  1. P1 packages/wrangler/src/preview/preview-config.ts:346 Posted as a suggestion comment.

github run

@pkg-pr-new

pkg-pr-new Bot commented Sep 21, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

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

@cloudflare/build-output-utils

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

@cloudflare/codemods

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

@cloudflare/config

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

@cloudflare/containers-shared

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

create-cloudflare

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

@cloudflare/deploy-helpers

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-plugin

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

@cloudflare/workers-auth

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 214e46a

@podonnell-dev
podonnell-dev added this pull request to stack #15751 September 21, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run wrangler + vite-plugin E2E tests on a pull request

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants