Skip to content

fix(ci): pass ACTIONS_CACHE_SERVICE_V2 into Docker for sccache v2 cache API#325

Merged
DorianZheng merged 1 commit intomainfrom
fix/ci-sccache-cache-v2-env
Mar 2, 2026
Merged

fix(ci): pass ACTIONS_CACHE_SERVICE_V2 into Docker for sccache v2 cache API#325
DorianZheng merged 1 commit intomainfrom
fix/ci-sccache-cache-v2-env

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • Fix sccache cache write errors (1790/1790 failures) inside Docker containers by passing ACTIONS_CACHE_SERVICE_V2 env var
  • Without this var, sccache defaults to the legacy v1 GHA cache API (sunset April 2025), causing 100% write failures
  • Host-side sccache worked fine because sccache-action sets this var, but it wasn't forwarded into Docker

Root cause

mozilla-actions/[email protected] sets ACTIONS_CACHE_SERVICE_V2=on on the host. OpenDAL (sccache's storage backend) checks this env var to choose between v1/v2 cache API. Without it, Docker containers fell back to the dead v1 API — confirmed by the cache name difference: host used a SHA256 hash (v2), Docker used sccache-v0.14.0 (v1).

Changes

Added ACTIONS_CACHE_SERVICE_V2 to:

  • Docker -e flags in build-runtime.yml, build-node.yml, warm-caches.yml
  • environment-pass in pyproject.toml for cibuildwheel
  • github-script exports in all four workflows

Test plan

  • Merge and verify Warm Caches workflow shows cache writes succeeding (0 write errors)
  • Verify Build Runtime workflow gets cache hits from warm cache

…he API

sccache inside Docker containers was failing to write cache entries
(1790/1790 write errors) because it defaulted to the legacy v1 GHA
cache API, which GitHub sunset in April 2025. The host worked fine
because sccache-action sets ACTIONS_CACHE_SERVICE_V2=on, but this
env var was not forwarded into Docker containers.

Add ACTIONS_CACHE_SERVICE_V2 to:
- Docker -e flags in build-runtime, build-node, warm-caches
- environment-pass in pyproject.toml for cibuildwheel
- github-script exports in all four workflows
@DorianZheng DorianZheng merged commit 06251cf into main Mar 2, 2026
22 checks passed
@DorianZheng DorianZheng deleted the fix/ci-sccache-cache-v2-env branch March 2, 2026 11:52
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