bazelbuild / bazelbuild/bazel

Statistics or information for repository_cache hits

Open
#26,334 0 comments 1 reaction 0 assignees View on GitHub
help wanted 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:

I can see in CacheHitReportingModule (https://github.com/bazelbuild/bazel/blob/ab371fe096b1ea05fba1cf686c7d6ae15c5d21fa/src/main/java/com/google/devtools/build/lib/bazel/repository/CacheHitReportingModule.java) that events are emitted from the DownloadManager

However information on how many hits to the repository_cache were made are not available in the BEP or the logs in any fashion.

There seems to be some informational log messages only in the case of a failure.
It might be nice to emit more info to help understand which artifacts were found in the repository_cache vs. which are not.

This would help understand and catch cases where we are not caching like we believe we are.

### Which category does this issue belong to?

_No response_

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

_No response_

### 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 HEAD` ?

```text

```

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

_No response_

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

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with src/main/java/com/google/devtools/build/lib/bazel/repository/CacheHitReportingModule.java and trace the DownloadManager events it consumes. Review how repository_cache failures are logged and how related data could appear in the BEP or logs. Done means users can distinguish repository_cache hits from misses and inspect useful hit statistics.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.