Skip to content

Conversation

@emily-shen
Copy link
Contributor

Fixes CC-5480

  • validates types for all fields
  • warns for unexpected fields
  • warns on deprecated fields

  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: config already documented
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not in v3

@emily-shen emily-shen requested a review from a team as a code owner July 11, 2025 10:32
@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2025

🦋 Changeset detected

Latest commit: ddbc4dc

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

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

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 Jul 11, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: ddbc4dc

@emily-shen emily-shen force-pushed the emily/extra-validation branch from bfc02e6 to 006ff7d Compare July 11, 2025 10:42
@github-actions
Copy link
Contributor

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main emily/extra-validation might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-9934
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

LGTM 🙂

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jul 11, 2025
@emily-shen emily-shen added the skip-v3-pr Skip validation of presence of a v3 backport PR label Jul 11, 2025
@emily-shen emily-shen requested a review from a team July 11, 2025 17:56
@emily-shen emily-shen force-pushed the emily/extra-validation branch from 96057a1 to d865917 Compare July 14, 2025 09:18
@emily-shen emily-shen force-pushed the emily/extra-validation branch from d865917 to c70513e Compare July 14, 2025 10:29
Copy link
Contributor

@IRCody IRCody left a comment

Choose a reason for hiding this comment

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

Agree with @nikitassharma's suggestion but other than that LGTM.

@emily-shen emily-shen force-pushed the emily/extra-validation branch from c70513e to fd70f4f Compare July 15, 2025 09:02
@emily-shen emily-shen force-pushed the emily/extra-validation branch from fd70f4f to ddbc4dc Compare July 15, 2025 09:11
diagnostics,
`${field}.configuration`,
Object.keys(containerAppOptional.configuration),
["image", "secrets", "labels", "disk", "vcpu", "memory_mib"]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think vcpu and memory_mib are included in configuration?

configuration?: {
image?: string;
labels?: { name: string; value: string }[];
secrets?: { name: string; type: "env"; secret: string }[];
disk?: { size: string };
};

Users shouldn't be able to set these directly in the Wrangler config anyway, they are set by the instance type.

Copy link
Member

Choose a reason for hiding this comment

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

these fields are being used right now for customers that need custom instance types, see #9962 for better handling for custom instance types

Copy link
Member

Choose a reason for hiding this comment

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

Do they need to be added to the type definition then?

Copy link
Contributor Author

@emily-shen emily-shen Jul 15, 2025

Choose a reason for hiding this comment

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

i'd strongly prefer to have them in the type definition so that we're not trying to read values that typescript doesn't expect to be there. they're hidden from the wrangler config schema, so we don't need to worry about showing this to the general user.

Copy link
Member

Choose a reason for hiding this comment

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

I agree, they should be in the type definition

@emily-shen emily-shen merged commit 6cc24c0 into main Jul 16, 2025
40 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jul 16, 2025
@emily-shen emily-shen deleted the emily/extra-validation branch July 16, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-v3-pr Skip validation of presence of a v3 backport PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants