FrankChen021 opened a new pull request, #20718:
URL: https://github.com/apache/druid/pull/20718

   Fixes #20436.
   
   ### Description
   
   CI jobs keep failing before any test runs because Maven Central 
intermittently fails to serve artifacts: `org.apache:apache:pom:40` reported as 
not found, HTTP 502 from the CDN mid-build, and HTTP 429 rate limiting (11 
failed master jobs since 2026-09-23, tracked in #20436). The 3-attempt / 10 s 
pre-resolve step from #20459 is not enough. This PR changes 
`.github/workflows/worker.yml` in three ways and applies the same Maven retry 
settings to the workflows that run Maven outside `worker.yml`.
   
   #### Retry 429/5xx inside Maven Resolver
   
   `MAVEN_ARGS` makes Maven Resolver retry `429,502,503,504` responses up to 5 
times with linear backoff (10 s, 20 s, …), so mid-build misses are retried as 
well as the parent POM. It is set in `worker.yml`, `docker-tests.yml`, 
`codeql.yml` and `cron-job-its.yml`, and is scoped to CI so local builds are 
unchanged. The wrapper's Maven 3.10.0 uses Resolver 2, which reads 
`aether.transport.http.retryHandler.*`; by default it only retries `429,503`, 
so 502/504 are added.
   
   #### Cache the Apache parent POM separately
   
   The setup-java Maven cache is keyed on the hash of every `pom.xml`, so any 
pom change means a cold `~/.m2` and the parent POM has to come from Central. 
Several failures happened on runners with no cache. A new `actions/cache@v6` 
step caches only `~/.m2/repository/org/apache/apache/<version>`, keyed on the 
parent version read from `pom.xml`, so the parent POM is local on nearly every 
run.
   
   #### Backoff in the pre-resolve step
   
   `Resolve Apache parent POM` keeps 3 attempts but now waits 10 s and then 20 
s between them. Since Maven itself retries 429/5xx, this loop mainly covers 
"not found" answers and dropped connections, which the resolver does not retry; 
keeping it at 3 attempts bounds the time to fail during a real outage. `-U` is 
kept so each attempt bypasses the failure Maven cached on the previous one.
   
   The version step fails the job if it cannot read the parent version from 
`pom.xml`, instead of writing an empty cache key.
   
   #### Release note
   
   None (CI only).
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to