Skip to content

HDDS-16359. Make CI survive Maven Central rate limiting - #11175

Open
rjgoyln wants to merge 1 commit into
apache:masterfrom
rjgoyln:HDDS-16359-maven-retry
Open

HDDS-16359. Make CI survive Maven Central rate limiting#11175
rjgoyln wants to merge 1 commit into
apache:masterfrom
rjgoyln:HDDS-16359-maven-retry

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

A PR based on an older master can restore a Maven cache built from newer POMs, causing a missing dependency to be fetched from Maven Central. If Central returns HTTP 429, the job fails during dependency resolution before compilation or tests.

The existing retry settings use maven.wagon.http.*, but Maven 3.9 resolves dependencies through maven-resolver-transport-http, which uses aether.connector.http.retryHandler.*. The Wagon properties are ignored, leaving only the resolver's default of three retries (~30s), matching the 32s failure seen in the JIRA job.

This changes the settings to the resolver properties, increasing retry time to ~275s. The maximum individual wait remains 50s, below the resolver's 300s intervalMax, and existing job timeouts still bound total runtime.

maven.wagon.http.pool is removed for the same reason. http.keepAlive remains because it is JDK-level.

JIRA: https://issues.apache.org/jira/browse/HDDS-16359

Tests

Tested with Maven 3.9.16 against a repository returning HTTP 429:

MAVEN_OPTS Requests Elapsed
(none) 4 32s
maven.wagon.http.retryHandler.count=0 4 31s
aether.connector.http.retryHandler.count=0 1 4s
aether.connector.http.retryHandler.count=10 11 268s

The Wagon setting has no effect; the resolver setting works as expected.

CI jobs fail during dependency resolution, before anything is compiled,
when Maven Central answers HTTP 429. The retry settings carried in
MAVEN_OPTS since HDDS-5187 configure Wagon, which stopped being the
resolver transport when the runner image moved to Maven 3.9, so they have
had no effect for some time. Only the resolver's own default of three
retries applies, giving up after roughly 30 seconds of a rate-limit
window. Any pull request whose base predates a dependency bump on master
restores a cache that no longer holds the pinned version, so it must
fetch that artifact over the network and is exposed to this failure.
Copilot AI lite review requested due to automatic review settings August 31, 2026 17:37

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rjgoyln
rjgoyln marked this pull request as ready for review August 31, 2026 17:47
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.

2 participants