Problem
The Bazel CI workflow (bazel-compile) consistently fails during the maven_install dependency fetch phase. Maven Central returns HTTP 429 (Too Many Requests) for a large number of artifacts, causing the entire build to fail.
Error log excerpt:
ERROR: An error occurred during the fetch of repository 'maven':
Error while fetching artifact with coursier:
Error fetching artifacts:
https://repo1.maven.org/maven2/software/amazon/awssdk/utils/2.20.29/utils-2.20.29.jar: download error:
Caught java.io.IOException (Server returned HTTP response code: 429 ...)
... (3600+ download failures)
FAILED: Build did NOT complete successfully (88 packages loaded, 1561 targets configured)
Root Cause
fetch_sources = True in WORKSPACE doubles the number of download requests by fetching -sources.jar for every dependency — unnecessary for CI builds.
- Single Maven repository configured with no fallback mirror.
- No dependency caching in the GitHub Actions workflow, so every run downloads all artifacts from scratch.
Proposed Fix
- Set
fetch_sources = False to eliminate unnecessary source jar downloads.
- Add
https://repo.maven.apache.org/maven2 as a fallback repository.
- Add
actions/cache for ~/.cache/bazel in the workflow to avoid redundant downloads across runs.
- Upgrade
actions/checkout from v2 to v4.
Problem
The Bazel CI workflow (
bazel-compile) consistently fails during themaven_installdependency fetch phase. Maven Central returns HTTP 429 (Too Many Requests) for a large number of artifacts, causing the entire build to fail.Error log excerpt:
Root Cause
fetch_sources = TrueinWORKSPACEdoubles the number of download requests by fetching-sources.jarfor every dependency — unnecessary for CI builds.Proposed Fix
fetch_sources = Falseto eliminate unnecessary source jar downloads.https://repo.maven.apache.org/maven2as a fallback repository.actions/cachefor~/.cache/bazelin the workflow to avoid redundant downloads across runs.actions/checkoutfrom v2 to v4.