Commit 5f5ce6e
authored
ci: warm-up monorepo cache test under npm (#1649)
## Summary
- Test-side band-aid for #1638: under npm, `vp run ready` requires three
invocations before reaching 100% cache hit. The `Verify cache (monorepo
only)` step previously asserted on what was effectively the second run
and failed on the `vp create monorepo (npm)` matrix entry.
- The preceding `Verify project builds` step already invokes `vp run
ready` once (it's the monorepo template's `verify-command` at line 125
of this file), so we add **one** extra warm-up under npm — that lands
the assertion on the third invocation, the first to reach 100%.
pnpm/yarn/bun keep the original single-run assertion since they already
pass.
- On assertion failure, dump `vp run --last-details` so per-task
cache-miss reasons surface directly in the CI log.
## Why npm only
Under npm with full hoisting, `packages/utils/node_modules/` does not
exist until run #1 — vitest's deps optimizer + tsdown's temp dir create
it. Two distinct vite-task bugs then trip on run #2:
1. Directory-listing fingerprint of `packages/utils/` sees
`node_modules` as an added entry.
2. fspy classifies vitest's reads/writes inside `node_modules/.vite/` as
a read-write overlap → `CacheNotUpdatedReason::InputModified`, no cache
entry written.
pnpm/yarn/bun pre-create per-package `node_modules/` during install, so
neither bug triggers there.
This is the "test-side band-aid" path called out in #1638. The proper
vite-task fix (ignore `node_modules` in directory fingerprints + filter
`node_modules/.vite{,-temp}/` and `node_modules/.cache/` from fspy
tracking) can be filed as a new follow-up issue if/when desired.
## Test plan
- [ ] `test-vp-create` matrix: `vp create monorepo (npm)` turns green
- [ ] pnpm / yarn / bun monorepo jobs stay green (single-run assertion
unchanged)
- [ ] On a deliberately-broken cache, the failure log shows `vp run
--last-details` output with the per-task cache-miss reasons
Closes #16381 parent be0d8dc commit 5f5ce6e
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
325 | 337 | | |
326 | 338 | | |
327 | 339 | | |
328 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
329 | 343 | | |
330 | 344 | | |
331 | 345 | | |
0 commit comments