feat(setup-stack): isolate only when asked, cache only on hosted - #6
Merged
Conversation
Always-isolating to RUNNER_TEMP made self-hosted volumes unused, and GitHub cache on those runners is how restore-keys reimported poison. Co-authored-by: Cursor <cursoragent@cursor.com>
…e Pis Three gaps between this action and the runner image's per-runner cache volumes (dodi-smart/docker-github-actions-runner-android#6): pnpm and yarn were never isolated. The image mounts and LRU-caps /root/.cache/pnpm, and cleanup.sh keeps ~/.cache/yarn, but isolate mode set only npm_config_cache. npm's `cache` is not pnpm's `cache-dir`, so a deps-verify job on pnpm still read and wrote the shared store — it was not verifying. pnpm reads npm_config_* as its own config, so npm_config_store_dir and npm_config_cache_dir pin it; yarn takes YARN_CACHE_FOLDER and YARN_GLOBAL_FOLDER, for classic and berry alike. PUB_CACHE is now job-scoped in every mode, not just when isolated. A home dir is only worth using if a volume backs it. The image mounts one for bun, npm, pnpm, gradle and cargo and caps each at ~20 GB; it mounts none for pub. Left on ~/.pub-cache, a persistent runner would grow it in the container's writable layer, where the post-job LRU cap cannot reach. The forced-isolate check is Linux ARM64, not ARM64. The rule exists because a Pi has 8 GB and must not grow container volumes. The self-hosted Mac is ARM64 too, has no container volumes, and was being made to run every job cold for a reason that does not describe it. Also corrects the bun comment: setup-bun still caches the bun executable, a small exact-keyed binary. What is never uploaded is the install cache — any package STORE under restore-keys is the poison path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setup-stacknow takesisolate(default false) andcache(auto/true/false, defaultauto), and resolves them fromrunner.environment+runner.archinstead of always pinning caches toRUNNER_TEMP.deps-verify.ymlhard-codesisolate: trueandcache: false(not a caller-facing input).pr-checks.ymlpassesisolate: falseandcache: autoon all three jobs.release.ymlstays hosted-only and skips package cache — still no bun GitHub cache.AGENTS.mdcites DODI-00020 (package caches persist per runner; GitHub cache is hosted-only and never uses restore-keys).How isolate / cache resolve
Hosted GitHub cache is one mechanism per stack. Never
setup-java cache: gradle, neverrestore-keyson a package store, never bun upload.Test plan
pr-checksjob on a beelink X64 runner logsisolate=falseand does not setGRADLE_USER_HOME/BUN_INSTALL_CACHE_DIRtoRUNNER_TEMPdeps-verifyrun logsisolate=trueandcache=falsesetup-java cache: gradleMade with Cursor