From 16442a8cfd515aa94499efad5f0a88f024577208 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Fri, 2 Oct 2026 11:41:02 +0100 Subject: [PATCH 1/2] Disable Bazel disk cache when nativelink cloud cache is enabled --- .../setup-nativelink-cloud/action.yaml | 2 +- .github/workflows/native-bazel.yaml | 38 +++++++++++-------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/actions/setup-nativelink-cloud/action.yaml b/.github/actions/setup-nativelink-cloud/action.yaml index 5165e4dd3f1..f259a5d15a0 100644 --- a/.github/actions/setup-nativelink-cloud/action.yaml +++ b/.github/actions/setup-nativelink-cloud/action.yaml @@ -77,7 +77,7 @@ inputs: outputs: enabled: - description: "'true' when a user.bazelrc was written, else 'false'." + description: "'true' when remote cache or execution is enabled, else 'false'." value: ${{ steps.configure.outputs.enabled }} runs: diff --git a/.github/workflows/native-bazel.yaml b/.github/workflows/native-bazel.yaml index fd60d6eb788..8ed4e12fc22 100644 --- a/.github/workflows/native-bazel.yaml +++ b/.github/workflows/native-bazel.yaml @@ -49,15 +49,8 @@ jobs: - name: Free disk space uses: ./.github/actions/free-disk - - name: Setup Bazel - uses: >- # v0.19.0 - bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 - with: - bazelisk-cache: true - repository-cache: true - disk-cache: ${{ github.workflow }}-${{ matrix.os }}-bazel-${{ matrix.bazel_version }} - - name: Setup NativeLink Cloud + id: setup-nativelink-cloud uses: ./.github/actions/setup-nativelink-cloud with: ci-mode: ${{ vars.NATIVELINK_CI_MODE }} @@ -72,6 +65,16 @@ jobs: # non-Linux runners, so macOS lanes fall back to cache. exec: ${{ runner.os == 'Linux' && 'on' || 'off' }} + - name: Setup Bazel + uses: >- # v0.19.0 + bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 + with: + bazelisk-cache: true + repository-cache: true + # Only enable when we don't have remote cache, otherwise it just gets very slow + # and enormous + disk-cache: ${{ steps.setup-nativelink-cloud.outputs.enabled == 'false'}} + - name: Show Bazel version run: bazel --version @@ -119,15 +122,8 @@ jobs: with: compose-file: src/bin/docker-compose.store-tester.yaml - - name: Setup Bazel - uses: >- # v0.19.0 - bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 - with: - bazelisk-cache: true - repository-cache: true - disk-cache: ${{ github.workflow }}-ubuntu-24.04 - - name: Setup NativeLink Cloud + id: setup-nativelink-cloud uses: ./.github/actions/setup-nativelink-cloud with: ci-mode: ${{ vars.NATIVELINK_CI_MODE }} @@ -142,6 +138,16 @@ jobs: # non-Linux runners, so macOS lanes fall back to cache. exec: ${{ runner.os == 'Linux' && 'on' || 'off' }} + - name: Setup Bazel + uses: >- # v0.19.0 + bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 + with: + bazelisk-cache: true + repository-cache: true + # Only enable when we don't have remote cache, otherwise it just gets very slow + # and enormous + disk-cache: ${{ steps.setup-nativelink-cloud.outputs.enabled == 'false'}} + - name: Run Store tester with sentinel run: | bazel run //:redis_store_tester \ From dbefadc2e5f105088b367abb7f1ef26fbe814627 Mon Sep 17 00:00:00 2001 From: b7r6 Date: Fri, 2 Oct 2026 14:44:04 -0400 Subject: [PATCH 2/2] ci(baseline): force ci-mode=off to measure cache-OFF Bazel Native wall-clock Apples-to-apples BEFORE for PR #6 (same commit 16442a8c): disables the public read-only NativeLink remote cache so 'bazel test //...' builds cold. Measurement-only branch. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/native-bazel.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/native-bazel.yaml b/.github/workflows/native-bazel.yaml index 8ed4e12fc22..afa8d2d87f8 100644 --- a/.github/workflows/native-bazel.yaml +++ b/.github/workflows/native-bazel.yaml @@ -53,7 +53,7 @@ jobs: id: setup-nativelink-cloud uses: ./.github/actions/setup-nativelink-cloud with: - ci-mode: ${{ vars.NATIVELINK_CI_MODE }} + ci-mode: off claim-base: ${{ secrets.NATIVELINK_STAGING_CLAIM_BASE }} bes-results-url: ${{ secrets.NATIVELINK_STAGING_BES_RESULTS_URL }} api-key: >- @@ -126,7 +126,7 @@ jobs: id: setup-nativelink-cloud uses: ./.github/actions/setup-nativelink-cloud with: - ci-mode: ${{ vars.NATIVELINK_CI_MODE }} + ci-mode: off claim-base: ${{ secrets.NATIVELINK_STAGING_CLAIM_BASE }} bes-results-url: ${{ secrets.NATIVELINK_STAGING_BES_RESULTS_URL }} api-key: >-