Skip to content

BLA-4010 add build cache operation observers#3

Merged
shreyas-blacksmith merged 3 commits into
shreyas/bla-4006-bazel-cache-prefixingfrom
shreyas/bla-4010-build-cache-metrics-bazel-remote
Jun 22, 2026
Merged

BLA-4010 add build cache operation observers#3
shreyas-blacksmith merged 3 commits into
shreyas/bla-4006-bazel-cache-prefixingfrom
shreyas/bla-4010-build-cache-metrics-bazel-remote

Conversation

@shreyas-blacksmith

@shreyas-blacksmith shreyas-blacksmith commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds generic build-cache operation observation hooks to the Blacksmith bazel-remote fork. This is intentionally FA/Web agnostic: bazel-remote only forwards opaque labels and semantic cache outcomes.

Metric contract

  • action_cache_get: hit | miss | error
  • cas_lookup: hit | miss | error
  • backend_upload: error | dropped

Client transfer bytes are not inferred in bazel-remote. FA observes gRPC payloads and emits client_upload / client_download rows.

Safety

  • Nil observer preserves current behavior.
  • Observer panics are swallowed, so metrics cannot affect cache serving.
  • No FA, Web, Laravel, tenant, repo, or job concepts are interpreted in this repo.

Tests

  • env GOCACHE=/private/tmp/codex-go-cache-bazel-remote go test ./cache/...
  • git diff --check

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


View with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is enabled. (Staging)

@linear-code

linear-code Bot commented Jun 14, 2026

Copy link
Copy Markdown

BLA-4010

@blacksmith-staging blacksmith-staging Bot force-pushed the shreyas/bla-4010-build-cache-metrics-bazel-remote branch from 8005d87 to a0992bd Compare June 15, 2026 18:43
@shreyas-blacksmith shreyas-blacksmith marked this pull request as ready for review June 18, 2026 16:18
@blacksmith-staging blacksmith-staging Bot force-pushed the shreyas/bla-4006-bazel-cache-prefixing branch from c324cf2 to 7471683 Compare June 21, 2026 02:49
shreyas-blacksmith and others added 3 commits June 20, 2026 22:00
@shreyas-blacksmith shreyas-blacksmith force-pushed the shreyas/bla-4010-build-cache-metrics-bazel-remote branch from b760ca2 to 7b73094 Compare June 21, 2026 03:02
@shreyas-blacksmith shreyas-blacksmith merged commit 7e0813c into shreyas/bla-4006-bazel-cache-prefixing Jun 22, 2026
4 checks passed
shreyas-blacksmith added a commit that referenced this pull request Jun 22, 2026
* BLA-4010 add build cache operation observers

* BLA-4010 drop unused RunID metrics label

Co-authored-by: Cursor <cursoragent@cursor.com>

* BLA-4010 drop unused OperationOutcome Kind/HasKind

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
shreyas-blacksmith added a commit that referenced this pull request Jun 22, 2026
* BLA-4010 add build cache operation observers

* BLA-4010 drop unused RunID metrics label



* BLA-4010 drop unused OperationOutcome Kind/HasKind



---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants