Skip to content

ci: remove SCCACHE_GHA_ENABLED to stop cache entry explosion#373

Merged
streamer45 merged 1 commit intomainfrom
devin/1777127001-revert-sccache-gha
Apr 25, 2026
Merged

ci: remove SCCACHE_GHA_ENABLED to stop cache entry explosion#373
streamer45 merged 1 commit intomainfrom
devin/1777127001-revert-sccache-gha

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

Removes SCCACHE_GHA_ENABLED: "true" from all 5 Rust workflows, added in #372.

The sccache GHA backend stores one cache entry per compiled artifact. A single CI run created ~1000 tiny entries (total ~134 MiB) which evicted nearly all the Swatinem/rust-cache entries via LRU. Only 2 of the original rust-cache entries survived — the rest were pushed out by sccache's granular entries.

The rust-cache entries are far more valuable: they snapshot the full target/ directory including linking artifacts, build scripts, and incremental compilation state. Losing them means every job starts from scratch.

Without SCCACHE_GHA_ENABLED, sccache falls back to local disk — a harmless no-op on ephemeral hosted runners, and still fully functional on the self-hosted GPU runner via its persistent local disk cache (which already achieves 100% hit rate).

All other optimizations from #372 remain in place:

  • RUSTC_WRAPPER: sccache in release.yml and marketplace-build.yml
  • shared-key grouping (skit / skit-e2e / skit-gpu)
  • save-if: ${{ github.ref == 'refs/heads/main' }} on hosted runner jobs
  • cache-on-failure: true everywhere

Review & Testing Checklist for Human

  • After merge, verify that the sccache entries stop growing on the caches page
  • Confirm rust-cache entries (v0-rust-skit-*, v0-rust-skit-e2e-*, v0-rust-skit-gpu-*) reappear after the first main-branch CI run
  • Consider manually purging the ~1000 stale sccache entries via gh cache delete --all or selectively via gh cache list | grep sccache

Notes

  • A proper sccache remote backend (e.g. S3) would avoid the GHA cache entry explosion, but requires infrastructure setup. Worth considering if compilation caching becomes a priority.
  • The mozilla-actions/sccache-action is still installed in all workflows — it provides the sccache binary which RUSTC_WRAPPER references. It just won't use the GHA cache API without SCCACHE_GHA_ENABLED.

Link to Devin session: https://staging.itsdev.in/sessions/cdf841e834eb419aa04168a565311f10
Requested by: @streamer45

The sccache GHA backend stores one cache entry per compiled artifact,
creating ~1000 tiny entries that evict the much more valuable
Swatinem/rust-cache entries (full target/ snapshots) via LRU.

Remove SCCACHE_GHA_ENABLED from all workflows. On hosted runners
sccache falls back to local disk (harmless no-op on ephemeral VMs).
On the self-hosted GPU runner it continues to work via persistent
local disk cache. The other optimizations from #372 (shared-key,
save-if, cache-on-failure, RUSTC_WRAPPER) remain in place.

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

staging-devin-ai-integration Bot commented Apr 25, 2026

✅ Reviewed on 27b41cb

View review

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@staging-devin-ai-integration staging-devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review (Staging)
Debug

Playground

@streamer45 streamer45 merged commit 30d0b28 into main Apr 25, 2026
16 checks passed
@streamer45 streamer45 deleted the devin/1777127001-revert-sccache-gha branch April 25, 2026 14:28
streamer45 added a commit that referenced this pull request Apr 25, 2026
Restore and save ~/.cache/sccache as a single GHA cache entry per
Cargo.lock revision.  This gives hosted runners compilation-level cache
hits without the per-artifact entry explosion caused by
SCCACHE_GHA_ENABLED (reverted in #373).

Strategy:
- actions/cache/restore before sccache-action starts (all hosted jobs)
- actions/cache/save at end of job, main-branch only (if: always())
- Self-hosted GPU jobs skipped — they already have persistent disk cache
- Plugins use a separate cache key prefix (sccache-plugins-*)

Closes #374

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
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.

2 participants