Skip to content

fix: ignore failures on writeToCache #7893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Apr 27, 2025

The cache is not mandatory. No reason to abort when it fails.

This can happen when node_modules is not writable for example.

Description

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.

The cache is not mandatory. No reason to abort when it fails.

This can happen when node_modules is not writable for example.
@orgads
Copy link
Contributor Author

orgads commented Apr 27, 2025

This change together with vitejs/vite#19952 allows running tests in docker, when running as a different user than the one used in the image (usually root or node, with uid 1000).

@hi-ogawa
Copy link
Contributor

This change together with vitejs/vite#19952 allows running tests in docker, when running as a different user than the one used in the image (usually root or node, with uid 1000).

I think this should be possible today with vitest --configLoader runner and custom cacheDir https://stackblitz.com/edit/vitest-dev-vitest-t9e1fblp?file=vite.config.ts

@sheremet-va sheremet-va merged commit 8c7f75a into vitest-dev:main May 5, 2025
11 of 13 checks passed
@orgads orgads deleted the cache-no-fail branch May 5, 2025 14:17
@renovate renovate bot mentioned this pull request May 17, 2025
1 task
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.

3 participants