Support storing and restoring cache entries as buffers.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
The GitHub Actions cache feature currently only supports storing and restoring cache entries that point to files on disk. This works great for things like node_modules folders, and other kinds of data that are produced during an Actions run that are well-known to the pipeline definition, but works less well for build output in complex repos that doesn't follow as predictable a structure, or has structure that is difficult to model in a YAML pipeline.
The Rush monorepo manager has built-in support for caching build output, which is facilitated through plugins that store and retrieve NodeJS Buffers. Rush currently supports remote build cache storage on Azure Storage, Amazon S3, and providers that support generic HTTP operations like Gradle. I've put together a prototype (currently on a branch, not yet in a PR) Rush plugin that adds support for GitHub Actions, but it requires either duplicating a nontrivial amount of code in the @actions/cache package to directly call functions from the @actions/http-client package, or expanded APIs in the @actions/cache package.
Code Snippet
I've pushed a branch to my fork of this repo with proposed new APIs in the @actions/cache package. These are currently not exposed from the package's entrypoint. The contributing guide asks that PRs not be raised without prompting, so I haven't opened a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed APIs in the linked cache-buffers branch and the @actions/cache package entrypoint, then compare them with the Rush plugin prototype. Done means the cache package exposes a supported way to store and restore NodeJS Buffers without duplicating its HTTP-client logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, node.js, typescript
- Domain
- devops, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100