fix(ci): align gha cache scopes so Integration reuses build caches#252
Conversation
…aches The Integration job read `cache-from: type=gha,scope=sandbox` and `scope=server-smoke`, but `build-sandbox` and `build-server` wrote the default (unscoped) gha cache — a per-job key the Integration job never matched. Result: a 100% cache miss that rebuilt the ~8GB sandbox image (Playwright, Chromium, npm, Python) from scratch on every run, which is the slow "Integration builds with no cache" symptom. - build-sandbox: write+read scope=sandbox (matches Integration's read). - build-server: write+read scope=server-smoke (shared with the smoke and Integration server builds). - Integration: drop cache-to on both inline builds — they are pure consumers of caches owned by the build jobs that run first (needs:), so re-exporting the 8GB layer cache only wasted upload time. build-sandbox runs before Integration (needs:), so the hit lands on the same workflow run, not only on the next one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGitHub Actions workflow updated to use scoped Docker layer caching. Primary build jobs ( ChangesDocker build cache scoping
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The
Integration — real MCP + Dockerjob rebuilds the ~8GB sandbox image from scratch on every run (no cache), making it by far the slowest job.Root cause
gha cache scope mismatch:
cache-to(writer)cache-frombuild-sandbox→ default (unscoped)scope=sandboxbuild-server→ default; smoke →scope=server-smokescope=server-smoketype=ghakeys cache by scope; the default scope is per-job, so Integration'sscope=sandboxread never matched build-sandbox's default-scope write → 100% miss → full rebuild (Playwright, Chromium, npm, Python).Fix
build-sandbox: write + readscope=sandbox.build-server: write + readscope=server-smoke(shared with smoke + Integration).Integration: dropcache-toon both inline builds — they are pure consumers of caches owned by the build jobs that run first vianeeds:; re-exporting the 8GB layer cache only wasted upload time.build-sandboxruns before Integration (needs:), so the hit lands on the same run, not just the next one.CI-only; no image-content change.
🤖 Generated with Claude Code
Summary by CodeRabbit