From 5b26aba09dafa2947b8539c98abaac23f2cf46fe Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Sun, 18 Oct 2026 11:24:40 -0700 Subject: [PATCH] build(bazel): inherit fleet settings through host profiles --- .bazelrc | 8 +++++--- docs/remote-execution.md | 22 +++++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.bazelrc b/.bazelrc index 3c29fcb26b..8fbc521a71 100644 --- a/.bazelrc +++ b/.bazelrc @@ -17,7 +17,9 @@ common --repo_env=CARGO_UNSTABLE_GIT=shallow-deps common --repo_env=RUSTC_BOOTSTRAP=1 # MODULE.bazel registers only nightly/2026-10-18. Without this, rules_rust # resolves the stable channel and the build fails closed. -build --@rules_rust//rust/toolchain/channel=nightly +# Hosts can extend this repository profile with their private fleet settings. +build --config=tracedecay +build:tracedecay --@rules_rust//rust/toolchain/channel=nightly build --incompatible_enable_cc_toolchain_resolution build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build --workspace_status_command=scripts/bazel/workspace_status.sh @@ -103,8 +105,8 @@ build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++cr # workspace-status command and compiler environment take precedence. build --enable_platform_specific_config -# Private execution pools opt in through .bazelrc.local. Endpoints and host -# capacity belong there; the repository owns execution compatibility. +# Host profiles select compatible execution pools; .bazelrc.local can override +# individual checkouts. Private endpoints and capacity stay outside the repo. build:rbe-linux --host_platform=//scripts/bazel/platforms:linux_x86_64 build:rbe-linux --platforms=//scripts/bazel/platforms:linux_x86_64 build:rbe-linux --extra_toolchains=@zig_sdk//toolchain:linux_amd64_gnu.2.31 diff --git a/docs/remote-execution.md b/docs/remote-execution.md index fa908fc77c..80b1d556ae 100644 --- a/docs/remote-execution.md +++ b/docs/remote-execution.md @@ -1,16 +1,24 @@ # Private Bazel execution -Bazel can use a private Remote Execution API service without changing the -repository's ordinary local builds. Put the pool address and capacity in the -checkout's ignored `.bazelrc.local`, which `.bazelrc` imports last: +The repository always expands its `tracedecay` Bazel configuration, which +selects the pinned nightly toolchain. Add the following to the host's +`~/.bazelrc` to extend that profile with private execution settings: ```bazelrc -build --config=rbe-linux -build --remote_executor=grpc://YOUR_PRIVATE_SCHEDULER:50051 -build --remote_instance_name=main -build --remote_local_fallback +build:tracedecay --config=rbe-linux +build:tracedecay --config=fleet +build:fleet --remote_executor=grpc://YOUR_PRIVATE_SCHEDULER:50051 +build:fleet --remote_cache=grpc://YOUR_PRIVATE_SCHEDULER:50051 +build:fleet --remote_instance_name=main +build:fleet --remote_local_fallback ``` +Every new TraceDecay worktree inherits this host profile automatically. Other +repositories do not select it. Without a host extension, including under +`--nohome_rc` in CI, the repository still selects nightly and builds locally. +The ignored `.bazelrc.local` remains available for later per-checkout overrides; +command-line options take precedence over rc settings. + Use `rbe-linux` on Linux x86_64 clients, or `rbe-macos` on Apple Silicon macOS clients. These configurations attach `OSFamily` and `cpu_arch` execution properties and matching Bazel constraints to the host platform. The scheduler