Skip to content

chore(bazel): remove references to the decommissioned remote cache#435

Open
balajinvda wants to merge 2 commits into
mainfrom
chore/sync-bazelversion-drop-nvcfbarn
Open

chore(bazel): remove references to the decommissioned remote cache#435
balajinvda wants to merge 2 commits into
mainfrom
chore/sync-bazelversion-drop-nvcfbarn

Conversation

@balajinvda

@balajinvda balajinvda commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Why

The internal Buildbarn host was retired, but nine files still referenced it. The important one is not cosmetic: the per-service .bazel-remote-probe scripts defaulted NVCF_BAZEL_REMOTE_HOST to that host, so an unset variable pointed the probe at a dead endpoint instead of cleanly disabling the cache.

What changed

  • Probe scripts (6): no default host. An unset NVCF_BAZEL_REMOTE_HOST now disables the cache and builds local-only, which is the safe fallback these scripts already document. No replacement endpoint is hardcoded; the caller supplies it, matching the root .bazelrc.
  • nvsnap/.bazelrc: drop the dead endpoint from the :remote profile, leaving only policy and tuning flags.
  • byoo-otel-collector/README.md and grpc-proxy/proxy/geo/BUILD.bazel: comment references.

There are now zero references to the retired host in the repository.

While editing the geo BUILD.bazel comment, corrected a factual error. It claimed local = True "does NOT bypass result caching". It does: local is the union of no-sandbox, no-remote-exec, and no-cache. That same misconception is what kept byoo-otel-collector recompiling on every CI run instead of hitting the remote cache. Only the comment changed here; the target's tags are untouched.

Customer Release Notes

Not customer visible.

Testing

All six probe scripts pass bash -n. The behavior change is fail-safe by construction: previously an unset host produced a probe against a dead endpoint, now it produces a local-only build.

Notes

Not included, deliberately. This branch originally also synced every subtree .bazelversion to the root's 9.1.1. Local validation showed that is a migration, not a file edit, so it was dropped:

  • nats-auth-callout (Go) on 9.1.1: name 'sh_test' is not defined. Bazel 9 removed sh_test from the built-in globals; it needs an explicit load() plus a rules_shell dependency.
  • ratelimiter (Rust) on 9.1.1: protoc version does not match protobuf Bazel module.

Two of two sampled subtrees fail, for two different reasons, so converging the 15 subtrees currently on 8.6.0 up to the root's 9.1.1 needs per-subtree work and belongs in its own tracked effort. The separate float bug (four worker subtrees carrying no .bazelversion at all, so their release builds resolve whatever bazelisk considers latest) is fixed in #433.

References

Follows the root-level cleanup in #399.

Related Merge Requests/Pull Requests

#433 (pins the four worker subtrees that ship no .bazelversion).

Dependencies

None.

Summary by CodeRabbit

  • Bug Fixes

    • Remote build caching now remains disabled unless explicitly enabled with a configured cache host.
    • Removed reliance on a built-in default cache endpoint.
    • Improved TLS and certificate handling messages when remote caching cannot be used.
  • Documentation

    • Updated caching guidance and corrected terminology across build configuration and probe documentation.

The internal Buildbarn host was retired, but it was still referenced in nine
files. The per-service .bazel-remote-probe scripts defaulted
NVCF_BAZEL_REMOTE_HOST to it, so an unset variable pointed the probe at a dead
host rather than cleanly disabling the cache.

- Probe scripts (6): no default host. An unset NVCF_BAZEL_REMOTE_HOST now
  disables the cache and builds local-only, which is the safe fallback the
  scripts already document. No new endpoint is hardcoded in its place; the
  caller supplies it, matching the root .bazelrc.
- nvsnap/.bazelrc: drop the dead endpoint from the :remote profile; the
  profile keeps only policy and tuning flags.
- byoo README, grpc-proxy geo BUILD.bazel: comment references.

While in the geo BUILD.bazel comment, corrected a factual error: it claimed
 does NOT bypass result caching. It does.  is the union
of no-sandbox, no-remote-exec and no-cache. The same misconception is what
kept byoo-otel-collector recompiling on every CI run.

Co-authored-by: Balaji Ganesan <bganesan@nvidia.com>
@balajinvda
balajinvda requested review from a team as code owners July 25, 2026 00:07
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Remote cache configuration

Layer / File(s) Summary
Require explicit remote cache hosts
src/compute-plane-services/*/scripts/.bazel-remote-probe, src/control-plane-services/*/scripts/.bazel-remote-probe, src/invocation-plane-services/*/scripts/.bazel-remote-probe
Remote caching now requires NVCF_BAZEL_REMOTE=1 and a non-empty NVCF_BAZEL_REMOTE_HOST; default host fallbacks and related wording are removed while port and TLS defaults remain.
Remove hardcoded cache endpoint
src/compute-plane-services/nvsnap/.bazelrc, src/compute-plane-services/byoo-otel-collector/README.md, src/invocation-plane-services/grpc-proxy/proxy/geo/BUILD.bazel
Bazel cache policy no longer defines a fixed endpoint, and related cache documentation comments are updated.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: famousdirector

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses valid Conventional Commits format and accurately describes the maintenance change removing remote cache references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-bazelversion-drop-nvcfbarn

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe`:
- Around line 20-31: Add a reusable source-level behavioral test with a stubbed
grpcurl that exercises the shared remote-cache gate for an unset host, disabled
remote caching, and a configured host, then run it against all six
.bazel-remote-probe scripts:
src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe (20-31),
src/compute-plane-services/nvca/scripts/.bazel-remote-probe (19-29),
src/control-plane-services/function-autoscaler/scripts/.bazel-remote-probe
(20-31), src/control-plane-services/helm-reval/scripts/.bazel-remote-probe
(18-29),
src/invocation-plane-services/http-invocation/scripts/.bazel-remote-probe
(20-31), and
src/invocation-plane-services/llm-api-gateway/scripts/.bazel-remote-probe
(20-31). Verify each probe’s host and remote-enabled gate produces the expected
behavior, and run the repository-native test runner.</code>

In `@src/invocation-plane-services/grpc-proxy/proxy/geo/BUILD.bazel`:
- Around line 77-80: Correct the comment describing local = True in the relevant
Bazel test configuration: state that it forces local unsandboxed execution and
disables remote execution, but does not disable all caching. Keep the
explanation that the external tag prevents Bazel from reusing cached test
results, and retain the requires-docker note.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5a518dbf-60c3-427f-9e52-5eac44c08098

📥 Commits

Reviewing files that changed from the base of the PR and between a5c5060 and 5ce357c.

📒 Files selected for processing (9)
  • src/compute-plane-services/byoo-otel-collector/README.md
  • src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe
  • src/compute-plane-services/nvca/scripts/.bazel-remote-probe
  • src/compute-plane-services/nvsnap/.bazelrc
  • src/control-plane-services/function-autoscaler/scripts/.bazel-remote-probe
  • src/control-plane-services/helm-reval/scripts/.bazel-remote-probe
  • src/invocation-plane-services/grpc-proxy/proxy/geo/BUILD.bazel
  • src/invocation-plane-services/http-invocation/scripts/.bazel-remote-probe
  • src/invocation-plane-services/llm-api-gateway/scripts/.bazel-remote-probe

Comment on lines 20 to +31
BAZEL_REMOTE_FLAGS=""
if [ "${NVCF_BAZEL_REMOTE:-1}" != "1" ]; then
echo "[bazel-remote] NVCF_BAZEL_REMOTE=${NVCF_BAZEL_REMOTE:-unset}; remote cache disabled"
if [ "${NVCF_BAZEL_REMOTE:-1}" != "1" ] || [ -z "${NVCF_BAZEL_REMOTE_HOST:-}" ]; then
echo "[bazel-remote] remote cache disabled (NVCF_BAZEL_REMOTE=${NVCF_BAZEL_REMOTE:-unset}, NVCF_BAZEL_REMOTE_HOST=${NVCF_BAZEL_REMOTE_HOST:-unset}); building local-only"
else
host="${NVCF_BAZEL_REMOTE_HOST:-nvcfbarn.nvidia.com}"
host="${NVCF_BAZEL_REMOTE_HOST}"
port="${NVCF_BAZEL_REMOTE_PORT:-443}"
tls="${NVCF_BAZEL_REMOTE_TLS:-1}"
if [ "${tls}" = "1" ] && [ -z "${BAZEL_REMOTE_CA_PEM:-}" ]; then
# TLS requires a CA pem. grpcurl can probe with `-insecure`, but
# Bazel's own gRPC client cannot: with `grpcs://` and no
# `--tls_certificate` it tries the system trust store, which does
# not contain the nvcfbarn self-signed cert, and fails mid-build
# not contain the cache's self-signed cert, and fails mid-build

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Add behavioral tests for the shared remote-cache gate.

bash -n validates syntax only. Add a reusable source-level test with a stubbed grpcurl covering host unset, remote disabled, and a configured host, then run it for all six probes.

  • src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe#L20-L31: cover the new host check.
  • src/compute-plane-services/nvca/scripts/.bazel-remote-probe#L19-L29: cover the new host check.
  • src/control-plane-services/function-autoscaler/scripts/.bazel-remote-probe#L20-L31: cover the new host check.
  • src/control-plane-services/helm-reval/scripts/.bazel-remote-probe#L18-L29: cover the new host check.
  • src/invocation-plane-services/http-invocation/scripts/.bazel-remote-probe#L20-L31: cover the new host check.
  • src/invocation-plane-services/llm-api-gateway/scripts/.bazel-remote-probe#L20-L31: cover the new host check.

As per coding guidelines, code changes must include tests, or the Pull Request must explain why tests are not applicable; run the repository-native test runner before committing.

📍 Affects 6 files
  • src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe#L20-L31 (this comment)
  • src/compute-plane-services/nvca/scripts/.bazel-remote-probe#L19-L29
  • src/control-plane-services/function-autoscaler/scripts/.bazel-remote-probe#L20-L31
  • src/control-plane-services/helm-reval/scripts/.bazel-remote-probe#L18-L29
  • src/invocation-plane-services/http-invocation/scripts/.bazel-remote-probe#L20-L31
  • src/invocation-plane-services/llm-api-gateway/scripts/.bazel-remote-probe#L20-L31
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe` around
lines 20 - 31, Add a reusable source-level behavioral test with a stubbed
grpcurl that exercises the shared remote-cache gate for an unset host, disabled
remote caching, and a configured host, then run it against all six
.bazel-remote-probe scripts:
src/compute-plane-services/ess-agent/scripts/.bazel-remote-probe (20-31),
src/compute-plane-services/nvca/scripts/.bazel-remote-probe (19-29),
src/control-plane-services/function-autoscaler/scripts/.bazel-remote-probe
(20-31), src/control-plane-services/helm-reval/scripts/.bazel-remote-probe
(18-29),
src/invocation-plane-services/http-invocation/scripts/.bazel-remote-probe
(20-31), and
src/invocation-plane-services/llm-api-gateway/scripts/.bazel-remote-probe
(20-31). Verify each probe’s host and remote-enabled gate produces the expected
behavior, and run the repository-native test runner.</code>

Source: Coding guidelines

Comment on lines +77 to +80
# tag) live outside Bazel's hermetic action hash. Note `local = True`
# is the union of no-sandbox, no-remote-exec AND no-cache, so it does
# bypass result caching; the `external` tag additionally stops a cached
# pass from pinning a green forever. requires-docker is kept so callers

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
fd --hidden --type f '^\.bazelversion$' -x sh -c '
  printf "%s: " "$1"
  cat "$1"
' sh

Repository: NVIDIA/nvcf

Length of output: 1260


🌐 Web query:

Bazel test tags local external no-cache semantics local test result caching

💡 Result:

In Bazel, the local and no-cache tags interact with test execution and result caching in distinct ways. The "local" tag (or setting the local = True attribute on a test or genrule) forces the action to run locally on the host machine [1][2]. This specifically precludes the action from being executed remotely, run inside a sandbox, or remotely cached [1]. Because remote caching relies on the reproducibility of sandbox-isolated actions, designating an action as local implicitly disables remote caching [1][3]. The "no-cache" tag is intended to signal that an action or test should never be cached [1][4][5]. However, its behavior is limited in practice: 1. Scope: The no-cache tag primarily affects the disk and remote caches [6][5]. It does not disable the in-memory Skyframe cache (which affects incremental builds) or, in many cases, the persistent local action cache maintained within a Bazel workspace [6][5]. 2. Limitations: There is a known distinction in Bazel's caching layers [6][5]. While no-cache prevents results from being stored in or retrieved from external/disk caches, users often observe that Bazel still "caches" results via the persistent action cache or Skyframe, leading to perceived inconsistencies [6][5]. 3. Workarounds: Users requiring a complete bypass of caching often use a combination of tags or command-line flags. For example, disabling the persistent action cache requires using the --nouse_action_cache flag [6][5]. Because the Skyframe cache is internal and transient to the Bazel process, it cannot be fully disabled, though it is cleared by a bazel clean or process restart [6][5]. In summary, while local and no-cache are used to control execution and caching, they are not absolute "disable all caching" switches [6][3][5]. local is primarily an execution constraint that forces local, non-sandboxed processing, whereas no-cache is a directive intended to prevent storage and retrieval from external/disk caches, but with known limitations regarding local persistent caches [1][6][5].

Citations:


Do not equate local = True with no-cache.
local = True forces local, unsandboxed execution and disables remote execution/caching, but it does not turn off all caching. The external tag is what prevents Bazel from reusing a cached test result.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/invocation-plane-services/grpc-proxy/proxy/geo/BUILD.bazel` around lines
77 - 80, Correct the comment describing local = True in the relevant Bazel test
configuration: state that it forces local unsandboxed execution and disables
remote execution, but does not disable all caching. Keep the explanation that
the external tag prevents Bazel from reusing cached test results, and retain the
requires-docker note.

Source: MCP tools

The byoo-otel-collector subtree has a version gate that requires bumping its
VERSION file whenever ANY file under the subtree changes, with no exemption
for documentation. Bumping the collector's version to fix a one-word comment
would cut a spurious release, so leave that reference for the next byoo change
that bumps VERSION for a real reason.

All functional references are still removed; the remaining one is a single
prose mention in a README.

Co-authored-by: Balaji Ganesan <bganesan@nvidia.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.

1 participant