Skip to content

Reduce @cloudflare/vitest-pool-workers log noise - #13007

Merged
petebacondarwin merged 5 commits into
cloudflare:mainfrom
sheplu:allow-loglevel
Apr 19, 2026
Merged

Reduce @cloudflare/vitest-pool-workers log noise#13007
petebacondarwin merged 5 commits into
cloudflare:mainfrom
sheplu:allow-loglevel

Conversation

@sheplu

@sheplu sheplu commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #12014

Add a new parameter to allow logLevel threshold on the vitest-pool-workers allowing to hide debug messages like vpw:debug

I don't think the failling CI is due to the change I did


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


Open with Devin

@sheplu
sheplu requested a review from a team as a code owner March 22, 2026 10:07
@changeset-bot

changeset-bot Bot commented Mar 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 27cf551

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

@workers-devprod

workers-devprod commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/vitest-pool-workers/src/pool/index.ts: [@cloudflare/wrangler]

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Mar 22, 2026

Copy link
Copy Markdown
create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 27cf551

penalosa
penalosa previously approved these changes Mar 26, 2026
@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Mar 26, 2026
@penalosa

Copy link
Copy Markdown
Contributor

Instead of adding a configurable logLevel option, I've updated this PR to take a simpler approach:

  • Default log level changed from VERBOSE to WARN — only actionable warnings and errors are printed. This removes the [vpw:debug] and [vpw:info] noise from every test run.
  • Debug output moved behind NODE_DEBUG — set NODE_DEBUG=vitest-pool-workers to get the detailed messages back when troubleshooting.
  • "Removing compat flag" promoted to warn — this message fires when we override a user's explicit flag, so it should be visible.

@penalosa penalosa changed the title feat: allow user to configure logLevel on vitest-pool-workers Reduce @cloudflare/vitest-pool-workers log noise Mar 26, 2026
@sheplu

sheplu commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

That's great! I wasn't sure if it was better to provide a configuration on userland or force a loglevel to a higher level!

Both looks great to me but maybe some people would prefer to have something configurable?
In my side, hissing everything bellow a warn lever is ok!

@mrmckeb

mrmckeb commented Mar 27, 2026

Copy link
Copy Markdown

I'm also seeing info logs, which I'm not sure add a lot of value... I feel like, by default, I should only see warning/error logs in output. What do you think @sheplu?

[vpw:debug] Adding `enable_nodejs_process_v2` compatibility flag during tests as this feature is needed to support the Vitest runner.
[vpw:info] Starting runtime for ...
[vpw:info] Starting runtime for ...
[vpw:info] Starting runtime for ...
[vpw:info] Starting runtime for ...

@sheplu

sheplu commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

@mrmckeb When I did the PR I was not sure to which level should be the default, I did not want to move from debug to warn - but I would agree that the info logs are not that useful. The only information would be to now that it started properly, which trigger a lot of noise if you do have a lot of tests. So I think warn by default may be a good call!

@sheplu

sheplu commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

@penalosa any news regarding this PR?

sheplu and others added 4 commits April 19, 2026 10:09
…kers

Instead of adding a new config option, reduce the default log level from
VERBOSE to WARN and move debug/info messages behind util.debuglog().

- Default log level is now WARN (only actionable messages print)
- Debug output available via NODE_DEBUG=vitest-pool-workers
- Promote 'Removing compat flag' to warn (overrides user's explicit config)
- Remove logLevel schema field, setPoolLogLevel, and associated test
@workers-devprod

workers-devprod commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

Comment thread packages/vitest-pool-workers/src/pool/index.ts Outdated
@github-project-automation github-project-automation Bot moved this from Approved to In Review in workers-sdk Apr 19, 2026
@github-project-automation github-project-automation Bot moved this from In Review to Approved in workers-sdk Apr 19, 2026
@petebacondarwin
petebacondarwin merged commit 2c3258d into cloudflare:main Apr 19, 2026
59 of 60 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 19, 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.

Add configurable log level for vitest-pool-workers

5 participants