Skip to content

[wrangler] Condense repeated environment config warnings#13848

Merged
NuroDev merged 4 commits into
mainfrom
fix/condense-env-config-warnings
May 14, 2026
Merged

[wrangler] Condense repeated environment config warnings#13848
NuroDev merged 4 commits into
mainfrom
fix/condense-env-config-warnings

Conversation

@MattieTK
Copy link
Copy Markdown
Member

@MattieTK MattieTK commented May 7, 2026

Condense repeated Wrangler environment configuration warnings.

This updates config validation so repeated missing vars and define entries are summarised in one warning with a list of missing keys. It also avoids emitting the experimental unsafe warning twice when unsafe appears at both the top level and in the active environment.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This only changes warning formatting.

A picture of a cute animal (not mandatory, but encouraged)

@MattieTK MattieTK requested a review from workers-devprod as a code owner May 7, 2026 13:35
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

🦋 Changeset detected

Latest commit: b08597a

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

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk May 7, 2026
@workers-devprod workers-devprod requested review from a team and NuroDev and removed request for a team May 7, 2026 13:35
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented May 7, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

✅ All changesets look good

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 7, 2026

Everything looks correct. The changes are well-structured and all tests pass. Let me do a final summary of the review:

Summary of changes:

  1. validateVars: Condensed per-key warnings into a single warning with a bullet list of missing keys.
  2. validateDefines: Same condensation for define entries.
  3. unsafe experimental warning: Added a guard to skip the experimental warning for named environments when unsafe already exists at the top level (preventing a duplicate warning).
  4. Tests: Added a new test for the condensed vars warning, updated an existing define snapshot to match new format, and added BAR: "bar" to an existing test fixture.

The logic is correct, tests pass, and there are no issues I can identify. The changeset is properly scoped to wrangler as a patch.

LGTM

github run

Comment thread packages/workers-utils/src/config/validation.ts
Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 7, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 7, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: b08597a

@NuroDev NuroDev enabled auto-merge (squash) May 11, 2026 11:41
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@NuroDev NuroDev merged commit d4794a8 into main May 14, 2026
54 checks passed
@NuroDev NuroDev deleted the fix/condense-env-config-warnings branch May 14, 2026 09:37
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants