Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Backport of #10913 to v3-maintenance branch.

Fixes #6855

This PR addresses duplicate warning messages during wrangler dev by changing all logger.warn() calls to logger.once.warn() in ConfigController.ts. When configuration is updated multiple times (common during development), the same warnings would be displayed repeatedly, creating noise in the console output.

Changes

ConfigController.ts: Updated 4 warning scenarios to use logger.once.warn():

  • Live Services warnings in remote mode
  • Upstream Protocol warnings for non-secure origins
  • Queues warnings in remote mode
  • SQLite in Durable Objects warnings in remote mode

ConfigController.test.ts: Added test to verify warnings are only logged once across multiple config updates.

Testing Notes

⚠️ Unable to test locally: Due to pre-existing environment issues in v3-maintenance branch (lint/build errors), local verification was not possible. Changes will need to be verified via CI.

Review Checklist

  • Verify all 4 warning types are appropriate for once-only logging behavior
  • Confirm the test actually reproduces the duplicate warning issue
  • Check that manual backport correctly matches original PR Fix duplicate warning messages in wrangler dev #10913 implementation
  • Verify CI passes since local testing wasn't possible

  • Tests
    • Tests included
  • Wrangler E2E Tests CI Job required?
    • Not required because: Internal logging behavior change
  • Public documentation
    • Documentation not necessary because: Internal logging behavior change, no user-facing API changes

Link to Devin run: https://app.devin.ai/sessions/fe4aed656c5945a7adaa0078b1e9e9a8
Requested by: [email protected]

Changes all logger.warn() calls to logger.once.warn() in ConfigController.ts
to ensure warnings are only shown once even when configuration is updated
multiple times.

Also adds a test to verify warnings are only logged once across multiple
config updates.

Backport of #10913 to v3-maintenance branch.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner October 13, 2025 12:10
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2025

🦋 Changeset detected

Latest commit: fca9859

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

This PR includes changesets to release 1 package
Name Type
wrangler 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 Oct 13, 2025
@devin-ai-integration devin-ai-integration bot added the v3-backport The PR is a v3 backport targetting the v3-maintenance branch label Oct 13, 2025
@emily-shen
Copy link
Contributor

update this to match the original PR again

@devin-ai-integration
Copy link
Contributor Author

Hi @emily-shen,

I've reviewed the original PR #10913 to match it exactly. The original PR includes changes to dev.test.ts that add a beforeEach hook calling logger.clearHistory() to the "containers" describe block for test isolation.

However, I've discovered that the v3-maintenance branch's dev.test.ts file doesn't contain a "containers" describe block at all (the file is 1984 lines vs 2209 on main). The containers tests don't exist in v3-maintenance, so those specific changes cannot be directly applied.

The current backport includes:

  1. ✅ ConfigController.ts changes (logger.warn → logger.once.warn)
  2. ✅ ConfigController.test.ts changes (test for warning suppression)
  3. ❌ dev.test.ts changes (can't apply - containers describe block doesn't exist in v3-maintenance)
  4. ✅ .changeset file

Should I:

  • Leave the backport as-is without the dev.test.ts changes (since the containers tests don't exist in v3-maintenance)?
  • Add logger.clearHistory() somewhere else in v3-maintenance's test files?
  • Something else?

Please let me know how you'd like me to proceed. Thanks!

@emily-shen
Copy link
Contributor

emily-shen commented Oct 27, 2025

Ignoring the dev.test.ts changes is fine. The test in configcontroller.test.ts is not the same as in the original PR - it should be using the analytics engine binding

@emily-shen emily-shen added the skip-v3-pr Skip validation of presence of a v3 backport PR label Oct 27, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 27, 2025
@emily-shen emily-shen merged commit 203e599 into v3-maintenance Oct 28, 2025
41 of 42 checks passed
@emily-shen emily-shen deleted the v3-backport-10913 branch October 28, 2025 10:22
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 28, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Oct 28, 2025
@holopin-bot
Copy link

holopin-bot bot commented Oct 28, 2025

Congratulations @devin-ai-integration[bot], the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmhaf3w9000g0l404d767qwqf

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes an open-source contribution, big or small skip-v3-pr Skip validation of presence of a v3 backport PR v3-backport The PR is a v3 backport targetting the v3-maintenance branch

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants