Skip to content

ci(build): Reduce maven 429 errors by using GCS Maven Mirror - #14172

Open
lqiu96 wants to merge 8 commits into
googleapis:mainfrom
lqiu96:reduce_maven_429_errors
Open

ci(build): Reduce maven 429 errors by using GCS Maven Mirror#14172
lqiu96 wants to merge 8 commits into
googleapis:mainfrom
lqiu96:reduce_maven_429_errors

Conversation

@lqiu96

@lqiu96 lqiu96 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Maven Central serves as a fallback for when GCS Mirror does not contain any artifact (most likely case: Artifact was just released and mirror did not replicate it yet).

Use settings.xml's profile to define a fallback: local .m2 -> gcs mirror -> maven central. Should be able to handle pulling in deps without overloading maven central

Fixes: #14171

@lqiu96
lqiu96 requested a review from blakeli0 August 24, 2026 18:15
@lqiu96
lqiu96 requested review from a team as code owners August 24, 2026 18:15

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request configures the Google Maven Central Mirror in the root settings.xml using an active profile instead of mirrors, enabling a prioritized search chain with automatic fallback to Maven Central. Additionally, the downstream build script is updated to copy this configuration to the local ~/.m2 directory before running the build. Feedback suggests explicitly specifying the destination file path when copying settings.xml in the shell script to improve robustness.

Comment thread .kokoro/presubmit/downstream-build.sh Outdated
lqiu96 and others added 2 commits August 24, 2026 14:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@lqiu96

lqiu96 commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

429 error on the PR to try and reduce the 429's:

[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:3.1.4 or one of its dependencies could not be resolved:
[ERROR] 	The following artifacts could not be resolved: org.apache.maven.plugins:maven-install-plugin:pom:3.1.4 (present, but unavailable): Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:3.1.4 from/to central (https://repo.maven.apache.org/maven2): status code: 429, reason phrase: Too Many Requests (429)

Seems odd.. this should be in the maven mirror. Taking a look.

Comment thread settings.xml
<repository>
<id>google-maven-central</id>
<name>Google Maven Central Mirror</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@suztomo I remember we decided not to use Google mirror at some point. What was the rational?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven 429: Too many requests

2 participants