turbo
a6fc6c53 - fix: Never let compile cache storage failures fail the build (#13299)

Commit
33 days ago
fix: Never let compile cache storage failures fail the build (#13299) > Stacked on #13298 (retargets to main when it merges). ## Why Bench run [28839285743](https://github.com/vercel/turborepo/actions/runs/28839285743) exposed the compile cache's worst failure mode: with unauthorized credentials, sccache's background server failed its storage self-check at startup, refused to start, and every wrapper invocation exited 2 — cargo saw failed rustc calls and **the build failed**. An optimization must degrade to "slower", never to "broken". ## What Two independent layers: 1. **Don't start when the run already knows the backend is doomed.** The proxy gate now checks the resolved runtime `RemoteCacheStatus` (which folds in the preflight: auth failure, unreachable API, team over limit/paused) instead of configuration alone. The bench run had literally printed `Remote caching unavailable (Authentication failed)` before starting the proxy anyway. 2. **Don't die when it breaks mid-run.** The fork picks up a port of mozilla/sccache#2756 (hand-applied to the v0.16.0 base — upstream it's stacked on the unmerged client-side-mode PR): with `SCCACHE_IGNORE_SERVER_IO_ERROR=1` — now injected — a client that cannot connect to or start the server warns and runs the compiler directly. Covered by two integration tests on the fork (forced startup failure → fallback with the env var, hard error without). Also tightens #13298's `CARGO_INCREMENTAL` tolerance: reading sccache's wrapper source revealed it **hard-exits** on `CARGO_INCREMENTAL=1`, so tolerating arbitrary pre-set values could itself fail builds. Only an ambient `0` composes; any other explicit value stands the injection down (incremental compilation was deliberately requested and is incompatible with sccache). ## How Layer 1 kills the predictable class before any wrapper runs; layer 2 is the guarantee for everything unpredictable. Fork rev bumped to `52bfcd0` (`vercel/main-from-args`). Verified: fork integration tests for the fallback both ways; `compile_cache_env` matrix updated (`=0` tolerated, `=1` stands down); workspace check/lint/fmt green.
Author
Parents
Loading