Skip to content

[Improvement-18656][CI] Cache Maven Wrapper to avoid Central HTTP 429 - #18657

Open
det101 wants to merge 4 commits into
apache:devfrom
det101:feature-18656-cache-maven-wrapper
Open

det101 wants to merge 4 commits into
apache:devfrom
det101:feature-18656-cache-maven-wrapper

Conversation

@det101

@det101 det101 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Was this PR generated or assisted by AI?

YES. Implementation was assisted by AI (CI log analysis, change drafting, and PR text). The approach and scope were reviewed before landing.

Purpose of the pull request

Fix CI flake where the unit-test matrix (~44 parallel jobs) all download apache-maven-3.8.4-bin.zip from Maven Central via Maven Wrapper. Central returns HTTP 429; Wrapper has no retry, so Install Dependencies fails before tests run.

This reuses the existing sanity-check job (the matrix already needs: sanity-check) to save ~/.m2/wrapper, then restores the same cache in matrix jobs. Job needs and fail-fast are unchanged.

Closes #18656

Example failure: https://github.com/apache/dolphinscheduler/actions/runs/35494682258/job/106035745127?pr=18585

Brief change log

  • Cache ~/.m2/wrapper in unit-test.yml sanity-check and matrix jobs (key from maven-wrapper.properties, not pom.xml)
  • Retry ./mvnw spotless:check in the sanity-check composite action (backoff + jitter) so a single cold-start 429 can recover

Verify this pull request

This pull request is CI workflow/action YAML without unit-test coverage.

  • YAML parses locally
  • Confirm on this PR's Test workflow: Sanity Check saves Maven Wrapper cache; matrix jobs restore the same key and do not download apache-maven-*-bin.zip from Central

Non-goals

  • Do not set fail-fast: false
  • Do not change distributionUrl
  • Do not add retry around matrix ./mvnw install / verify
  • Do not add a dedicated warmup job or change backend/e2e/api-test structure

- Save/restore ~/.m2/wrapper in unit-test sanity-check and matrix jobs
- Retry sanity-check ./mvnw spotless:check on wrapper download failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][CI] Cache Maven Wrapper dist to avoid Central HTTP 429 in unit-test matrix

1 participant