Expand description
The build cache every runner shares (ADR 0052, 0053, 0083): the entries of Gradle’s HTTP build cache, and of the
other tools the runner image points at it, Turborepo’s and Nx’s among them, kept per repository in a directory of
the daemon’s and served to each runner on a Unix socket of its own, which the runner image forwards to
127.0.0.1. Owns the entries, the size limit, the sockets, and what each runner was served and stored. Which
socket a request came in on is who sent it; no job can claim another’s. It never decides whether a job may write:
the engine tells it (Writes), from what GitHub says of the job. It never logs a request’s headers, which may
carry a tool’s token. Where the config turns it on, the same socket serves GitHub Actions’ cache (actions, ADR
0082) from the same entries’ directory and limits.
Structs§
- Build
Cache - The shared build cache. Cloning shares it.
- Scopes
- The scopes of a runner’s GitHub Actions cache entries, as GitHub’s: refs,
refs/heads/<branch>orrefs/pull/<number>/merge, from what GitHub said of its job (ADR 0082). - Size
- The build cache’s size now.
- Trimmed
- What
trimremoved.
Enums§
- Actions
Cache - Whether a runner’s socket serves GitHub Actions’ cache besides the build cache’s tools (ADR 0082).
- Writes
- Whether a runner’s job may write entries.
Constants§
- ACTIONS_
MARKER - A file in that directory when the runner’s socket serves GitHub Actions’ cache too: the image forwards it for
node actions and BuildKit only then (
image/build-cache.sh). - MOUNT
- Where a runner container mounts its socket’s directory, read-only (
image/entrypoint.sh). - PULL_
REQUEST_ EVENT - The event of a pull request’s run that
BuildCacheWriters::PullRequestslets write. Neverpull_request_target, which runs with the repository’s secrets whatever the pull request’s head is. - SOCKET
- The socket’s name in that directory.
Functions§
- opened_
by_ user - Whether a pull request
triggerruns lets it write: a person opened it, fromtrigger’s head branch inrepositoryitself. A bot’s, such as Renovate’s or Dependabot’s, only reads. - writes
- Whether
runner’s job may write, from what GitHub says: the runner it placed the job on (job_runner, which a job cannot forge as it can its runner’s log), and its run’s trigger. A push, scheduled or manually started run ofrepositoryitself on one ofbranchesmay. WithwritersatPullRequests, so may apull_requestrun of one of the repository’s own branches that people started, once GitHub also says each of its pull requests was opened by one (opened_by_user).Undecidedwhile GitHub places the job on no runner.