Honour the Worker name selected by Workers Builds for production and Preview deployments
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript, vite
調査の方向性
Start in packages/cli/src/commands/deploy/shared.ts (production upload of the selected Worker) and packages/cli/src/commands/previews/deploy.ts (Preview Build Output), and read getCIOverrideName in @cloudflare/workers-utils plus resolveWorkerName in deploy-helpers for the precedence rules. Done when WRANGLER_CI_OVERRIDE_NAME sets the target name in both normal and --prebuilt paths, mismatched names deploy to the connected parent Worker, and the skipped override cases in the unported-07 and unported-04 test catalogues are covered.
索引モデルが issue の本文から書いたものです。
説明
Summary of the issue
cf does not honour the Worker name selected by Workers Builds when it differs from worker.name in cloudflare.config.ts. Builds supplies the selected name through WRANGLER_CI_OVERRIDE_NAME, but the tested production and native Preview deployment paths still use the configured name.
This prevents reliably connecting an existing project or template to a differently named dashboard Worker. More seriously, a native Preview build can report success while deploying a Preview under the wrong parent Worker.
Expected behaviour
For deployments run by Workers Builds, use WRANGLER_CI_OVERRIDE_NAME as the target name of the selected Worker, including when deploying existing Build Output. Both production deployments and native Previews should remain attached to the Worker connected to Builds, even when the source configuration has a different name.
Preserve preview-aware configuration (isPreview: true), Preview names, and normal configured names outside Builds. In multi-Worker output, apply the override to the selected deployment target, not every Worker. A job connected to Worker A should not redirect its deployment to Worker B merely because the configuration changes its name.
Version of cf used
1.0.0-beta.17
System information and package versions
Verified on October 14, 2026 using real hosted Workers Builds, triggered by pushes to a disposable Cloudflare Artifacts repository:
- Node:
24.18.0 - npm:
10.9.2 @cloudflare/vite-plugin:2.0.0-beta.sha-67fa336fd- Vite:
8.3.4 - Configuration:
cloudflare.config.ts; no Wrangler configuration file.
Reproduction
- Connect a simple cf/Vite Worker project to a dashboard Worker named
dashboard-worker. - Start with
worker.name: "dashboard-worker"incloudflare.config.ts. - Configure production Builds with build command
npx cf buildand deploy commandnpx cf deploy --prebuilt --no-provision. - Enable native Worker Previews, with no separate build command and deploy command
npx cf previews deploy. This command performs its own preview-aware build. - Push the matching-name configuration to the production branch and a Preview branch. Both runs succeed, and the Preview ID returned by cf matches the allocation tracked by Builds.
- Change only
worker.nametoconfig-worker, leaving the dashboard connection and build settings unchanged. Push to the production branch and a new Preview branch.
Observed results
| Configuration | Production | Native Preview |
|---|---|---|
| Config name matches connected Worker | Success | Success; expected Preview ID |
| Config name differs from connected Worker | Compilation succeeds; deployment fails | Reports success, but deploys under the config-named parent Worker |
The mismatch production run fails because the config-named Worker does not exist. The matching production deployment remains active.
The mismatch Preview run creates a parent Worker record for the config name and deploys a Preview under it. Its returned Preview ID differs from the one allocated by Builds for that branch. This is not a second production deployment: the new parent's deployed_on is null.
Relevant error logs
Names below are simplified; account identifiers and application URLs are omitted.
The Preview configuration callback logs show that Builds supplies the correct override and cf performs a preview-aware build:
{
"configuredName": "config-worker",
"buildsSelectedName": "dashboard-worker",
"isPreview": true,
"mode": "production"
}
The production deployment fails with:
The Worker "config-worker" was not found in your account. Check that the name in your wrangler.json file is correct and that the Worker exists in this account.
The wrangler.json reference is misleading for a cf-config project.
Existing implementation to reuse
Wrangler already supports the Builds name override. Shared workers-sdk code also contains relevant helpers:
getCIOverrideName()in@cloudflare/workers-utilsreadsWRANGLER_CI_OVERRIDE_NAME. cf already depends on@cloudflare/workers-utils.resolveWorkerName()in deploy-helpers' Preview implementation prioritises that override over arguments and configuration. This is an implementation reference, not a claim that it is a public package export.- cf's imported Wrangler test catalogue already lists override cases as skipped/unported: production and Preview name resolution.
Suggested integration points are cf's selected-Worker production upload path in packages/cli/src/commands/deploy/shared.ts and Preview Build Output path in packages/cli/src/commands/previews/deploy.ts. Ensure both normal and --prebuilt deployment paths use the selected target consistently. The exact integration should account for dependent bindings and multi-Worker output rather than blanket-renaming configuration.
Acceptance coverage should include matching names, mismatched names, ordinary and prebuilt deployments, the parent Worker and returned Preview identity, unchanged behaviour without an override, and no unintended renaming of other Workers.
This is separate from #185 / #288, which concern writing deployment result metadata so Builds can display the Preview URL. Reporting a URL does not fix deployment to the wrong parent Worker.
- 主要言語
- TypeScript
- スター
- 916
- フォーク
- 53
- 平均マージ
- 18時間 37分
- マージ済み PR(30日)
- 197
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/cf のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/cf#344 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/cf#262 ·
メンテナーはふだん 1 日以内に返信
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` template対応中かも @jamesopstad が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/cf#223 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cloudflare/cf#179 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
cloudflare/cf#390 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
area: image-engine bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
snapotter-hq/SnapOtter#3885 ·
メンテナーはふだん 1 日以内に返信
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug P3 UI/UX
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
openclaw/openclaw#182077 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信