From 72cd4749f1dfad509abbf37740afefac7bb5204e Mon Sep 17 00:00:00 2001 From: det101 <3656843+det101@users.noreply.github.com> Date: Mon, 21 Sep 2026 09:28:30 +0800 Subject: [PATCH 1/5] [Improvement-18656][CI] Cache Maven Wrapper to avoid Central HTTP 429 - Save/restore ~/.m2/wrapper in unit-test sanity-check and matrix jobs - Retry sanity-check ./mvnw spotless:check on wrapper download failures --- .github/actions/sanity-check/action.yml | 17 +++++++++++++++-- .github/workflows/unit-test.yml | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/actions/sanity-check/action.yml b/.github/actions/sanity-check/action.yml index f7b1287f13aa..c210efcbcc7d 100644 --- a/.github/actions/sanity-check/action.yml +++ b/.github/actions/sanity-check/action.yml @@ -34,5 +34,18 @@ runs: - name: Check License Header uses: apache/skywalking-eyes/header@main - - shell: bash - run: ./mvnw spotless:check + # Retry Wrapper download on Maven Central HTTP 429. `if cmd` is used so + # `set -e` does not abort the loop on a failed attempt. + - name: Spotless Check + shell: bash + run: | + for i in 1 2 3 4 5; do + if ./mvnw spotless:check; then + break + fi + if [ "$i" -eq 5 ]; then + echo "::error::mvnw spotless:check failed after ${i} attempts" + exit 1 + fi + sleep $(( i * 15 + RANDOM % 20 )) + done diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 2117250026a0..12d5c9a0f545 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -51,6 +51,15 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + # Cache the Maven Wrapper distribution (~/.m2/wrapper) so the unit-test + # matrix can restore it instead of downloading apache-maven-*-bin.zip + # from Maven Central in parallel (HTTP 429). Key is independent of + # pom.xml so dependency changes do not invalidate the dist cache. + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Sanity Check uses: ./.github/actions/sanity-check with: @@ -115,6 +124,11 @@ jobs: java-version: ${{ matrix.java }} distribution: 'adopt' + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - uses: actions/cache@v5 with: path: ~/.m2/repository From 5573aa06c4004e3e53cdf8135b12ef51fc9e4faa Mon Sep 17 00:00:00 2001 From: det101 <3656843+det101@users.noreply.github.com> Date: Mon, 21 Sep 2026 14:17:52 +0800 Subject: [PATCH 2/5] [Improvement-18656][CI] Retrigger CI From fc4ae98e60affb359426b84a625ab89661c19700 Mon Sep 17 00:00:00 2001 From: det101 <3656843+det101@users.noreply.github.com> Date: Mon, 21 Sep 2026 14:34:37 +0800 Subject: [PATCH 3/5] [Improvement-18656][CI] Retrigger CI From 11021aba1f2f93ee2c483dd6b0f3133d70e2f219 Mon Sep 17 00:00:00 2001 From: det101 <3656843+det101@users.noreply.github.com> Date: Mon, 21 Sep 2026 15:53:56 +0800 Subject: [PATCH 4/5] [Improvement-18656][CI] Retrigger CI From 2ba461a8554d5eba3fda90ceeef43c6affd8ca7f Mon Sep 17 00:00:00 2001 From: det101 <3656843+det101@users.noreply.github.com> Date: Tue, 22 Sep 2026 11:43:15 +0800 Subject: [PATCH 5/5] [Improvement-18656][CI] Cache Maven Wrapper across workflows that use mvnw --- .github/actions/sanity-check/action.yml | 17 ++--------------- .github/workflows/api-test.yml | 10 ++++++++++ .github/workflows/backend.yml | 5 +++++ .github/workflows/codeql.yaml | 6 ++++++ .github/workflows/docs.yml | 10 ++++++++++ .github/workflows/e2e-k8s.yml | 5 +++++ .github/workflows/e2e.yml | 10 ++++++++++ .github/workflows/frontend.yml | 6 ++++++ .github/workflows/unit-test.yml | 4 ---- 9 files changed, 54 insertions(+), 19 deletions(-) diff --git a/.github/actions/sanity-check/action.yml b/.github/actions/sanity-check/action.yml index c210efcbcc7d..f7b1287f13aa 100644 --- a/.github/actions/sanity-check/action.yml +++ b/.github/actions/sanity-check/action.yml @@ -34,18 +34,5 @@ runs: - name: Check License Header uses: apache/skywalking-eyes/header@main - # Retry Wrapper download on Maven Central HTTP 429. `if cmd` is used so - # `set -e` does not abort the loop on a failed attempt. - - name: Spotless Check - shell: bash - run: | - for i in 1 2 3 4 5; do - if ./mvnw spotless:check; then - break - fi - if [ "$i" -eq 5 ]; then - echo "::error::mvnw spotless:check failed after ${i} attempts" - exit 1 - fi - sleep $(( i * 15 + RANDOM % 20 )) - done + - shell: bash + run: ./mvnw spotless:check diff --git a/.github/workflows/api-test.yml b/.github/workflows/api-test.yml index 2de39855233f..8ab3de9ec31a 100644 --- a/.github/workflows/api-test.yml +++ b/.github/workflows/api-test.yml @@ -64,6 +64,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Sanity Check uses: ./.github/actions/sanity-check with: @@ -130,6 +135,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Set up JDK 11 uses: actions/setup-java@v5 with: diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 969e3165e0e7..8a8002665a0f 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -62,6 +62,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v5 with: diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 8125a0108c78..2b5ad0a472e3 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -43,6 +43,12 @@ jobs: with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} + - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 028ec735dae1..e80da644ef42 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,6 +32,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Style Check run: ./mvnw spotless:check img-check: @@ -90,6 +95,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Generating helm-doc run: | ./mvnw validate -P helm-doc -pl :dolphinscheduler diff --git a/.github/workflows/e2e-k8s.yml b/.github/workflows/e2e-k8s.yml index d8ce37399f9f..6a7c0bb9cb83 100644 --- a/.github/workflows/e2e-k8s.yml +++ b/.github/workflows/e2e-k8s.yml @@ -64,6 +64,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - run: df -h - name: Build Image run: | diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9ce4eb9f3c4b..7f9feef50f34 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -59,6 +59,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Sanity Check uses: ./.github/actions/sanity-check with: @@ -150,6 +155,11 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: Set up JDK 11 uses: actions/setup-java@v5 with: diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index e7e75a920933..24f9b902b0be 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -65,6 +65,12 @@ jobs: - uses: actions/checkout@v6 with: submodules: true + - if: matrix.os == 'ubuntu-latest' + name: Cache Maven Wrapper + uses: actions/cache@v5 + with: + path: ~/.m2/wrapper + key: ${{ runner.os }}-mvnw-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - if: matrix.os == 'ubuntu-latest' name: Sanity Check uses: ./.github/actions/sanity-check diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 12d5c9a0f545..65f14b0bc144 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -51,10 +51,6 @@ jobs: - uses: actions/checkout@v6 with: submodules: true - # Cache the Maven Wrapper distribution (~/.m2/wrapper) so the unit-test - # matrix can restore it instead of downloading apache-maven-*-bin.zip - # from Maven Central in parallel (HTTP 429). Key is independent of - # pom.xml so dependency changes do not invalidate the dist cache. - name: Cache Maven Wrapper uses: actions/cache@v5 with: