Wire the EC2 Bazel remote cache for the standalone Java modules
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
Context
Java services are moving to standalone Bazel modules: nv-boot-parent and nvcf_java_rules live outside the root module, and each Java service (starting with cloud-tasks) is its own module that bazel_deps them and builds individually.
Today cloud-tasks builds inside the root module: .github/workflows/bazel.yml includes src/control-plane-services/cloud-tasks/ in ROOT_GLOBS, so it inherits the root job's --config=remote and gets EC2 Buildbarn cache hits. Once it becomes its own module it drops out of ROOT_GLOBS and loses cache coverage unless the cache is wired explicitly, the same way the other service modules get it.
Current gap
rules/java/.bazelrchas no remote-cache config.- There is no
src/control-plane-services/cloud-tasks/.bazelrcand no dedicated matrix row for it. - Service modules do not set
--config=remote; the workflow injects--remote_cache/--tls_certificate/--remote_header=authorization=Bearerfor them. The Java modules must opt into that path (or set an equivalent config) or their CI builds go cache-cold.
What to wire
- Matrix row(s) in
.github/workflows/bazel.ymlfor the standalone Java module(s),is_root=false, and removecloud-tasks/fromROOT_GLOBSwhen it becomes its own module. - Confirm the non-root cache-injection block covers the Java build (endpoint
BAZEL_REMOTE_CACHE_ENDPOINT,BAZEL_REMOTE_CACHE_CA, tokenBAZEL_REMOTE_CACHE_TOKEN). - Release path:
nvcf-internal tools/ci/build_bazel_release_manifest.shalready probes the CI-variable-driven EC2 endpoint; verify it works for a Javatype: bazelbuild. - Verify: a cold vs warm CI run shows remote cache hits for the Java module; no Java module builds cache-cold.
Acceptance
Standalone Java module CI builds show EC2 Buildbarn cache hits and no module is silently cache-cold after the root-module split.
Relates to #343 (cloud-tasks import) and the standalone Java module work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .github/workflows/bazel.yml, comparing the non-root matrix and cache-injection block, then inspect rules/java/.bazelrc and the cloud-tasks module path. Check nvcf-internal tools/ci/build_bazel_release_manifest.sh for a Java type:bazel build. Done means standalone Java CI shows EC2 Buildbarn cache hits in cold and warm runs, with no Java module cache-cold.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, github-actions, java
- Domain
- build-system, ci-cd, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100