felipepessoto commented on code in PR #13662:
URL: https://github.com/apache/gluten/pull/13662#discussion_r4621759227


##########
.github/actions/cache-maven/action.yml:
##########
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Cache Maven distribution
+description: Cache the build/mvn distribution without caching Maven 
dependencies.
+runs:
+  using: composite
+  steps:
+    - name: Read pinned Maven version
+      id: maven
+      shell: bash
+      run: |
+        version=$(awk -F '[<>]' '/<maven[.]version>/ { print $3; exit }' 
pom.xml)
+        if [ -z "$version" ]; then
+          echo "::error::Could not read maven.version from pom.xml"
+          exit 1
+        fi
+        echo "version=$version" >> "$GITHUB_OUTPUT"
+    - name: Cache Maven distribution
+      uses: actions/cache@v4
+      with:
+        path: build/.mvn

Review Comment:
   Thanks @LuciferYang, agreed, fixing the download source first makes sense. 
The failure was in [[this CentOS 8/Spark 3.5/Java 8 
job](https://github.com/felipepessoto/gluten/actions/runs/44166328281/job/134336305147)](https://github.com/felipepessoto/gluten/actions/runs/44166328281/job/134336305147).
 Copying the relevant output here so it doesn’t depend on log retention:
   
   ```text
   curl: (22) The requested URL returned error: 429
   ERROR: Failed to download Maven from 
https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.tar.gz
   ```
   
   I’ve opened #13669 to use Apache’s CDN with archive fallback and SHA-512 
verification. Would you prefer the GCS mirror as the primary source there?
   
   The motivation for this cache was reliability, reducing repeated downloads 
and exposure to 429s, not faster CI. Your cold-cache point is valid: it doesn’t 
protect every bootstrap, whereas changing the source covers cold runs, other 
workflows, and local builds.
   
   I’ll hold this cache PR while we validate the source change, then reassess 
whether caching adds enough benefit. If we keep it, I’ll address the cold-start 
coverage and test regex.



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