Skip to content

revert(ci): drop turbopackFileSystemCacheForBuild and restore actions/cache#4500

Merged
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/revert-turbopack-build-cache
May 7, 2026
Merged

revert(ci): drop turbopackFileSystemCacheForBuild and restore actions/cache#4500
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/revert-turbopack-build-cache

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Removes experimental.turbopackFileSystemCacheForBuild: true from apps/sim/next.config.ts
  • Restores actions/cache@v5 for .next/cache (replaces sticky-disk mount)
  • Keeps the zero-risk wins from improvement(next): bundle and CI cache config #4478 (poweredByHeader: false, optimizePackageImports trim)

Why

After #4478 merged, CI build times grew monotonically:

Run Duration
pre-merge baseline (5 runs) 153–241s
post-merge run 1 249s
post-merge run 13 1305s (~22min)

The Turbopack FS build cache flag is the necessary condition — without it, Turbopack doesn't write FS cache during next build, so persistence is moot. Combined with sticky-disk's lack of key-based eviction (7-day idle only), the cache grew unbounded across runs and dominated mount/restore time. Reverting both restores the previous behavior.

Type of Change

  • Bug fix (CI regression)

Testing

Will verify build duration on this PR returns to the ~200s baseline.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…/cache

Build times grew monotonically from ~200s to 1305s (~6x) after #4478 landed.
The Turbopack FS cache flag combined with sticky-disk persistence caused
unbounded cache growth. Reverting both — keeping the poweredByHeader and
optimizePackageImports trim from the original PR.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Building Building Preview, Comment May 7, 2026 9:34pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 7, 2026

PR Summary

Medium Risk
Changes CI caching strategy and removes an experimental Next.js build cache flag, which can materially affect build performance and cache correctness across runs.

Overview
Reverts the prior Next.js/Turbopack caching approach by removing experimental.turbopackFileSystemCacheForBuild from apps/sim/next.config.ts.

Updates the CI workflow to restore .next/cache via actions/cache@v5 (keyed by OS and bun.lock) instead of persisting it with sticky-disk, aiming to prevent unbounded cache growth and stabilize build times.

Reviewed by Cursor Bugbot for commit 37e272b. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR reverts a CI regression introduced in #4478 by removing turbopackFileSystemCacheForBuild: true from next.config.ts and replacing the useblacksmith/stickydisk Next.js cache mount with actions/cache@v5. Without the Turbopack FS cache flag, Turbopack never writes to the filesystem cache during next build, so the sticky disk grew unbounded across runs and dominated CI time.

  • Removes experimental.turbopackFileSystemCacheForBuild: true from apps/sim/next.config.ts, preventing Turbopack from writing an FS build cache that was never being read correctly.
  • Replaces the sticky-disk (key-eviction-free) Next.js cache mount with actions/cache@v5, keyed on runner.os + hashFiles('bun.lock') with a partial restore-key fallback — a standard and bounded caching approach.
  • Preserves the other wins from improvement(next): bundle and CI cache config #4478: poweredByHeader: false and the optimizePackageImports list remain in place.

Confidence Score: 5/5

This PR is safe to merge — it reverts two tightly scoped CI settings that caused unbounded cache growth and restores a well-understood caching pattern.

Both changes are narrow and low-risk: removing an experimental Next.js flag that had no effect on application behavior, and swapping an eviction-free disk mount for the standard GitHub Actions cache with a lockfile-keyed strategy. The Bun, node_modules, and Turbo sticky-disk caches are untouched. There is no production code change.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/test-build.yml Replaces useblacksmith/stickydisk@v1 for .next/cache with actions/cache@v5; uses a lockfile-hashed key with a partial restore-key fallback — a well-established pattern for Next.js build caches.
apps/sim/next.config.ts Removes turbopackFileSystemCacheForBuild: true from experimental config; all other settings (poweredByHeader, optimizePackageImports, etc.) are left intact.

Reviews (1): Last reviewed commit: "revert(ci): drop turbopackFileSystemCach..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit b045eae into staging May 7, 2026
9 of 10 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/revert-turbopack-build-cache branch May 7, 2026 21:37
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.

1 participant