Skip to content

feat(memory-limit): adjust getWorkerMemoryLimit priority for vmForks#7960

Merged
sheremet-va merged 2 commits intovitest-dev:mainfrom
pengooseDev:feat/fix-vm-forks-memory-limit
May 12, 2025
Merged

feat(memory-limit): adjust getWorkerMemoryLimit priority for vmForks#7960
sheremet-va merged 2 commits intovitest-dev:mainfrom
pengooseDev:feat/fix-vm-forks-memory-limit

Conversation

@pengooseDev
Copy link
Copy Markdown
Contributor

@pengooseDev pengooseDev commented May 11, 2025

Description

closes #7952

  • Prioritize poolOptions.vmForks.memoryLimit over vmThreads

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link
Copy Markdown

netlify bot commented May 11, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 936bb4b
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/6820f48fafb89d00082d1153
😎 Deploy Preview https://deploy-preview-7960--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sheremet-va
Copy link
Copy Markdown
Member

Why would it prioritise? It needs to use the one specified, one does not override the other. vmThreads also calls this function

@pengooseDev pengooseDev force-pushed the feat/fix-vm-forks-memory-limit branch from 936bb4b to dd1df0d Compare May 11, 2025 21:44
@pengooseDev
Copy link
Copy Markdown
Contributor Author

Thank you for the feedback.getWorkerMemoryLimit now takes a pool argument and uses only that pool’s configuration.
I initially misunderstood and assumed the helper logic had priority.
Please let me know if the team would like any further adjustments.

@sheremet-va sheremet-va merged commit 5a91eca into vitest-dev:main May 12, 2025
12 of 13 checks passed
@sheremet-va
Copy link
Copy Markdown
Member

LGTM! Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When using vmForks the poolOptions.vmThreads.memoryLimit is used to set memory limit

2 participants