[
https://issues.apache.org/jira/browse/HDDS-16359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dian-Xuan Yang updated HDDS-16359:
----------------------------------
Status: Patch Available (was: Open)
> CI dependency resolution fails on Maven Central HTTP 429 because the
> configured retries are inert
> -------------------------------------------------------------------------------------------------
>
> Key: HDDS-16359
> URL: https://issues.apache.org/jira/browse/HDDS-16359
> Project: Apache Ozone
> Issue Type: Bug
> Components: CI
> Reporter: Dian-Xuan Yang
> Assignee: Dian-Xuan Yang
> Priority: Major
> Labels: pull-request-available
>
> h2. Problem
> CI jobs can fail during dependency resolution when Maven Central returns HTTP
> 429, before compilation or tests start.
> Example:
> https://github.com/apache/ozone/actions/runs/32979708858/job/99223207224
> The cache miss itself is expected: the PR still uses
> `opentelemetry-bom:1.64.0`, while the restored cache was built from a newer
> master containing 1.65.0. The problem is that the subsequent download gives
> up after only ~30 seconds.
> h2. Root Cause
> CI still configures the old Wagon retry properties:
> {code}
> -Dmaven.wagon.http.retryHandler.class=standard
> -Dmaven.wagon.http.retryHandler.count=3
> {code}
> Maven 3.9.16 now uses `maven-resolver-transport-http`, which ignores these
> properties and instead reads `aether.connector.http.retryHandler.*`.
> The resolver defaults to 3 retries with linear backoff:
> {code}
> 0s request #1 → 429
> 5s request #2 → 429
> 15s request #3 → 429
> 30s request #4 → 429 → fail
> {code}
> This matches the failing job, which took ~32 seconds from the first attempt
> to the 429 failure.
> This was reproduced locally with Maven 3.9.16:
> {code}
> MAVEN_OPTS requests elapsed
> (none) 4 32s
> -Dmaven.wagon.http.retryHandler.count=0 4 31s <-
> ignored
> -Daether.connector.http.retryHandler.count=0 1 4s <-
> honoured
> -Daether.connector.http.retryHandler.count=10 11 268s
> {code}
> h2. Proposed Fix
> Replace the obsolete Wagon settings with:
> {code}
> MAVEN_OPTS: -Dhttp.keepAlive=false
> -Daether.connector.http.retryHandler.count=10
> {code}
> Apply this to the affected CI workflows.
> This increases the retry window from ~30 seconds to ~275 seconds while
> keeping the existing `Retry-After` handling and job-level timeouts.
> Also remove `maven.wagon.http.pool`, since it is Wagon-specific.
> h2. Acceptance Criteria
> * CI tolerates a rate-limited download of a missing artifact from Maven
> Central.
> * CI uses the retry properties supported by Maven 3.9.x.
> h2. Out of Scope
> Maven cache cleanup is a separate issue. The cache miss is expected for PRs
> that are behind master; changing the cache strategy would not address the
> underlying 429 failure.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]