SbloodyS commented on code in PR #18657:
URL: 
https://github.com/apache/dolphinscheduler/pull/18657#discussion_r4067897857


##########
.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.

Review Comment:
   ```suggestion
   ```



##########
.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

Review Comment:
   We don't need this since we've already cache maven wrapper.



##########
.github/workflows/unit-test.yml:
##########
@@ -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') }}

Review Comment:
   We need to add it to all workflow, not just unit-test.



-- 
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]

Reply via email to