-
Notifications
You must be signed in to change notification settings - Fork 1.1k
enable environment targeting in config patching with wrangler deploy --x-remote-diff-check
#11160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable environment targeting in config patching with wrangler deploy --x-remote-diff-check
#11160
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: |
| /** | ||
| * 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 | ||
| */ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👍
9bf24f0 to
70e82ca
Compare
70e82ca to
8ecc46f
Compare
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