enable environment targeting in config patching with wrangler deploy --x-remote-diff-check - #11160
Merged
dario-piotrowicz merged 2 commits intoNov 5, 2025
Merged
Conversation
🦋 Changeset detectedLatest 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 |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
penalosa
reviewed
Nov 5, 2025
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 | ||
| */ |
Contributor
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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
force-pushed
the
dario/include-envs-in-deploy-remote-diff-check
branch
from
November 5, 2025 12:39
9bf24f0 to
70e82ca
Compare
dario-piotrowicz
force-pushed
the
dario/include-envs-in-deploy-remote-diff-check
branch
from
November 5, 2025 12:40
70e82ca to
8ecc46f
Compare
penalosa
approved these changes
Nov 5, 2025
dario-piotrowicz
deleted the
dario/include-envs-in-deploy-remote-diff-check
branch
November 5, 2025 14:29
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10894
Followup for #11033
This PR enables
wrangler deploy --x-remote-diff-checkto also update the local config file when an environment is targeted