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 d0ac112a966 HDDS-17858. Populate cache should handle npm dependencies 
(#12140)
d0ac112a966 is described below

commit d0ac112a9661ba52288d53dc79e9af665a7fb9e6
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Nov 24 17:11:38 2026 +0100

    HDDS-17858. Populate cache should handle npm dependencies (#12140)
---
 .github/workflows/check.yml             |  2 +-
 .github/workflows/ci.yml                |  1 +
 .github/workflows/populate-cache.yml    | 50 ++++++++++++++++++++++++++++++++-
 .github/workflows/repeat-acceptance.yml |  3 +-
 4 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index f0ebc6b26fc..ac415703b1f 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -184,7 +184,7 @@ jobs:
 
       - name: Cache for NPM dependencies
         if: ${{ inputs.needs-npm-cache }}
-        uses: actions/cache@v6
+        uses: actions/cache/restore@v6
         with:
           path: |
             ~/.pnpm-store
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 94ab5b58d20..644e977a566 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -296,6 +296,7 @@ jobs:
       DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
     with:
       java-version: ${{ needs.build-info.outputs.java-version }}
+      needs-npm-cache: true
       needs-ozone-repo: true
       ratis-args: ${{ inputs.ratis_args }}
       script: repro
diff --git a/.github/workflows/populate-cache.yml 
b/.github/workflows/populate-cache.yml
index be038ee1028..061caa1fd48 100644
--- a/.github/workflows/populate-cache.yml
+++ b/.github/workflows/populate-cache.yml
@@ -22,7 +22,7 @@ on:
     branches:
       - master
     paths:
-      - 'pom.xml'
+      - '**/pnpm-lock.yaml'
       - '**/pom.xml'
       - 'dev-support/ci/populate-cache.sh'
       - '.github/actions/setup-java-with-cache/action.yml'
@@ -166,3 +166,51 @@ jobs:
             !~/.m2/repository/org/apache/ozone
             ~/.m2/wrapper
           key: ${{ steps.restore-cache.outputs.cache-key }}
+  npm:
+    needs:
+      - build
+    runs-on: ubuntu-24.04
+    steps:
+      - name: Checkout project
+        uses: actions/checkout@v7
+        with:
+          persist-credentials: false
+
+      - name: Setup Java
+        id: restore-cache
+        uses: $/.github/actions/setup-java-with-cache
+        with:
+          only-exact-hit: true
+
+      - name: Calculate cache key
+        id: cache-key
+        run: |
+          echo "value=${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') 
}}" >> "$GITHUB_OUTPUT"
+
+      - name: Restore NPM dependencies
+        id: restore-pnpm
+        uses: actions/cache/restore@v6
+        with:
+          path: |
+            ~/.pnpm-store
+          key: ${{ steps.cache-key.outputs.value }}
+          lookup-only: true
+
+      - name: Fetch NPM dependencies
+        if: steps.restore-pnpm.outputs.cache-hit != 'true'
+        run: |
+          export MAVEN_ARGS="$MAVEN_ARGS --offline"
+          ./mvnw -pl :ozone-recon 
com.github.eirslett:frontend-maven-plugin:install-node-and-pnpm
+          run_pnpm() {
+            ./mvnw -pl :ozone-recon 
com.github.eirslett:frontend-maven-plugin:pnpm -Dfrontend.pnpm.arguments="$1"
+          }
+          run_pnpm "config set store-dir ~/.pnpm-store"
+          run_pnpm fetch
+
+      - name: Save NPM dependencies
+        if: steps.restore-pnpm.outputs.cache-hit != 'true'
+        uses: actions/cache/save@v6
+        with:
+          path: |
+            ~/.pnpm-store
+          key: ${{ steps.cache-key.outputs.value }}
diff --git a/.github/workflows/repeat-acceptance.yml 
b/.github/workflows/repeat-acceptance.yml
index 23454a084f4..6ce0e46f9c9 100644
--- a/.github/workflows/repeat-acceptance.yml
+++ b/.github/workflows/repeat-acceptance.yml
@@ -90,11 +90,10 @@ jobs:
           persist-credentials: false
           ref: ${{ github.event.inputs.ref }}
       - name: Cache for npm dependencies
-        uses: actions/cache@v6
+        uses: actions/cache/restore@v6
         with:
           path: |
             ~/.pnpm-store
-            **/node_modules
           key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
           restore-keys: |
             ${{ runner.os }}-pnpm-


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

Reply via email to