[wrangler] Apply Email Routing addresses during deploy - #14471
Conversation
🦋 Changeset detectedLatest commit: 7297d7b The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
9c7642b to
4dcf055
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
4dcf055 to
83b1eee
Compare
4aa3de4 to
b030365
Compare
b030365 to
27a3daa
Compare
b05ba27 to
7878927
Compare
|
Can you merge #14470 now it's approved and then I'll review this one. Thanks. |
emily-shen
left a comment
There was a problem hiding this comment.
changes to the deploy path should go in the deploy-helpers package or else they will not be included in cf
|
Codeowners approval required for this PR:
Show detailed file reviewers |
eb12ccd to
a0d1de8
Compare
@cloudflare/autoconfig
@cloudflare/config
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: |
ttoino
left a comment
There was a problem hiding this comment.
LGTM, just one small comment
f9eed56 to
de9f833
Compare
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Code moved to deploy-helpers package as requested.
EMAIL-1882: after the Worker uploads, `wrangler deploy` plans the Email Routing changes for the `addresses` config against the new account-level plan endpoint, renders them grouped by zone, prompts once for destructive changes (deletes/takeover conflicts) interactively and hard-fails in non-interactive mode, then applies accepted changes via the per-zone rule endpoints tagged source=wrangler + owner_worker_tag. Stacked on EMAIL-1880.
de9f833 to
7297d7b
Compare
Applies the Email Routing
addressesconfig duringwrangler deploy.Note
Stacked on #14470 (the
addressesconfig field). Please review #14470 first — until it merges, this PR's diff includes its commit too. The new logic here is inpackages/wrangler/src/email-routing/deploy-addresses.ts+ thedeploy.tshook.After the Worker uploads,
wrangler deployasks the Email Routing API for a plan, renders the changes grouped by zone (+added,~updated,-deleted,!conflict), prompts once for any destructive changes (deletes or takeover conflicts) in interactive mode — and hard-fails in non-interactive/CI mode — then applies the accepted changes through the per-zone rule endpoints, tagging them as owned by the deploying Worker. Purely additive plans apply without a prompt; a partial apply failure leaves the Worker deployed and exits non-zero.wrangler deploy --dry-runis unchanged (validate + print only, no network).Internal tracking: EMAIL-1882 / RM-29262.
🐈