[wrangler] Restrict name-ownership guard to Pages-to-Workers delegation#14616
Conversation
The non-interactive name-ownership guard fired for any config-less CI deploy without --name, which broke plain `wrangler deploy` for autoconfigured projects (e.g. when the generated config PR has not been merged). Limit the guard to the Pages-to-Workers delegation, where the target name is a Pages project name that must not clobber an unrelated Worker.
🦋 Changeset detectedLatest commit: 974a023 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
|
✅ All changesets look good |
|
The change is a clean, well-scoped rollback. The logic is sound:
The two existing tests (auto-generated name and carried-across I checked the consumer in LGTM |
@cloudflare/autoconfig
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
emily-shen
left a comment
There was a problem hiding this comment.
argh. sorry about missing this the first time round
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Fixes a CI regression introduced by #14312.
The non-interactive name-ownership guard added in #14312 fired for any config-less CI deploy without
--name:The
|| !args.nameclause meant a plainwrangler deployin CI, with no config file and no--name(exactly what an autoconfigured project looks like when its generated config PR hasn't been merged yet), would abort with "A Worker named ... already exists in your account". This broke the intended repeat-autoconfig-in-CI flow.This change limits the guard to the Pages-to-Workers delegation, where the target name is a Pages project name that must not clobber an unrelated Worker. Plain deploys once again deploy normally.