det101 opened a new issue, #18656: URL: https://github.com/apache/dolphinscheduler/issues/18656
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description The unit-test workflow fans out to ~22 modules × Java 8/11 (~44 parallel jobs). Each job runs `./mvnw`, and Maven Wrapper 3.1.0 downloads `apache-maven-3.8.4-bin.zip` from Maven Central when `~/.m2/wrapper` is missing. The current cache only covers `~/.m2/repository` (dependency jars), not the Wrapper distribution. `sanity-check` does run `./mvnw spotless:check` before the matrix, but that job does not save `~/.m2/wrapper`, and GitHub Actions jobs do not share a filesystem. After sanity-check finishes, the 44 matrix jobs still download the zip in parallel. Maven Wrapper's `DefaultDownloader` has no retry, so a Central HTTP 429 fails `Install Dependencies` immediately — often before any tests run. Example: https://github.com/apache/dolphinscheduler/actions/runs/35494682258/job/106035745127?pr=18585 ``` java.io.IOException: Server returned HTTP response code: 429 for URL: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip at org.apache.maven.wrapper.DefaultDownloader.downloadInternal(DefaultDownloader.java:90) ``` This is CI infrastructure flake, not a product-code failure. ### Proposed change Reuse the existing `sanity-check` job as the single download (the matrix already `needs: sanity-check`). Do **not** add a new warmup job. 1. `.github/workflows/unit-test.yml` — `sanity-check` job: cache `~/.m2/wrapper` with a stable key based on `maven-wrapper.properties` (not `pom.xml`). 2. `.github/workflows/unit-test.yml` — `unit-test` matrix: restore the same wrapper cache next to the existing `~/.m2/repository` cache. Keep `fail-fast` unchanged. 3. `.github/actions/sanity-check/action.yml`: retry `./mvnw spotless:check` with backoff + jitter so the single cold-start download can survive 429. After this, a cache miss downloads the Maven dist once in sanity-check; the matrix restores it and should not hit Central for the zip. ### Non-goals - Do not set `fail-fast: false` on the unit-test matrix. - Do not change `distributionUrl` in `.mvn/wrapper/maven-wrapper.properties`. - Do not add retry around matrix `./mvnw install` / `verify`. - Do not add a dedicated warmup job, extract a shared setup-maven action, or change backend/e2e/api-test job structure. - Do not reduce the Java 11 matrix in this issue. ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) --- 中文补充:unit-test 矩阵约 44 路并行 `./mvnw`,只缓存了 `~/.m2/repository`,没有缓存 Maven Wrapper 发行包。`sanity-check` 虽然先跑了 `./mvnw`,但 job 之间不共享磁盘、也没有 save `~/.m2/wrapper`,所以矩阵仍会同时向 Maven Central 拉 `apache-maven-3.8.4-bin.zip`,遇到 HTTP 429 会在 Install Dependencies 直接失败。拟复用现有 `sanity-check` 作为唯一下载点:给 wrapper 加 cache、sanity-check 的 `./mvnw` 加重试;不改 fail-fast、不改 distributionUrl、不新建 warmup job。 -- 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]
