From ad6c19b41d2bd8b717ed90e2b1b16cd154060c14 Mon Sep 17 00:00:00 2001 From: starr-openai Date: Thu, 16 Apr 2026 13:59:52 -0700 Subject: [PATCH] Explain Bazel log tail config Document why failed-test log tailing runs bazel info with matching CI config and only selected post-config args. Co-authored-by: Codex --- .github/scripts/run-bazel-ci.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/run-bazel-ci.sh b/.github/scripts/run-bazel-ci.sh index 2f43879a47..a1d42a0576 100755 --- a/.github/scripts/run-bazel-ci.sh +++ b/.github/scripts/run-bazel-ci.sh @@ -75,12 +75,19 @@ print_bazel_test_log_tails() { bazel_info_cmd+=("${bazel_startup_args[@]}") fi + # `bazel info` needs the same CI config as the failed test invocation so + # platform-specific output roots match. On Windows, omitting `ci-windows` + # would point at `local_windows-fastbuild` even when the test ran with the + # MSVC host platform under `local_windows_msvc-fastbuild`. if [[ -n "${BUILDBUDDY_API_KEY:-}" ]]; then bazel_info_args+=( "--config=${ci_config}" "--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" ) fi + # Only pass flags that affect Bazel's output-root selection or repository + # lookup. Test/build-only flags such as execution logs or remote download + # mode can make `bazel info` fail, which would hide the real test log path. for arg in "${post_config_bazel_args[@]}"; do case "$arg" in --host_platform=* | --repo_contents_cache=* | --repository_cache=*)