Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

danielrs
Copy link
Contributor

@danielrs danielrs commented Aug 27, 2025

Describe your change...

This change makes preview_urls disabled by default when it's not provided, making
the feature opt-in instead of opt-out.


Internal tracking: https://jira.cfdata.org/browse/RM-24647

@danielrs danielrs requested a review from a team as a code owner August 27, 2025 15:40
Copy link

changeset-bot bot commented Aug 27, 2025

🦋 Changeset detected

Latest commit: 2ebea4c

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 Major
@cloudflare/vitest-pool-workers 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

Copy link

pkg-pr-new bot commented Aug 27, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10478

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 2ebea4c

@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-disabled branch 3 times, most recently from b7c907a to eff365d Compare August 28, 2025 01:02
@vicb
Copy link
Contributor

vicb commented Aug 28, 2025

This change makes preview_urls disabled by default when it's not provided, making
the feature opt-in instead of opt-out.

Hey @danielrs thanks for the PR.

Could you expand on the rationale of this change?
Has this been discussed with the ANT team before?
Asking because this could be seen as a breaking change.

@danielrs
Copy link
Contributor Author

@vicb We think that this feature is better off disabled by default, users can explicitly opt-in depending on their use-case.

@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-disabled branch from eff365d to 8f30d41 Compare August 29, 2025 03:23
@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-disabled branch from 8f30d41 to 9982203 Compare August 29, 2025 17:36
Should make the logic easier to understand.
We want preview_urls to be opt-in, rather than opt-out. For this reason
its default value will be falsy.
Some of the previous commits that changed defaulting uncovered that most
Wrangler Wrangler tests that had at least one route, were not mocking the
appropriate calls to zones and routes endpoints.
@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-disabled branch from 9982203 to ffb1170 Compare September 3, 2025 16:36
Wrangler differs from the Dash and other clients in that it makes a lot
decisions for the user regarding the status of the Worker subdomain. The
header should help with existing and future breaking changes between
Wrangler and the API.
Warn the user when the workers.dev or preview URLs status does not match
their Wrangler config file.
@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-disabled branch from ffb1170 to 2ebea4c Compare September 3, 2025 17:02
@aaronlisman
Copy link
Contributor

we went over these changes together and they look good in conjunction with the API changes ✅

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Sep 3, 2025
@edmundhung edmundhung merged commit cc47b51 into cloudflare:main Sep 3, 2025
29 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Sep 3, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Sep 3, 2025
Copy link

holopin-bot bot commented Sep 3, 2025

Congratulations @danielrs, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmf4anyqt0001ju04kwvrfaiw

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@MattIPv4
Copy link

👋 Just filed #10722 for this, but with this change, wrangler is now forcibly disabling preview URLs even if you enable them in the dashboard, if you call wrangler deploy without a config...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution [Holopin] Recognizes an open-source contribution, big or small
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants