From 94dbbea3d3481338038a1fb648c3e0d8b0a400c8 Mon Sep 17 00:00:00 2001 From: lizhimins <707364882@qq.com> Date: Tue, 19 May 2026 10:17:58 +0800 Subject: [PATCH] [ISSUE #10341] Fix Bazel CI build failure caused by Maven Central rate limiting Disable fetch_sources to halve download requests, add Apache mirror as fallback repository, and cache Bazel dependencies across CI runs. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/bazel.yml | 10 +++++++++- WORKSPACE | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 510457ca46e..4fd87424114 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -16,7 +16,15 @@ jobs: matrix: os: [ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: Cache Bazel repository + uses: actions/cache@v4 + with: + path: | + ~/.cache/bazel + key: bazel-repo-${{ runner.os }}-${{ hashFiles('WORKSPACE') }} + restore-keys: | + bazel-repo-${{ runner.os }}- - name: Build run: bazel build --config=remote //... - name: Run Tests diff --git a/WORKSPACE b/WORKSPACE index d3a93fffe14..1abb19ea2a2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -115,10 +115,10 @@ maven_install( "com.alibaba.fastjson2:fastjson2:2.0.59", "org.junit.jupiter:junit-jupiter-api:5.9.1", ], - fetch_sources = True, + fetch_sources = False, repositories = [ - # Private repositories are supported through HTTP Basic auth "https://repo1.maven.org/maven2", + "https://repo.maven.apache.org/maven2", ], )