Skip to content

ci: remove the unused ci.bazelrc - #383

Open
xnox wants to merge 1 commit into
chainguard-dev:mainfrom
xnox:drop-dead-ci-bazelrc
Open

xnox wants to merge 1 commit into
chainguard-dev:mainfrom
xnox:drop-dead-ci-bazelrc

Conversation

@xnox

@xnox xnox commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

.github/workflows/ci.bazelrc opens with:

This file contains Bazel settings to apply on CI only.
It is referenced with a --bazelrc option in the call to bazel in ci.yaml

Nothing references it. grep -rn ci.bazelrc across the tree found exactly one hit — a pointer comment in //.bazelrc — and the file has not been touched since the initial commit. ci.yaml passes its CI settings inline through setup-bazel's bazelrc input instead:

bazelrc: |
  common --announce_rc --color=yes --enable_bzlmod
  test --test_output=errors

So none of the settings in the file have been taking effect. This removes it, along with the now-dangling comment in //.bazelrc.

What was in it, and where it stands

Setting Status
build --announce_rc already set inline in ci.yaml
test --test_output=errors already set inline in ci.yaml
build --disk_cache=~/.cache/bazel never persisted between runs; nothing restores or saves that directory
test --test_env=XDG_CACHE_HOME not covered elsewhere — see below

The disk cache entry is also self-contradictory in a way worth noting: its comment says "We do not enable the repository cache to cache downloaded external artifacts as these are generally faster to download again." ci.yaml sets repository-cache: true, so current practice is the opposite of what the file documents.

--test_env=XDG_CACHE_HOME is the one setting not duplicated in ci.yaml. Its comment says it exists to let tests run bazelisk-in-bazel; there are no such tests in the repo (no hits for bazelisk or XDG_CACHE_HOME in any .bzl, BUILD, or shell file), and the suite passes without it — as it has been doing all along, since the file was never applied. If a bazelisk-in-bazel test is added later, that setting can go into ci.yaml's inline block where it will actually apply.

Test plan

  • grep -rn ci.bazelrc across the tree returns nothing
  • bazel build //examples/wolfi-base succeeds, confirming //.bazelrc still parses after the comment removal

No behaviour change: a file that was never loaded cannot change behaviour by being deleted.

🤖 Generated with Claude Code

The file says it "is referenced with a --bazelrc option in the call to
bazel in ci.yaml", but nothing references it: the only mention anywhere
in the tree was a pointer comment in //.bazelrc, and it has not been
touched since the initial commit. ci.yaml passes its CI settings inline
through setup-bazel's bazelrc input instead, so none of these settings
have been taking effect.

Of what it contained, --announce_rc and --test_output=errors are already
set inline in ci.yaml. --disk_cache was never persisted between runs, and
its comment claiming the repository cache is deliberately not enabled is
contradicted by ci.yaml, which sets repository-cache: true.
--test_env=XDG_CACHE_HOME is the only setting not covered elsewhere; it
exists to let tests run bazelisk-in-bazel, and there are no such tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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