[PR #7950] [MERGED] chore: fix turbo cache configuration in ci #33249

Closed
opened 2026-04-17 23:53:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7950
Author: @starslingdev[bot]
Created: 2/12/2026
Status: Merged
Merged: 2/13/2026
Merged by: @himself65

Base: canaryHead: starsling/fix-turbo-cache-config


📝 Commits (1)

  • 3dd0932 fix: remove TURBO_CACHE=remote:rw to enable local caching

📊 Changes

3 files changed (+0 additions, -9 deletions)

View changed files

📝 .github/workflows/ci.yml (+0 -7)
📝 .github/workflows/e2e.yml (+0 -1)
📝 .github/workflows/preview.yml (+0 -1)

📄 Description

chore: fix turbo cache configuration in ci

Your workflows set TURBO_CACHE: remote:rw, which disables Turborepo's local cache. Since remote:rw omits the local: source, Turborepo never writes to .turbo/cache, the directory is never created, and actions/cache has nothing to save.

This is a pre-existing issue that StarSling has identified - the .turbo directory was a stale ~68 MB artifact restored from GHES cache (never regenerated by turbo build), and the Post Cache turbo build setup silently failed every time with Unable to reserve cache with key.

Run Time (UTC) Restore Result Restored Key Cache Size Post Save Result
21924958647 2026-02-11 22:08 HIT Linux-turbo-3877e588069d03dfaa67741a9e9d65e90b4a8543 68 MB Unable to reserve cache with key Linux-turbo-78562610cc...

Fix

Remove TURBO_CACHE: remote:rw and let it default to local:rw,remote:rw. This is what Turborepo's GitHub Actions guide recommends — both local and remote caching active, with actions/cache persisting .turbo across CI runs. Your remote cache (84% hit rate, 2,445/2,900 lookups) continues working as before; the local cache adds a faster first-check layer.

Changes

  • .github/workflows/ci.yml
  • .github/workflows/e2e.yml
  • .github/workflows/preview.yml

References


Summary by cubic

Enable Turborepo local caching in CI by removing TURBO_CACHE=remote:rw, so actions/cache can save .turbo and reduce build times. Remote caching remains active.

  • Bug Fixes
    • Fixed CI cache failures where .turbo/cache was never created, causing "Unable to reserve cache" on post-save.

Written for commit 3dd0932649. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7950 **Author:** [@starslingdev[bot]](https://github.com/apps/starslingdev) **Created:** 2/12/2026 **Status:** ✅ Merged **Merged:** 2/13/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `starsling/fix-turbo-cache-config` --- ### 📝 Commits (1) - [`3dd0932`](https://github.com/better-auth/better-auth/commit/3dd093264914963bea2c2ce0ab2e5557b9a62f32) fix: remove TURBO_CACHE=remote:rw to enable local caching ### 📊 Changes **3 files changed** (+0 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+0 -7) 📝 `.github/workflows/e2e.yml` (+0 -1) 📝 `.github/workflows/preview.yml` (+0 -1) </details> ### 📄 Description ## chore: fix turbo cache configuration in ci Your workflows set [`TURBO_CACHE: remote:rw`](https://turborepo.dev/docs/reference/run#--cache), which [disables Turborepo's local cache](https://turborepo.dev/docs/reference/system-environment-variables). Since `remote:rw` omits the `local:` source, Turborepo never writes to `.turbo/cache`, the directory is never created, and `actions/cache` has nothing to save. This is a pre-existing issue that StarSling has identified - the `.turbo` directory was a stale ~68 MB artifact restored from GHES cache (never regenerated by `turbo build`), and the `Post Cache turbo build setup` silently failed every time with `Unable to reserve cache with key`. | Run | Time (UTC) | Restore Result | Restored Key | Cache Size | Post Save Result | |-----|------------|---------------|--------------|------------|-----------------| | [21924958647](https://github.com/better-auth/better-auth/actions/runs/21924958647/job/63315001162) | 2026-02-11 22:08 | HIT | `Linux-turbo-3877e588069d03dfaa67741a9e9d65e90b4a8543` | 68 MB | `Unable to reserve cache with key Linux-turbo-78562610cc...` | ### Fix Remove `TURBO_CACHE: remote:rw` and let it default to `local:rw,remote:rw`. This is what Turborepo's [GitHub Actions guide](https://turborepo.dev/docs/guides/ci-vendors/github-actions) recommends — both local and remote caching active, with `actions/cache` persisting `.turbo` across CI runs. Your remote cache (84% hit rate, 2,445/2,900 lookups) continues working as before; the local cache adds a faster first-check layer. ### Changes - `.github/workflows/ci.yml` - `.github/workflows/e2e.yml` - `.github/workflows/preview.yml` ### References - [Turborepo `--cache` flag](https://turborepo.dev/docs/reference/run#--cache) — `TURBO_CACHE` syntax; omitting `local:` disables local reads and writes - [Turborepo: GitHub Actions Guide](https://turborepo.dev/docs/guides/ci-vendors/github-actions) — recommended `actions/cache` setup with local + remote caching - [Turborepo: Constructing CI](https://turborepo.dev/docs/crafting-your-repository/constructing-ci) — remote caching as primary CI strategy - [Turborepo: Caching](https://turborepo.dev/docs/crafting-your-repository/caching) — `.turbo/cache` as default local cache directory (v2+) - [vercel/turborepo#842](https://github.com/vercel/turborepo/issues/842) — cache directory moved from `node_modules/.cache/turbo` to `.turbo/cache` in v2 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Enable Turborepo local caching in CI by removing TURBO_CACHE=remote:rw, so actions/cache can save .turbo and reduce build times. Remote caching remains active. - **Bug Fixes** - Fixed CI cache failures where .turbo/cache was never created, causing "Unable to reserve cache" on post-save. <sup>Written for commit 3dd093264914963bea2c2ce0ab2e5557b9a62f32. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 23:53:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#33249