Add sticky disk cache modes#43
Conversation
Adds nscloud-cache-action-style caching backed by RunsOn sticky disks (snap=<size>[:<name>] label). The new 'cache' input takes a list of package manager modes (go, node, ruby, rust, python, apt, ...) whose cache directories are bind-mounted onto the sticky disk volume; 'path' accepts arbitrary paths. Outputs 'cache-hit' when all paths were restored from a previous snapshot.
Blacksmith-style: runs a pinned buildkitd whose state and binaries live on the sticky disk, registered as the current buildx builder via the remote driver. The docker daemon is never touched. The action's post step stops buildkitd gracefully so the state is consistent before the volume is unmounted and snapshotted.
- buildkitd now runs with an explicit GC config (cache capped at 75% of the volume, 20% min free) so the buildkit cache stays bounded. - Post step logs volume usage and emits a warning + job summary with a per-cache breakdown when free space drops below 20% (or inodes 10%). - If a restored volume is critically full at job start (<5% free space or inodes), all caches on it are reset so the job runs cold instead of dead-looping on ENOSPC, and the next snapshot starts clean.
- Junction-based cacheMount on Windows (mklink /J, moves existing targets aside) - Windows cache paths (~/AppData/Local) for go, node, yarn, pnpm, pip, uv, poetry - Skip apt/buildkit modes on Windows; disk stats via GetDiskFreeSpaceExW
- Regenerate main-* binaries with Windows sticky-disk support
Accelerates an unmodified actions/checkout (and any github.com fetch) by running a local git smart-HTTP proxy whose bare mirrors live on the sticky disk, with github.com fetch URLs rewritten to it via global git config. Serving is delegated to git http-backend (protocol-exact, incl. v2); pushes are pinned to upstream via pushInsteadOf, and anything the mirror cannot serve (LFS, receive-pack, force-push-orphaned SHAs, mirror failures) is transparently forwarded to github.com. Mirror code adapted from github.com/crohr/smart-git-proxy, minus the shared-proxy pack cache (unnecessary per-job, and buggy per issue #1).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4505b1cc1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
* Delegate sticky BuildKit to setup-buildx * feat: add structured sticky cache input * dist: rebuild binaries * ci: run sticky buildkit test on dev fleet * ci: separate deploy-time sticky integration * feat: rename snap runner label to sticky * dist: rebuild binaries * feat: make sticky cache availability strict * Fail sticky cache on unavailable disk * dist: rebuild binaries * Fix sticky BuildKit edge cases * dist: rebuild binaries * ci: use bootstrap stack for sticky failure test * Fix stale Buildx recovery * dist: rebuild binaries
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f9527ffad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9739fe9911
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cfac95924f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 687e2712fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab459aec9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f9fb83100
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d3160aad8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd12007786
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5931d8190e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a26376f453
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed4191e356
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7fcf9ca11
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfebbeb696
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Persistent caches for RunsOn jobs
RunsOn jobs can now keep large build caches on a sticky disk between ephemeral runners. Add a
sticky=job label and select the caches your workflow needs:What changes for users
custom,path=...persists additional directories. Relative paths resolve fromGITHUB_WORKSPACE; home-relative and absolute directories are supported. File caches are rejected.cache-hitis true only when every requested cache was restored from an earlier snapshot.sticky_wait_timeout.Existing workflows are unchanged unless they configure
sticky_cache.BuildKit cache
The
buildkitmode prepares persistent state fordocker/setup-buildx-action. Run the RunsOn action first, then configure setup-buildx with the emitted builder name, thedocker-containerdriver, andcleanup: false. The post step validates the builder and makes a best-effort shutdown before the sticky disk is snapshotted.Git checkout cache
The
gitmode starts a local smart-HTTP proxy backed by mirrors on the sticky disk. Run it beforeactions/checkout; fetches use the mirror while pushes, Git LFS, and unsupported requests continue to use GitHub. Private repositories use the actiontokeninput.Workspace-relative caches must run after checkout. To combine Git with Ruby
vendor/bundleor a relative custom path, invokeruns-on/actiononce before checkout forgit, then again after checkout for the workspace cache.Reviewer notes
cache/*access remains available with cache isolation, andruns-on/cache@v5uses the repository prefix. CI targetsenv=bootstrap, deployed from the latest v3.2.0 template source with the publishedv3.2.0-rc.1artifact.go test ./..., Windows compilation and regression coverage, workflow lint, the complete automatic matrix, and explicit cold/warm sticky-disk roundtrips for pinned and latest Buildx.