This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new d33d955c17 Revert "HDDS-10273. Intermittent build failure while 
downloading nodejs (#6664)"
d33d955c17 is described below

commit d33d955c17f2fc9674778ed565d7338f984c16c8
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue May 14 11:19:12 2024 +0200

    Revert "HDDS-10273. Intermittent build failure while downloading nodejs 
(#6664)"
    
    This reverts commit fdec8f86b3735d62ca2de53cdf21c5f4cf96c096.
---
 .github/workflows/populate-cache.yml | 26 ++++----------
 dev-support/ci/populate-cache.sh     | 70 ------------------------------------
 hadoop-ozone/recon/pom.xml           |  2 +-
 pom.xml                              |  3 --
 4 files changed, 7 insertions(+), 94 deletions(-)

diff --git a/.github/workflows/populate-cache.yml 
b/.github/workflows/populate-cache.yml
index 787410c7a1..d4c9cd8120 100644
--- a/.github/workflows/populate-cache.yml
+++ b/.github/workflows/populate-cache.yml
@@ -28,7 +28,6 @@ on:
       - '.github/workflows/populate-cache.yml'
   schedule:
     - cron: '20 3 * * *'
-  workflow_dispatch:
 
 jobs:
   build:
@@ -46,40 +45,27 @@ jobs:
             !~/.m2/repository/org/apache/ozone
           key: maven-repo-${{ hashFiles('**/pom.xml') }}
 
-      - name: Check for partial cache
-        id: verify-cache
-        run: |
-          cache_ok='true'
-          if [[ '${{ steps.restore-cache.outputs.cache-hit }}' != 'true' ]]; 
then
-            cache_ok='false'
-          elif [[ -e ~/.m2/repository/.cache/org-apache-ozone/partial-cache 
]]; then
-            cache_ok='false'
-          fi
-          echo "cache-ok=$cache_ok" >> $GITHUB_OUTPUT
-
       - name: Setup Java
-        if: steps.verify-cache.outputs.cache-ok != 'true'
+        if: steps.restore-cache.outputs.cache-hit != 'true'
         uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: 8
 
       - name: Fetch dependencies
-        if: steps.verify-cache.outputs.cache-ok != 'true'
-        run: |
-          mkdir -p ~/.m2/repository
-          dev-support/ci/populate-cache.sh
-        continue-on-error: true
+        if: steps.restore-cache.outputs.cache-hit != 'true'
+        run: mvn --batch-mode --fail-never --no-transfer-progress 
--show-version -Pgo-offline -Pdist clean verify
 
       - name: Delete Ozone jars from repo
-        if: steps.verify-cache.outputs.cache-ok != 'true'
+        if: steps.restore-cache.outputs.cache-hit != 'true'
         run: rm -fr ~/.m2/repository/org/apache/ozone
 
       - name: List repo contents
+        if: steps.restore-cache.outputs.cache-hit != 'true'
         run: find ~/.m2/repository -type f | sort | xargs ls -lh
 
       - name: Save cache for Maven dependencies
-        if: steps.verify-cache.outputs.cache-ok != 'true'
+        if: steps.restore-cache.outputs.cache-hit != 'true'
         uses: actions/cache/save@v4
         with:
           path: |
diff --git a/dev-support/ci/populate-cache.sh b/dev-support/ci/populate-cache.sh
deleted file mode 100755
index 107c1d2e13..0000000000
--- a/dev-support/ci/populate-cache.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-# This script gets a list of the changed files from git, and matches
-# that list against a set of regexes, each of which corresponds to a
-# test group.  For each set of matches, a flag is set to let github
-# actions know to run that test group.
-
-# Populates local Maven repository (similar to go-offline, but using actual 
build).
-# Downloads Node.js for multiple platforms (Linux, Mac)
-
-set -u -o pipefail
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-cd "${DIR}/../.." || exit 1
-
-: ${REPO_DIR:="${HOME}/.m2/repository"}
-: ${MARKER_FILE:="${REPO_DIR}/.cache/org-apache-ozone/partial-cache"}
-
-declare -i rc=0
-
-if [[ ! -d "${REPO_DIR}" ]]; then
-  echo "Error: repository dir ${REPO_DIR} does not exist"
-  exit 1
-fi
-
-# Download Node.js manually
-NODEJS_VERSION=$(mvn help:evaluate -Dexpression=nodejs.version -q 
-DforceStdout)
-if [[ -n "${NODEJS_VERSION}" ]]; then
-  for platform in darwin-x64 linux-x64; do
-    
output="${REPO_DIR}/com/github/eirslett/node/${NODEJS_VERSION}/node-${NODEJS_VERSION}-${platform}.tar.gz"
-    
url="https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-${platform}.tar.gz";
-    mkdir -pv "$(dirname "${output}")"
-    curl --retry 3 --location --continue-at - -o "${output}" "${url}"
-    irc=$?
-
-    if [[ ${rc} -eq 0 ]]; then
-      rc=${irc}
-    fi
-  done
-fi
-
-MAVEN_OPTIONS="--batch-mode --fail-at-end --no-transfer-progress 
--show-version -Pgo-offline -Pdist"
-if ! mvn ${MAVEN_OPTIONS} clean verify; then
-  rc=1
-fi
-
-if [[ ${rc} -eq 0 ]]; then
-  rm -fv "${MARKER_FILE}"
-else
-  # Create Marker file if build fails to indicate cache is partial, needs to 
be rebuilt next time
-  mkdir -pv "$(dirname "${MARKER_FILE}")"
-  touch "${MARKER_FILE}"
-fi
-
-exit ${rc}
diff --git a/hadoop-ozone/recon/pom.xml b/hadoop-ozone/recon/pom.xml
index 917a691c54..2895840aaf 100644
--- a/hadoop-ozone/recon/pom.xml
+++ b/hadoop-ozone/recon/pom.xml
@@ -103,7 +103,7 @@
               <goal>install-node-and-npm</goal>
             </goals>
             <configuration>
-              <nodeVersion>v${nodejs.version}</nodeVersion>
+              <nodeVersion>v16.14.2</nodeVersion>
             </configuration>
           </execution>
           <execution>
diff --git a/pom.xml b/pom.xml
index e7a976f88f..e0f97d5f6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -295,9 +295,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xs
     <spring.version>5.3.34</spring.version>
     <jooq.version>3.11.10</jooq.version>
 
-    <!-- Node.js version number (without the v prefix required by 
frontend-maven-plugin) -->
-    <nodejs.version>16.14.2</nodejs.version>
-
     <vault.driver.version>5.1.0</vault.driver.version>
     <native.lib.tmp.dir></native.lib.tmp.dir>
     <properties.maven.plugin.version>1.2.1</properties.maven.plugin.version>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to