ci: configure actions/setup-java maven caching across workflows to fix 429 Too many requests flakiness - #14044
Conversation
…x 429 flakiness Enable 'cache: maven' in 'actions/setup-java' across 27 GitHub Actions workflows to eliminate redundant dependency downloads and mitigate HTTP 429 (Too Many Requests) rate limiting errors from Maven Central. Remove fragile and deprecated week-of-year date steps and custom actions/cache configs that conflicted with native setup-java caching. Error logs observed prior to fix: ``` 18:31:58:640 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.6.0:check (checkstyle) on project gax-bom: Execution checkstyle of goal org.apache.maven.plugins:maven-checkstyle-plugin:3.6.0:check failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.6.0 or one of its dependencies could not be resolved: 18:31:58:640 [ERROR] Failed to read artifact descriptor for org.iq80.snappy:snappy:jar:0.4 ... 18:33:16:682 [ERROR] The project com.google.api:gax-bom:2.84.0-SNAPSHOT (/home/runner/work/google-cloud-java/google-cloud-java/sdk-platform-java/gax-java/gax-bom/pom.xml) has 1 error 18:33:16:682 [ERROR] Non-resolvable parent POM for com.google.api:gax-bom:2.84.0-SNAPSHOT: The following artifacts could not be resolved: com.google.cloud:google-cloud-shared-config:pom:1.17.0 (absent): com.google.cloud:google-cloud-shared-config:pom:1.17.0 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.google.cloud:google-cloud-shared-config:pom:1.17.0 from/to central (https://repo.maven.apache.org/maven2): status code: 429, reason phrase: Too Many Requests (429) and 'parent.relativePath' points at no local POM @ line 11, column 11 -> [Help 2] ```
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Too many requests flakiness
Too many requests flakinessToo many requests flakiness
|
|
| with: | ||
| distribution: temurin | ||
| java-version: ${{matrix.java}} | ||
| cache: maven |
There was a problem hiding this comment.
I would be cautious of introducing cache in general. We've seen cache caused other issues such as not using the latest versions before.
How often do we see this issue? Is this issue caused by unstable Maven central?
There was a problem hiding this comment.
Discussed offline that this may cause false positive CIs that code changes in Gax/Auth are not propagated to downstream tests.



Enable 'cache: maven' in 'actions/setup-java' across the remaining GitHub Actions workflows to eliminate redundant dependency downloads and mitigate HTTP 429 (Too Many Requests) rate limiting errors from Maven Central.
There may be a better/ bigger long-term fix for this. But adding some caching for CIs should help resolve a lot of these flaky 429 issues causing the CIs to fail randomly.
Additionally, remove fragile and deprecated week-of-year date steps and custom actions/cache configs that conflicted with native setup-java caching.
Error logs:
From: https://github.com/googleapis/google-cloud-java/actions/runs/31522962200/job/93884821458?pr=14029