Skip to content

Conversation

@dario-piotrowicz
Copy link
Member

Fixes #10894

Followup for #11033

This PR enables wrangler deploy --x-remote-diff-check to also update the local config file when an environment is targeted


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: UX improvement not requiring documentation
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: this feature is not included in v3

@changeset-bot
Copy link

changeset-bot bot commented Nov 2, 2025

🦋 Changeset detected

Latest commit: 8ecc46f

The changes in this PR will be included in the next version bump.

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 2, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 8ecc46f

@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review November 3, 2025 01:06
@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner November 3, 2025 01:06
Comment on lines 387 to 392
/**
* Given a key discerns wether the key is only allowed at the top level of a config object
*
* @param key The target key
* @returns true is the config is top-level only, false otherwise
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need this logic? The top level keys seem to be:

"legacy_env" | "send_metrics" | "dev" | "site" | "wasm_modules" | "text_blobs" | "data_blobs" | "alias" | "keep_vars"

and the constructed remote config (from convertWorkerToWranglerConfig()) doesn't insert any of those, I don't think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is more of a future proofing mechanism to ensure that we don't end up doing that if later down the line there are such keys, if you believe this not to be necessary I'm happy to remove this logic 👍

@dario-piotrowicz dario-piotrowicz force-pushed the dario/include-envs-in-deploy-remote-diff-check branch from 9bf24f0 to 70e82ca Compare November 5, 2025 12:39
@dario-piotrowicz dario-piotrowicz force-pushed the dario/include-envs-in-deploy-remote-diff-check branch from 70e82ca to 8ecc46f Compare November 5, 2025 12:40
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Nov 5, 2025
@dario-piotrowicz dario-piotrowicz merged commit 05440a1 into main Nov 5, 2025
35 of 37 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/include-envs-in-deploy-remote-diff-check branch November 5, 2025 14:29
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

On wrangler deploy remote conflicts offer to update user wrangler config file

2 participants