Skip to content

Avoid custom domain prompt for same Worker - #15434

Draft
yomna-shousha wants to merge 1 commit into
cloudflare:mainfrom
yomna-shousha:yomna/custom-domain-preview-prompt
Draft

Avoid custom domain prompt for same Worker#15434
yomna-shousha wants to merge 1 commit into
cloudflare:mainfrom
yomna-shousha:yomna/custom-domain-preview-prompt

Conversation

@yomna-shousha

Copy link
Copy Markdown
Contributor

Summary:

  • Skip the custom-domain replacement confirmation when a modified custom domain already belongs to the Worker being deployed.
  • Keep the confirmation for domains owned by another Worker.
  • Keep DNS conflict confirmation behavior unchanged.

Context:

  • Repro: deploy a Worker with a custom domain, then add route previews_enabled and redeploy in an interactive terminal.
  • Before this change, Wrangler prompts even though the existing custom domain is already used by the same Worker.

Validation:

  • pnpm exec oxfmt --check packages/deploy-helpers/src/triggers/deploy.ts packages/deploy-helpers/src/triggers/publish-routes.ts packages/deploy-helpers/tests/publish-custom-domains.test.ts packages/wrangler/src/tests/deploy/routes.test.ts
  • git diff --check -- packages/deploy-helpers/src/triggers/deploy.ts packages/deploy-helpers/src/triggers/publish-routes.ts packages/deploy-helpers/tests/publish-custom-domains.test.ts packages/wrangler/src/tests/deploy/routes.test.ts
  • pnpm --filter @cloudflare/deploy-helpers test run tests/publish-custom-domains.test.ts

Known limitation:

  • pnpm --filter wrangler test run src/tests/deploy/routes.test.ts -t "should not confirm override if custom domain already belongs to this Worker" is blocked in this checkout by existing workspace/test setup failures: writeOutput is not a function and clearOutputFilePath is not a function.

@changeset-bot

changeset-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ddfdc7a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 30, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

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

@cloudflare/build-output-utils

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

@cloudflare/codemods

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

@cloudflare/config

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

create-cloudflare

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

@cloudflare/deploy-helpers

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-plugin

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

@cloudflare/workers-auth

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: ddfdc7a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants