bazelbuild / bazelbuild/bazel

Automatically prune content in the repository cache

Open
#17,709 1 comment 7 reactions 0 assignees View on GitHub
P2 team-ExternalDeps type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the feature request:

Similar to https://github.com/bazelbuild/bazel/issues/5139, we'd like Bazel to be able to automatically prune the repository cache automatically to prevent it from filling the disk and requiring the user to clean out the cache to continue.

### What underlying problem are you trying to solve with this feature?

Multi-GB source tarballs that change frequently can fill the disk the repository cache resides on if they are downloaded by repository_rules, since the repository cache is not automatically cleaned out.

### Which operating system are you running Bazel on?

_No response_

### What is the output of `bazel info release`?

_No response_

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?

_No response_

### Have you found anything relevant by searching the web?

https://github.com/bazelbuild/bazel/issues/5139 is the same idea for the disk portion of the combined remote cache.

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the repository cache behavior described here and the related Bazel issue 5139. Determine the intended pruning policy and how frequently changing, multi-GB source tarballs should be handled. Done means the repository cache can automatically reclaim space without requiring users to clean it manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.