From e90205248bd777d9f54c9c7aff8e3f1d8a15f17c Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Fri, 10 Nov 2023 16:01:58 +0800 Subject: [PATCH 01/50] add cache for testing Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 270 +++++++++++++------------ 1 file changed, 139 insertions(+), 131 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index cecbe488961..ec5b4eea21e 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -117,6 +117,14 @@ jobs: env | grep JAVA java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: package tests check run: | # https://github.com/NVIDIA/spark-rapids/issues/8847 @@ -141,147 +149,147 @@ jobs: } done - package-tests-scala213: - needs: get-shim-versions-from-dist - continue-on-error: ${{ matrix.isSnapshot }} - strategy: - matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.scala213Versions) }} - fail-fast: false - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + # package-tests-scala213: + # needs: get-shim-versions-from-dist + # continue-on-error: ${{ matrix.isSnapshot }} + # strategy: + # matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.scala213Versions) }} + # fail-fast: false + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Setup Java and Maven Env - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: 8 + # - name: Setup Java and Maven Env + # uses: actions/setup-java@v3 + # with: + # distribution: adopt + # java-version: 8 - - name: check runtime before tests - run: | - env | grep JAVA - java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # - name: check runtime before tests + # run: | + # env | grep JAVA + # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: package tests check - run: | - # https://github.com/NVIDIA/spark-rapids/issues/8847 - # specify expected versions - export JAVA_HOME=${JAVA_HOME_8_X64} - export PATH=${JAVA_HOME}/bin:${PATH} - java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - # verify Scala 2.13 build files - ./build/make-scala-version-build-files.sh 2.13 - # verify git status - if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then - git add -N scala2.13/* && git diff 'scala2.13/*' - echo "Generated Scala 2.13 build files don't match what's in repository" - exit 1 - fi - # change to Scala 2.13 Directory - cd scala2.13 - # test command, will retry for 3 times if failed. - max_retry=3; delay=30; i=1 - while true; do - mvn -Dmaven.wagon.http.retryHandler.count=3 \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - -Daether.connector.http.connectionMaxTtl=30 -B package \ - -pl integration_tests,tests -am -P 'individual,pre-merge' \ - -Dbuildver=${{ matrix.spark-version }} -Dmaven.scalastyle.skip=true \ - -Drat.skip=true ${{ env.COMMON_MVN_FLAGS }} && break || { - if [[ $i -le $max_retry ]]; then - echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) - else - echo "mvn command failed. Exit 1"; exit 1 - fi - } - done + # - name: package tests check + # run: | + # # https://github.com/NVIDIA/spark-rapids/issues/8847 + # # specify expected versions + # export JAVA_HOME=${JAVA_HOME_8_X64} + # export PATH=${JAVA_HOME}/bin:${PATH} + # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # # verify Scala 2.13 build files + # ./build/make-scala-version-build-files.sh 2.13 + # # verify git status + # if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then + # git add -N scala2.13/* && git diff 'scala2.13/*' + # echo "Generated Scala 2.13 build files don't match what's in repository" + # exit 1 + # fi + # # change to Scala 2.13 Directory + # cd scala2.13 + # # test command, will retry for 3 times if failed. + # max_retry=3; delay=30; i=1 + # while true; do + # mvn -Dmaven.wagon.http.retryHandler.count=3 \ + # -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + # -Daether.connector.http.connectionMaxTtl=30 -B package \ + # -pl integration_tests,tests -am -P 'individual,pre-merge' \ + # -Dbuildver=${{ matrix.spark-version }} -Dmaven.scalastyle.skip=true \ + # -Drat.skip=true ${{ env.COMMON_MVN_FLAGS }} && break || { + # if [[ $i -le $max_retry ]]; then + # echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + # else + # echo "mvn command failed. Exit 1"; exit 1 + # fi + # } + # done - verify-all-modules: - needs: get-shim-versions-from-dist - runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.sparkJDKVersions) }} - steps: - - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + # verify-all-modules: + # needs: get-shim-versions-from-dist + # runs-on: ubuntu-latest + # strategy: + # matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.sparkJDKVersions) }} + # steps: + # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Setup Java and Maven Env - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: ${{ matrix.java-version }} + # - name: Setup Java and Maven Env + # uses: actions/setup-java@v3 + # with: + # distribution: adopt + # java-version: ${{ matrix.java-version }} - - name: check runtime before tests - run: | - env | grep JAVA - java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # - name: check runtime before tests + # run: | + # env | grep JAVA + # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: Build JDK - run: | - # https://github.com/NVIDIA/spark-rapids/issues/8847 - # specify expected versions - export JAVA_HOME=${JAVA_HOME_${{ matrix.java-version }}_X64} - export PATH=${JAVA_HOME}/bin:${PATH} - java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - # test command, will retry for 3 times if failed. - max_retry=3; delay=30; i=1 - while true; do - mvn -Dmaven.wagon.http.retryHandler.count=$max_retry \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - -Daether.connector.http.connectionMaxTtl=30 -B verify \ - -P "individual,pre-merge" -Dbuildver=${{ matrix.spark-version }} \ - ${{ env.COMMON_MVN_FLAGS }} && break || { - if [[ $i -le $max_retry ]]; then - echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) - else - echo "mvn command failed. Exit 1"; exit 1 - fi - } - done + # - name: Build JDK + # run: | + # # https://github.com/NVIDIA/spark-rapids/issues/8847 + # # specify expected versions + # export JAVA_HOME=${JAVA_HOME_${{ matrix.java-version }}_X64} + # export PATH=${JAVA_HOME}/bin:${PATH} + # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # # test command, will retry for 3 times if failed. + # max_retry=3; delay=30; i=1 + # while true; do + # mvn -Dmaven.wagon.http.retryHandler.count=$max_retry \ + # -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + # -Daether.connector.http.connectionMaxTtl=30 -B verify \ + # -P "individual,pre-merge" -Dbuildver=${{ matrix.spark-version }} \ + # ${{ env.COMMON_MVN_FLAGS }} && break || { + # if [[ $i -le $max_retry ]]; then + # echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + # else + # echo "mvn command failed. Exit 1"; exit 1 + # fi + # } + # done - install-modules: - needs: get-shim-versions-from-dist - runs-on: ubuntu-latest - strategy: - matrix: - maven-version: [3.6.3, 3.8.8, 3.9.3] - steps: - - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + # install-modules: + # needs: get-shim-versions-from-dist + # runs-on: ubuntu-latest + # strategy: + # matrix: + # maven-version: [3.6.3, 3.8.8, 3.9.3] + # steps: + # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Setup Java - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: 11 + # - name: Setup Java + # uses: actions/setup-java@v3 + # with: + # distribution: adopt + # java-version: 11 - - name: Setup Maven Wrapper - run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} + # - name: Setup Maven Wrapper + # run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} - - name: check runtime before tests - run: | - env | grep JAVA - java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # - name: check runtime before tests + # run: | + # env | grep JAVA + # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: Install with Maven ${{ matrix.maven-version }} - run: | - # https://github.com/NVIDIA/spark-rapids/issues/8847 - # specify expected versions - export JAVA_HOME=${JAVA_HOME_11_X64} - export PATH=${JAVA_HOME}/bin:${PATH} - java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - # test command, will retry for 3 times if failed. - max_retry=3; delay=30; i=1 - while true; do - ./mvnw -Dmaven.wagon.http.retryHandler.count=3 \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - -Daether.connector.http.connectionMaxTtl=30 -B install \ - -P "individual,pre-merge" \ - -Dbuildver=${{ needs.get-shim-versions-from-dist.outputs.defaultSparkVersion }} \ - ${{ env.COMMON_MVN_FLAGS }} && break || { - if [[ $i -le $max_retry ]]; then - echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) - else - echo "mvn command failed. Exit 1"; exit 1 - fi - } - done + # - name: Install with Maven ${{ matrix.maven-version }} + # run: | + # # https://github.com/NVIDIA/spark-rapids/issues/8847 + # # specify expected versions + # export JAVA_HOME=${JAVA_HOME_11_X64} + # export PATH=${JAVA_HOME}/bin:${PATH} + # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # # test command, will retry for 3 times if failed. + # max_retry=3; delay=30; i=1 + # while true; do + # ./mvnw -Dmaven.wagon.http.retryHandler.count=3 \ + # -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + # -Daether.connector.http.connectionMaxTtl=30 -B install \ + # -P "individual,pre-merge" \ + # -Dbuildver=${{ needs.get-shim-versions-from-dist.outputs.defaultSparkVersion }} \ + # ${{ env.COMMON_MVN_FLAGS }} && break || { + # if [[ $i -le $max_retry ]]; then + # echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + # else + # echo "mvn command failed. Exit 1"; exit 1 + # fi + # } + # done From 75229e8d95a98bd6355d65266b5e0107ff30db50 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Fri, 10 Nov 2023 16:34:34 +0800 Subject: [PATCH 02/50] change cache key file Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index ec5b4eea21e..4ebd8de8066 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -121,7 +121,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} restore-keys: | ${{ runner.os }}-maven- From d0f62a83daefcc771620da27ca08abe169559f9a Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Fri, 10 Nov 2023 16:54:10 +0800 Subject: [PATCH 03/50] add cache for all stages Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 312 +++++++++++++------------ 1 file changed, 168 insertions(+), 144 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 4ebd8de8066..f844b6d5848 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -149,147 +149,171 @@ jobs: } done - # package-tests-scala213: - # needs: get-shim-versions-from-dist - # continue-on-error: ${{ matrix.isSnapshot }} - # strategy: - # matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.scala213Versions) }} - # fail-fast: false - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - # - name: Setup Java and Maven Env - # uses: actions/setup-java@v3 - # with: - # distribution: adopt - # java-version: 8 - - # - name: check runtime before tests - # run: | - # env | grep JAVA - # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - # - name: package tests check - # run: | - # # https://github.com/NVIDIA/spark-rapids/issues/8847 - # # specify expected versions - # export JAVA_HOME=${JAVA_HOME_8_X64} - # export PATH=${JAVA_HOME}/bin:${PATH} - # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - # # verify Scala 2.13 build files - # ./build/make-scala-version-build-files.sh 2.13 - # # verify git status - # if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then - # git add -N scala2.13/* && git diff 'scala2.13/*' - # echo "Generated Scala 2.13 build files don't match what's in repository" - # exit 1 - # fi - # # change to Scala 2.13 Directory - # cd scala2.13 - # # test command, will retry for 3 times if failed. - # max_retry=3; delay=30; i=1 - # while true; do - # mvn -Dmaven.wagon.http.retryHandler.count=3 \ - # -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - # -Daether.connector.http.connectionMaxTtl=30 -B package \ - # -pl integration_tests,tests -am -P 'individual,pre-merge' \ - # -Dbuildver=${{ matrix.spark-version }} -Dmaven.scalastyle.skip=true \ - # -Drat.skip=true ${{ env.COMMON_MVN_FLAGS }} && break || { - # if [[ $i -le $max_retry ]]; then - # echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) - # else - # echo "mvn command failed. Exit 1"; exit 1 - # fi - # } - # done - - - # verify-all-modules: - # needs: get-shim-versions-from-dist - # runs-on: ubuntu-latest - # strategy: - # matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.sparkJDKVersions) }} - # steps: - # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - # - name: Setup Java and Maven Env - # uses: actions/setup-java@v3 - # with: - # distribution: adopt - # java-version: ${{ matrix.java-version }} - - # - name: check runtime before tests - # run: | - # env | grep JAVA - # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - # - name: Build JDK - # run: | - # # https://github.com/NVIDIA/spark-rapids/issues/8847 - # # specify expected versions - # export JAVA_HOME=${JAVA_HOME_${{ matrix.java-version }}_X64} - # export PATH=${JAVA_HOME}/bin:${PATH} - # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - # # test command, will retry for 3 times if failed. - # max_retry=3; delay=30; i=1 - # while true; do - # mvn -Dmaven.wagon.http.retryHandler.count=$max_retry \ - # -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - # -Daether.connector.http.connectionMaxTtl=30 -B verify \ - # -P "individual,pre-merge" -Dbuildver=${{ matrix.spark-version }} \ - # ${{ env.COMMON_MVN_FLAGS }} && break || { - # if [[ $i -le $max_retry ]]; then - # echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) - # else - # echo "mvn command failed. Exit 1"; exit 1 - # fi - # } - # done - - # install-modules: - # needs: get-shim-versions-from-dist - # runs-on: ubuntu-latest - # strategy: - # matrix: - # maven-version: [3.6.3, 3.8.8, 3.9.3] - # steps: - # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - # - name: Setup Java - # uses: actions/setup-java@v3 - # with: - # distribution: adopt - # java-version: 11 - - # - name: Setup Maven Wrapper - # run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} - - # - name: check runtime before tests - # run: | - # env | grep JAVA - # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - # - name: Install with Maven ${{ matrix.maven-version }} - # run: | - # # https://github.com/NVIDIA/spark-rapids/issues/8847 - # # specify expected versions - # export JAVA_HOME=${JAVA_HOME_11_X64} - # export PATH=${JAVA_HOME}/bin:${PATH} - # java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - # # test command, will retry for 3 times if failed. - # max_retry=3; delay=30; i=1 - # while true; do - # ./mvnw -Dmaven.wagon.http.retryHandler.count=3 \ - # -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - # -Daether.connector.http.connectionMaxTtl=30 -B install \ - # -P "individual,pre-merge" \ - # -Dbuildver=${{ needs.get-shim-versions-from-dist.outputs.defaultSparkVersion }} \ - # ${{ env.COMMON_MVN_FLAGS }} && break || { - # if [[ $i -le $max_retry ]]; then - # echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) - # else - # echo "mvn command failed. Exit 1"; exit 1 - # fi - # } - # done + package-tests-scala213: + needs: get-shim-versions-from-dist + continue-on-error: ${{ matrix.isSnapshot }} + strategy: + matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.scala213Versions) }} + fail-fast: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + + - name: Setup Java and Maven Env + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 8 + + - name: check runtime before tests + run: | + env | grep JAVA + java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: package tests check + run: | + # https://github.com/NVIDIA/spark-rapids/issues/8847 + # specify expected versions + export JAVA_HOME=${JAVA_HOME_8_X64} + export PATH=${JAVA_HOME}/bin:${PATH} + java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # verify Scala 2.13 build files + ./build/make-scala-version-build-files.sh 2.13 + # verify git status + if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then + git add -N scala2.13/* && git diff 'scala2.13/*' + echo "Generated Scala 2.13 build files don't match what's in repository" + exit 1 + fi + # change to Scala 2.13 Directory + cd scala2.13 + # test command, will retry for 3 times if failed. + max_retry=3; delay=30; i=1 + while true; do + mvn -Dmaven.wagon.http.retryHandler.count=3 \ + -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + -Daether.connector.http.connectionMaxTtl=30 -B package \ + -pl integration_tests,tests -am -P 'individual,pre-merge' \ + -Dbuildver=${{ matrix.spark-version }} -Dmaven.scalastyle.skip=true \ + -Drat.skip=true ${{ env.COMMON_MVN_FLAGS }} && break || { + if [[ $i -le $max_retry ]]; then + echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + else + echo "mvn command failed. Exit 1"; exit 1 + fi + } + done + + + verify-all-modules: + needs: get-shim-versions-from-dist + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.sparkJDKVersions) }} + steps: + - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + + - name: Setup Java and Maven Env + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: ${{ matrix.java-version }} + + - name: check runtime before tests + run: | + env | grep JAVA + java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Build JDK + run: | + # https://github.com/NVIDIA/spark-rapids/issues/8847 + # specify expected versions + export JAVA_HOME=${JAVA_HOME_${{ matrix.java-version }}_X64} + export PATH=${JAVA_HOME}/bin:${PATH} + java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # test command, will retry for 3 times if failed. + max_retry=3; delay=30; i=1 + while true; do + mvn -Dmaven.wagon.http.retryHandler.count=$max_retry \ + -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + -Daether.connector.http.connectionMaxTtl=30 -B verify \ + -P "individual,pre-merge" -Dbuildver=${{ matrix.spark-version }} \ + ${{ env.COMMON_MVN_FLAGS }} && break || { + if [[ $i -le $max_retry ]]; then + echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + else + echo "mvn command failed. Exit 1"; exit 1 + fi + } + done + + install-modules: + needs: get-shim-versions-from-dist + runs-on: ubuntu-latest + strategy: + matrix: + maven-version: [3.6.3, 3.8.8, 3.9.3] + steps: + - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 11 + + - name: Setup Maven Wrapper + run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} + + - name: check runtime before tests + run: | + env | grep JAVA + java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Install with Maven ${{ matrix.maven-version }} + run: | + # https://github.com/NVIDIA/spark-rapids/issues/8847 + # specify expected versions + export JAVA_HOME=${JAVA_HOME_11_X64} + export PATH=${JAVA_HOME}/bin:${PATH} + java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" + # test command, will retry for 3 times if failed. + max_retry=3; delay=30; i=1 + while true; do + ./mvnw -Dmaven.wagon.http.retryHandler.count=3 \ + -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + -Daether.connector.http.connectionMaxTtl=30 -B install \ + -P "individual,pre-merge" \ + -Dbuildver=${{ needs.get-shim-versions-from-dist.outputs.defaultSparkVersion }} \ + ${{ env.COMMON_MVN_FLAGS }} && break || { + if [[ $i -le $max_retry ]]; then + echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + else + echo "mvn command failed. Exit 1"; exit 1 + fi + } + done From 086dbf067842db073443c5b83fc62f78b92bb89e Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Fri, 10 Nov 2023 17:47:46 +0800 Subject: [PATCH 04/50] change key path Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index f844b6d5848..7a1f55ba687 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -121,7 +121,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- @@ -174,7 +174,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- @@ -236,7 +236,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- @@ -290,7 +290,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} + key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- From af5ed08766b76d4664f22f23e6fd8cfabbcf5229 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Mon, 13 Nov 2023 23:40:45 +0800 Subject: [PATCH 05/50] add mvn help to test Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 7a1f55ba687..de3da7a728a 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -133,6 +133,9 @@ jobs: export PATH=${JAVA_HOME}/bin:${PATH} java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" # test command, will retry for 3 times if failed. + + mvn help:effective-settings + max_retry=3; delay=30; i=1 while true; do mvn -Dmaven.wagon.http.retryHandler.count=3 \ From bd2df166adb1de74e3076102a8f7a707fdf881fd Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Tue, 21 Nov 2023 11:31:52 +0800 Subject: [PATCH 06/50] add isolated cache job Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 43 +++++++------------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index de3da7a728a..edbd2b10400 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -30,6 +30,17 @@ env: -Dmaven.scaladoc.skip jobs: + cache-dependencies: + runs-on: ubuntu-latest + steps: + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + get-shim-versions-from-dist: runs-on: ubuntu-latest outputs: @@ -117,14 +128,6 @@ jobs: env | grep JAVA java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: package tests check run: | # https://github.com/NVIDIA/spark-rapids/issues/8847 @@ -173,14 +176,6 @@ jobs: env | grep JAVA java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: package tests check run: | # https://github.com/NVIDIA/spark-rapids/issues/8847 @@ -235,14 +230,6 @@ jobs: env | grep JAVA java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Build JDK run: | # https://github.com/NVIDIA/spark-rapids/issues/8847 @@ -289,14 +276,6 @@ jobs: env | grep JAVA java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Install with Maven ${{ matrix.maven-version }} run: | # https://github.com/NVIDIA/spark-rapids/issues/8847 From dc57563ceb53f8585a8d2051be38152d87376f02 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Tue, 21 Nov 2023 11:37:12 +0800 Subject: [PATCH 07/50] add checkout Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index edbd2b10400..3197e116aae 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -33,6 +33,8 @@ jobs: cache-dependencies: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + - name: Cache local Maven repository uses: actions/cache@v3 with: From aa887b18f8b43a9ff0606a507fe17a3a48c4cf80 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 22 Nov 2023 10:55:36 +0800 Subject: [PATCH 08/50] add java setup Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 27 +++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 3197e116aae..32e199b931a 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -32,16 +32,29 @@ env: jobs: cache-dependencies: runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8', '11', '17' ] + # steps: + # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + + # - name: Cache local Maven repository + # uses: actions/cache@v3 + # with: + # path: ~/.m2/repository + # key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} + # restore-keys: | + # ${{ runner.os }}-maven- steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - - name: Cache local Maven repository - uses: actions/cache@v3 + - uses: actions/setup-java@v3 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + distribution: 'oracle' + java-version: ${{ matrix.java }} + cache: 'maven' + - run: | + set -x + mvn initialize -am get-shim-versions-from-dist: runs-on: ubuntu-latest From 3d1c41e97fc1cd5ddccc70613215014f4c45ef85 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 22 Nov 2023 20:55:21 +0800 Subject: [PATCH 09/50] remove distribution Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 32e199b931a..f48e5e6e179 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -49,7 +49,6 @@ jobs: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - uses: actions/setup-java@v3 with: - distribution: 'oracle' java-version: ${{ matrix.java }} cache: 'maven' - run: | From 7612e46adde50a9bb9f1e75e88e2ed3f466cfd6f Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 22 Nov 2023 21:05:30 +0800 Subject: [PATCH 10/50] add distribution Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index f48e5e6e179..9afbc958843 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -49,6 +49,7 @@ jobs: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: ${{ matrix.java }} cache: 'maven' - run: | From ce8f3e9f8fb0a917a318d6831f58414455aa4913 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 22 Nov 2023 21:56:38 +0800 Subject: [PATCH 11/50] add retry for cache Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 9afbc958843..42a8c9d0b07 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -54,7 +54,18 @@ jobs: cache: 'maven' - run: | set -x - mvn initialize -am + max_retry=3; delay=30; i=1 + while true; do + mvn -Dmaven.wagon.http.retryHandler.count=3 \ + -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + -Daether.connector.http.connectionMaxTtl=30 initialize -am && break || { + if [[ $i -le $max_retry ]]; then + echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) + else + echo "mvn command failed. Exit 1"; exit 1 + fi + } + done get-shim-versions-from-dist: runs-on: ubuntu-latest From 96353f9b44638b2be01f319d8e888c4c8c315854 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 23 Nov 2023 10:59:08 +0800 Subject: [PATCH 12/50] add project param Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 42a8c9d0b07..9423f955753 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -58,7 +58,7 @@ jobs: while true; do mvn -Dmaven.wagon.http.retryHandler.count=3 \ -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - -Daether.connector.http.connectionMaxTtl=30 initialize -am && break || { + -Daether.connector.http.connectionMaxTtl=30 initialize -pl sql-plugin-api -am && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) else From 7e2c75eafca48986bf9874bd1ae97b107b2e93c8 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 23 Nov 2023 11:19:47 +0800 Subject: [PATCH 13/50] make sure cache finished before shim version matrix Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 9423f955753..ad06c211a82 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -68,6 +68,7 @@ jobs: done get-shim-versions-from-dist: + needs: cache-dependencies runs-on: ubuntu-latest outputs: defaultSparkVersion: ${{ steps.allShimVersionsStep.outputs.defaultSparkVersion }} From 0af4d8899030c3076dd9688fadc1e11d88ea12df Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Fri, 24 Nov 2023 16:38:29 +0800 Subject: [PATCH 14/50] add cache Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index ad06c211a82..ad8996d22b7 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8', '11', '17' ] + java: [ '8'] # steps: # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge @@ -66,6 +66,12 @@ jobs: fi } done + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} get-shim-versions-from-dist: needs: cache-dependencies @@ -144,6 +150,12 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + - name: Setup Java and Maven Env uses: actions/setup-java@v3 with: From c44ee1b7dda662b821ca2bf598c9eef8a9d5d36e Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Fri, 24 Nov 2023 22:10:50 +0800 Subject: [PATCH 15/50] add cache Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index ad8996d22b7..8053cddb4f8 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -204,11 +204,11 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Setup Java and Maven Env - uses: actions/setup-java@v3 + - name: Cache local Maven repository + uses: actions/cache@v3 with: - distribution: adopt - java-version: 8 + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} - name: check runtime before tests run: | @@ -258,11 +258,11 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Setup Java and Maven Env - uses: actions/setup-java@v3 + - name: Cache local Maven repository + uses: actions/cache@v3 with: - distribution: adopt - java-version: ${{ matrix.java-version }} + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} - name: check runtime before tests run: | @@ -301,11 +301,11 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Setup Java - uses: actions/setup-java@v3 + - name: Cache local Maven repository + uses: actions/cache@v3 with: - distribution: adopt - java-version: 11 + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From b357d6ed593dcf4cb79ee7bb4df2aab596fefa1f Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Sat, 25 Nov 2023 00:14:16 +0800 Subject: [PATCH 16/50] add cache Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 8053cddb4f8..e732ae42ea1 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -150,18 +150,18 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} - - name: Setup Java and Maven Env uses: actions/setup-java@v3 with: distribution: adopt java-version: 8 + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + - name: check runtime before tests run: | env | grep JAVA @@ -204,6 +204,12 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + - name: Setup Java and Maven Env + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 8 + - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -258,6 +264,12 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + - name: Setup Java and Maven Env + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: ${{ matrix.java-version }} + - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -301,6 +313,12 @@ jobs: steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 11 + - name: Cache local Maven repository uses: actions/cache@v3 with: From 47c6eaa00a2cb5591b24788b01da564e9f6b6781 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Mon, 27 Nov 2023 13:32:57 +0800 Subject: [PATCH 17/50] add check Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index e732ae42ea1..2f8d23d2c96 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -72,6 +72,11 @@ jobs: with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + + - name: check deps + run: | + set -x + ls -la ~/.m2/repository get-shim-versions-from-dist: needs: cache-dependencies @@ -162,6 +167,11 @@ jobs: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + - name: check deps + run: | + set -x + ls -la ~/.m2/repository + - name: check runtime before tests run: | env | grep JAVA From c4ee2d218143f19fd4a87d354e1ad803348d6809 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Mon, 27 Nov 2023 14:03:04 +0800 Subject: [PATCH 18/50] remove test step Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 2f8d23d2c96..c4a6be26fa4 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -185,9 +185,6 @@ jobs: export PATH=${JAVA_HOME}/bin:${PATH} java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" # test command, will retry for 3 times if failed. - - mvn help:effective-settings - max_retry=3; delay=30; i=1 while true; do mvn -Dmaven.wagon.http.retryHandler.count=3 \ From 7a12ba95222c4740b3421e36b472e5993186f3f5 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Mon, 27 Nov 2023 14:41:32 +0800 Subject: [PATCH 19/50] add ls before cache Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index c4a6be26fa4..e9dfb209922 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -52,6 +52,12 @@ jobs: distribution: 'temurin' java-version: ${{ matrix.java }} cache: 'maven' + + - name: check m2 before cache + run: | + set -x + ls -la ~/.m2/repository + - run: | set -x max_retry=3; delay=30; i=1 @@ -160,6 +166,11 @@ jobs: with: distribution: adopt java-version: 8 + + - name: check m2 before cache + run: | + set -x + ls -la ~/.m2/repository - name: Cache local Maven repository uses: actions/cache@v3 From 0a7172a21f615e3665b2e4d33a7bcae2cf281d3c Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Mon, 27 Nov 2023 14:46:53 +0800 Subject: [PATCH 20/50] add check Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index e9dfb209922..17d356d5549 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -166,11 +166,6 @@ jobs: with: distribution: adopt java-version: 8 - - - name: check m2 before cache - run: | - set -x - ls -la ~/.m2/repository - name: Cache local Maven repository uses: actions/cache@v3 @@ -211,6 +206,11 @@ jobs: fi } done + + - name: check m2 after test + run: | + set -x + ls -la ~/.m2/repository package-tests-scala213: needs: get-shim-versions-from-dist From 2ade9fde40a49e767e13446686d8c1db0cc68e4b Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Mon, 27 Nov 2023 15:04:07 +0800 Subject: [PATCH 21/50] removed test steps Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 36 ++------------------------ 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 17d356d5549..67847fc517a 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -35,29 +35,13 @@ jobs: strategy: matrix: java: [ '8'] - # steps: - # - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - - # - name: Cache local Maven repository - # uses: actions/cache@v3 - # with: - # path: ~/.m2/repository - # key: ${{ runner.os }}-maven-${{ hashFiles('**/**/pom.xml') }} - # restore-keys: | - # ${{ runner.os }}-maven- steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ matrix.java }} - cache: 'maven' - - - name: check m2 before cache - run: | - set -x - ls -la ~/.m2/repository - + cache: 'maven' - run: | set -x max_retry=3; delay=30; i=1 @@ -71,18 +55,12 @@ jobs: echo "mvn command failed. Exit 1"; exit 1 fi } - done - + done - name: Cache local Maven repository uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} - - - name: check deps - run: | - set -x - ls -la ~/.m2/repository get-shim-versions-from-dist: needs: cache-dependencies @@ -173,11 +151,6 @@ jobs: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} - - name: check deps - run: | - set -x - ls -la ~/.m2/repository - - name: check runtime before tests run: | env | grep JAVA @@ -206,11 +179,6 @@ jobs: fi } done - - - name: check m2 after test - run: | - set -x - ls -la ~/.m2/repository package-tests-scala213: needs: get-shim-versions-from-dist From 65655aeadb8c0c05c3e9dfccf1186c10df33f50b Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Tue, 28 Nov 2023 13:42:32 +0800 Subject: [PATCH 22/50] add new mvn command, and changed key Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 67847fc517a..bcaabb5f092 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -48,7 +48,13 @@ jobs: while true; do mvn -Dmaven.wagon.http.retryHandler.count=3 \ -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - -Daether.connector.http.connectionMaxTtl=30 initialize -pl sql-plugin-api -am && break || { + -Daether.connector.http.connectionMaxTtl=30 initialize -pl sql-plugin-api -am && \ + mvn help:evaluate -pl dist -Dexpression=included_buildvers \ + -DforceStdout -Dmaven.repo.local=$PWD/.m2 \ + -PnoSnapshots -q | tr -d ',' | xargs -n 1 bash -c 'mvn dependency:resolve -pl sql-plugin-api -Dbuildver=$1' _ && \ + mvn -f scala2.13 help:evaluate -pl dist -Dexpression=included_buildvers \ + -DforceStdout -Dmaven.repo.local=$PWD/.m2 \ + -PnoSnapshots -q | tr -d ',' | xargs -n 1 bash -c 'mvn -f scala2.13 dependency:resolve -pl sql-plugin-api -Dbuildver=$1' _ && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) else @@ -60,7 +66,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} get-shim-versions-from-dist: needs: cache-dependencies @@ -149,7 +155,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} - name: check runtime before tests run: | @@ -200,7 +206,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} - name: check runtime before tests run: | @@ -260,7 +266,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} - name: check runtime before tests run: | @@ -309,7 +315,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('sql-plugin-api/pom.xml') }} + key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From fdf8bd0a6b17675a699ddb69cae4cf07bedbc383 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Tue, 28 Nov 2023 14:14:11 +0800 Subject: [PATCH 23/50] change mvn command Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index bcaabb5f092..347b7ace710 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -46,15 +46,9 @@ jobs: set -x max_retry=3; delay=30; i=1 while true; do - mvn -Dmaven.wagon.http.retryHandler.count=3 \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ - -Daether.connector.http.connectionMaxTtl=30 initialize -pl sql-plugin-api -am && \ mvn help:evaluate -pl dist -Dexpression=included_buildvers \ -DforceStdout -Dmaven.repo.local=$PWD/.m2 \ - -PnoSnapshots -q | tr -d ',' | xargs -n 1 bash -c 'mvn dependency:resolve -pl sql-plugin-api -Dbuildver=$1' _ && \ - mvn -f scala2.13 help:evaluate -pl dist -Dexpression=included_buildvers \ - -DforceStdout -Dmaven.repo.local=$PWD/.m2 \ - -PnoSnapshots -q | tr -d ',' | xargs -n 1 bash -c 'mvn -f scala2.13 dependency:resolve -pl sql-plugin-api -Dbuildver=$1' _ && break || { + -PnoSnapshots -q | tr -d ',' | xargs -n 1 bash -c 'mvn dependency:resolve -pl sql-plugin-api -Dbuildver=$1' _ && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) else From cf4d90da337f1715e7ab8d5e7399d13f404a9595 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Tue, 28 Nov 2023 23:16:16 +0800 Subject: [PATCH 24/50] change mvn command Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 347b7ace710..7d4dde1b632 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -47,8 +47,8 @@ jobs: max_retry=3; delay=30; i=1 while true; do mvn help:evaluate -pl dist -Dexpression=included_buildvers \ - -DforceStdout -Dmaven.repo.local=$PWD/.m2 \ - -PnoSnapshots -q | tr -d ',' | xargs -n 1 bash -c 'mvn dependency:resolve -pl sql-plugin-api -Dbuildver=$1' _ && break || { + -DforceStdout -Dmaven.repo.local=$PWD/.m2 -PnoSnapshots -q | tr -d ',' | \ + xargs -n 1 bash -c 'mvn initialize -pl sql-plugin-api -am -Dbuildver=$1' _ && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) else From c97fdec564e3fef9315b5f62cd27a4201bc8ee03 Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:32:09 +0800 Subject: [PATCH 25/50] Update .github/workflows/mvn-verify-check.yml Co-authored-by: Gera Shegalov --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 7d4dde1b632..a17bacd4310 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -47,7 +47,7 @@ jobs: max_retry=3; delay=30; i=1 while true; do mvn help:evaluate -pl dist -Dexpression=included_buildvers \ - -DforceStdout -Dmaven.repo.local=$PWD/.m2 -PnoSnapshots -q | tr -d ',' | \ + -DforceStdout -PnoSnapshots -q | tr -d ',' | \ xargs -n 1 bash -c 'mvn initialize -pl sql-plugin-api -am -Dbuildver=$1' _ && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) From 3c0d047b40bde48c3c88e7df20d39f91adef781c Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:34:39 +0800 Subject: [PATCH 26/50] Update .github/workflows/mvn-verify-check.yml Co-authored-by: Gera Shegalov --- .github/workflows/mvn-verify-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index a17bacd4310..065dc4a53ad 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -41,7 +41,6 @@ jobs: with: distribution: 'temurin' java-version: ${{ matrix.java }} - cache: 'maven' - run: | set -x max_retry=3; delay=30; i=1 From be5135c04cdd530940676547367984140c7b7026 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 11:06:21 +0800 Subject: [PATCH 27/50] change key format Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 065dc4a53ad..1620390e9ae 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -59,7 +59,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} get-shim-versions-from-dist: needs: cache-dependencies @@ -148,7 +148,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} - name: check runtime before tests run: | @@ -199,7 +199,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} - name: check runtime before tests run: | @@ -259,7 +259,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} - name: check runtime before tests run: | @@ -308,7 +308,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ env.BRANCH }}-${{ env.DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From f643bbc8111b2ce22223a2f74cbb2f8a2ff7b8a7 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 11:21:52 +0800 Subject: [PATCH 28/50] change time format Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 1620390e9ae..a8ca853ab31 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -59,7 +59,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ github.event.created_at }} get-shim-versions-from-dist: needs: cache-dependencies From 845b13defcde063d26bb8db2cd0bdde515abc424 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 11:32:25 +0800 Subject: [PATCH 29/50] add date Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index a8ca853ab31..15c19705d62 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -55,11 +55,12 @@ jobs: fi } done + echo echo "$(date +'%Y-%m-%d')" >> $CURRENT_DATE - name: Cache local Maven repository uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ github.event.created_at }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} get-shim-versions-from-dist: needs: cache-dependencies @@ -148,7 +149,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} - name: check runtime before tests run: | @@ -199,7 +200,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} - name: check runtime before tests run: | @@ -259,7 +260,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} - name: check runtime before tests run: | @@ -308,7 +309,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ format('%Y-%m-%d', github.event.created_at) }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From 907efb4d18b917a94d811b960cdda3eb4ddd8a96 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 11:43:57 +0800 Subject: [PATCH 30/50] fix bug Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 15c19705d62..395c21be790 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -55,7 +55,7 @@ jobs: fi } done - echo echo "$(date +'%Y-%m-%d')" >> $CURRENT_DATE + echo "$(date +'%Y-%m-%d')" >> $CURRENT_DATE - name: Cache local Maven repository uses: actions/cache@v3 with: From f527aa2deaf3504c0a3b8307509d5eb985de4682 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 11:53:52 +0800 Subject: [PATCH 31/50] fix time Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 395c21be790..09c751fe15d 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -127,7 +127,7 @@ jobs: svJsonStr=$(printf {\"include\":[%s]} $svArrBodyNoSnapshot) fi - echo "scala213Versions=$svJsonStr" >> $GITHUB_OUTPUT + echo "::set-output name=date::$(date +'%Y-%m-%d')" package-tests: needs: get-shim-versions-from-dist @@ -149,7 +149,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} - name: check runtime before tests run: | @@ -200,7 +200,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} - name: check runtime before tests run: | @@ -260,7 +260,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} - name: check runtime before tests run: | @@ -309,7 +309,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From 9ee1d3cfcec65ef02f5ef17665ce7a1e9d376268 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 14:07:43 +0800 Subject: [PATCH 32/50] chang key name Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 09c751fe15d..475b8356742 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -60,7 +60,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.CURRENT_DATE }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} get-shim-versions-from-dist: needs: cache-dependencies From 2b33b20805e0f1df0b8be32ae11a272644a88ea4 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 14:14:39 +0800 Subject: [PATCH 33/50] fix bug Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 475b8356742..d57aaf56fd8 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -55,7 +55,7 @@ jobs: fi } done - echo "$(date +'%Y-%m-%d')" >> $CURRENT_DATE + echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -127,8 +127,6 @@ jobs: svJsonStr=$(printf {\"include\":[%s]} $svArrBodyNoSnapshot) fi - echo "::set-output name=date::$(date +'%Y-%m-%d')" - package-tests: needs: get-shim-versions-from-dist continue-on-error: ${{ matrix.isSnapshot }} From b3075e572e183d819a5652a9ebdc50a2192f4f15 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 14:37:40 +0800 Subject: [PATCH 34/50] change time def Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index d57aaf56fd8..cc0fec7202f 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -55,12 +55,12 @@ jobs: fi } done - echo "::set-output name=date::$(date +'%Y-%m-%d')" + echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Cache local Maven repository uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} get-shim-versions-from-dist: needs: cache-dependencies From ae68c17c9fc8928ab35c90391a0974f842d0811a Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 14:49:00 +0800 Subject: [PATCH 35/50] change time Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index cc0fec7202f..444a4de5647 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -147,7 +147,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} - name: check runtime before tests run: | @@ -198,7 +198,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} - name: check runtime before tests run: | @@ -258,7 +258,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} - name: check runtime before tests run: | @@ -307,7 +307,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ steps.date.outputs.date }} + key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From 5090b100e7db0825868643a001fbefaf79c57563 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 20:54:29 +0800 Subject: [PATCH 36/50] add step to get current date Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 444a4de5647..01d3d7bcaea 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -55,7 +55,11 @@ jobs: fi } done + + - name: Get current date + run: | echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -142,6 +146,10 @@ jobs: with: distribution: adopt java-version: 8 + + - name: Get current date + run: | + echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Cache local Maven repository uses: actions/cache@v3 @@ -194,6 +202,10 @@ jobs: distribution: adopt java-version: 8 + - name: Get current date + run: | + echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -254,6 +266,10 @@ jobs: distribution: adopt java-version: ${{ matrix.java-version }} + - name: Get current date + run: | + echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -303,6 +319,10 @@ jobs: distribution: adopt java-version: 11 + - name: Get current date + run: | + echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Cache local Maven repository uses: actions/cache@v3 with: From 0602ae934338e73e8713566c5697e9f7d131ab15 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Wed, 29 Nov 2023 21:02:31 +0800 Subject: [PATCH 37/50] recover excess deletion. Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 01d3d7bcaea..5993047c093 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -131,6 +131,8 @@ jobs: svJsonStr=$(printf {\"include\":[%s]} $svArrBodyNoSnapshot) fi + echo "scala213Versions=$svJsonStr" >> $GITHUB_OUTPUT + package-tests: needs: get-shim-versions-from-dist continue-on-error: ${{ matrix.isSnapshot }} From 2dcbc70311e1b3413610e5b3b2e4a342adb888d7 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 10:13:02 +0800 Subject: [PATCH 38/50] change ref to target branch Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 5993047c093..ef5723226dc 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -64,7 +64,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} + key: ${{ runner.os }}-maven-${{ github.event.pull_request.base.ref }}-${{ env.DATE }} get-shim-versions-from-dist: needs: cache-dependencies From 671fbc0d013787bea3d1bd79a691d38463130ab3 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 11:30:44 +0800 Subject: [PATCH 39/50] generate key in cache job Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 56 ++++++++++---------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index ef5723226dc..9394c14a41a 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -35,13 +35,16 @@ jobs: strategy: matrix: java: [ '8'] + outputs: + dailyCacheKey: ${{ steps.generateCacheKey.outputs.dailyCacheKey }} steps: - uses: actions/checkout@v3 # refs/pull/:prNumber/merge - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ matrix.java }} - - run: | + - name: populate-daily-cache + run: | set -x max_retry=3; delay=30; i=1 while true; do @@ -55,16 +58,17 @@ jobs: fi } done - - - name: Get current date + - name: Generate daily cache key + id: generateCacheKey run: | echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - + cacheKey="${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" + echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.event.pull_request.base.ref }}-${{ env.DATE }} + path: ~/.m2 + key: ${{ env.dailyCacheKey }} get-shim-versions-from-dist: needs: cache-dependencies @@ -134,7 +138,7 @@ jobs: echo "scala213Versions=$svJsonStr" >> $GITHUB_OUTPUT package-tests: - needs: get-shim-versions-from-dist + needs: [get-shim-versions-from-dist, cache-dependencies] continue-on-error: ${{ matrix.isSnapshot }} strategy: matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.sparkTailVersions) }} @@ -148,16 +152,12 @@ jobs: with: distribution: adopt java-version: 8 - - - name: Get current date - run: | - echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Cache local Maven repository uses: actions/cache@v3 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} + path: ~/.m2 + key: ${{ needs.cache-dependencies.outputs.dailyCacheKey }} - name: check runtime before tests run: | @@ -189,7 +189,7 @@ jobs: done package-tests-scala213: - needs: get-shim-versions-from-dist + needs: [get-shim-versions-from-dist, cache-dependencies] continue-on-error: ${{ matrix.isSnapshot }} strategy: matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.scala213Versions) }} @@ -204,15 +204,11 @@ jobs: distribution: adopt java-version: 8 - - name: Get current date - run: | - echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Cache local Maven repository uses: actions/cache@v3 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} + path: ~/.m2 + key: ${{ needs.cache-dependencies.outputs.dailyCacheKey }} - name: check runtime before tests run: | @@ -255,7 +251,7 @@ jobs: verify-all-modules: - needs: get-shim-versions-from-dist + needs: [get-shim-versions-from-dist, cache-dependencies] runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get-shim-versions-from-dist.outputs.sparkJDKVersions) }} @@ -268,15 +264,11 @@ jobs: distribution: adopt java-version: ${{ matrix.java-version }} - - name: Get current date - run: | - echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Cache local Maven repository uses: actions/cache@v3 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} + path: ~/.m2 + key: ${{ needs.cache-dependencies.outputs.dailyCacheKey }} - name: check runtime before tests run: | @@ -307,7 +299,7 @@ jobs: done install-modules: - needs: get-shim-versions-from-dist + needs: [get-shim-versions-from-dist, cache-dependencies] runs-on: ubuntu-latest strategy: matrix: @@ -321,15 +313,11 @@ jobs: distribution: adopt java-version: 11 - - name: Get current date - run: | - echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Cache local Maven repository uses: actions/cache@v3 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ github.ref }}-${{ env.DATE }} + path: ~/.m2 + key: ${{ needs.cache-dependencies.outputs.dailyCacheKey }} - name: Setup Maven Wrapper run: mvn wrapper:wrapper -Dmaven=${{ matrix.maven-version }} From 271af46b866f9b844b0bd645537396afde72673f Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 13:39:44 +0800 Subject: [PATCH 40/50] upadte key Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 9394c14a41a..b5c81709db2 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -62,7 +62,7 @@ jobs: id: generateCacheKey run: | echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - cacheKey="${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" + cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 From 845a40c22316a7d4aa2bd7f46ede1b492bbc0896 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 13:55:11 +0800 Subject: [PATCH 41/50] echo key for testing Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index b5c81709db2..9fda00b52e4 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8'] + java: ['8'] outputs: dailyCacheKey: ${{ steps.generateCacheKey.outputs.dailyCacheKey }} steps: @@ -63,6 +63,7 @@ jobs: run: | echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" + echo "$cacheKey" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 From 98b0ad51461efa34fb27e1b1ab7f8fa5d4c05e04 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 14:26:56 +0800 Subject: [PATCH 42/50] fix bug of time Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 9fda00b52e4..f8315bf03e0 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -61,9 +61,9 @@ jobs: - name: Generate daily cache key id: generateCacheKey run: | - echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" - echo "$cacheKey" + currentDate="$(date +'%Y-%m-%d')" + echo "$currentDate" + cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ currentDate }}" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 From 67c92367a1a6ce7bb48e5f2ad6990cbf46361edc Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 14:34:01 +0800 Subject: [PATCH 43/50] test date Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index f8315bf03e0..9d783b2862c 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -61,9 +61,10 @@ jobs: - name: Generate daily cache key id: generateCacheKey run: | - currentDate="$(date +'%Y-%m-%d')" - echo "$currentDate" - cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ currentDate }}" + set -x + echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + echo "${{ env.DATE }}" + cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 From a1bc6460fca2a0135ba1e53abe616058a8c0b2d0 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 14:49:36 +0800 Subject: [PATCH 44/50] remove java version matrix Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 9d783b2862c..dcfa007c5e9 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -32,9 +32,6 @@ env: jobs: cache-dependencies: runs-on: ubuntu-latest - strategy: - matrix: - java: ['8'] outputs: dailyCacheKey: ${{ steps.generateCacheKey.outputs.dailyCacheKey }} steps: @@ -42,7 +39,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: ${{ matrix.java }} + java-version: 8 - name: populate-daily-cache run: | set -x @@ -62,9 +59,7 @@ jobs: id: generateCacheKey run: | set -x - echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - echo "${{ env.DATE }}" - cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-${{ env.DATE }}" + cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-$(date +'%Y-%m-%d')" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 From bc16dfcf9318d684908ebae07e0a55a3d1096a87 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 15:00:25 +0800 Subject: [PATCH 45/50] add runner os Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index dcfa007c5e9..dd46c30754e 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -59,7 +59,7 @@ jobs: id: generateCacheKey run: | set -x - cacheKey="${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-$(date +'%Y-%m-%d')" + cacheKey="${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-$(date +'%Y-%m-%d')" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository uses: actions/cache@v3 From 7726775af6af7227c14791e7560f1026d1b38e72 Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:29:05 +0800 Subject: [PATCH 46/50] Update .github/workflows/mvn-verify-check.yml Co-authored-by: Gera Shegalov --- .github/workflows/mvn-verify-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index dd46c30754e..5b44f4f419c 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -62,6 +62,7 @@ jobs: cacheKey="${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-$(date +'%Y-%m-%d')" echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - name: Cache local Maven repository + id: cache uses: actions/cache@v3 with: path: ~/.m2 From 035ce8ba4cf3d417f35e7fcc1e8cc2cedaf8c546 Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:29:13 +0800 Subject: [PATCH 47/50] Update .github/workflows/mvn-verify-check.yml Co-authored-by: Gera Shegalov --- .github/workflows/mvn-verify-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 5b44f4f419c..2d82ef2711e 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -41,6 +41,7 @@ jobs: distribution: 'temurin' java-version: 8 - name: populate-daily-cache + if: steps.cache.outputs.cache-hit != 'true' run: | set -x max_retry=3; delay=30; i=1 From 973e9475f6cf6c058c8abafcde8afebfa1b9d0ad Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 16:34:44 +0800 Subject: [PATCH 48/50] add scala 213, and adjusted sequence of steps Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 32 ++++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 2d82ef2711e..67eef5d0e65 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -40,15 +40,29 @@ jobs: with: distribution: 'temurin' java-version: 8 + - name: Generate daily cache key + id: generateCacheKey + run: | + set -x + cacheKey="${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-$(date +'%Y-%m-%d')" + echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT + - name: Cache local Maven repository + id: cache + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ env.dailyCacheKey }} - name: populate-daily-cache if: steps.cache.outputs.cache-hit != 'true' run: | set -x max_retry=3; delay=30; i=1 while true; do - mvn help:evaluate -pl dist -Dexpression=included_buildvers \ - -DforceStdout -PnoSnapshots -q | tr -d ',' | \ - xargs -n 1 bash -c 'mvn initialize -pl sql-plugin-api -am -Dbuildver=$1' _ && break || { + for pom_xml in pom.xml scala2.13/pom.xml; do + mvn -f $pom_xml help:evaluate -pl dist -Dexpression=included_buildvers \ + -DforceStdout -PnoSnapshots -q | tr -d ',' | \ + xargs -n 1 bash -c 'mvn -f $1 initialize -pl sql-plugin-api -am -Dbuildver=$1' _ $pom_xml; + done && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) else @@ -56,18 +70,6 @@ jobs: fi } done - - name: Generate daily cache key - id: generateCacheKey - run: | - set -x - cacheKey="${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.event.pull_request.base.ref }}-$(date +'%Y-%m-%d')" - echo "dailyCacheKey=$cacheKey" | tee $GITHUB_ENV $GITHUB_OUTPUT - - name: Cache local Maven repository - id: cache - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ env.dailyCacheKey }} get-shim-versions-from-dist: needs: cache-dependencies From e098445d09c11f8e3fcb0dbee2f49a6fcc042737 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 30 Nov 2023 18:58:30 +0800 Subject: [PATCH 49/50] change iteration var name Signed-off-by: YanxuanLiu --- .github/workflows/mvn-verify-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index 67eef5d0e65..d1e3ef7c573 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -58,10 +58,10 @@ jobs: set -x max_retry=3; delay=30; i=1 while true; do - for pom_xml in pom.xml scala2.13/pom.xml; do - mvn -f $pom_xml help:evaluate -pl dist -Dexpression=included_buildvers \ + for pom in pom.xml scala2.13/pom.xml; do + mvn -f $pom help:evaluate -pl dist -Dexpression=included_buildvers \ -DforceStdout -PnoSnapshots -q | tr -d ',' | \ - xargs -n 1 bash -c 'mvn -f $1 initialize -pl sql-plugin-api -am -Dbuildver=$1' _ $pom_xml; + xargs -n 1 bash -c 'mvn -f $1 initialize -pl sql-plugin-api -am -Dbuildver=$1' _ $pom; done && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) From 1ac4110a6da2cd8f838957050a0f0bd0f7166741 Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:36:52 +0800 Subject: [PATCH 50/50] Update .github/workflows/mvn-verify-check.yml Co-authored-by: Gera Shegalov --- .github/workflows/mvn-verify-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-verify-check.yml b/.github/workflows/mvn-verify-check.yml index d1e3ef7c573..f08c3a853c6 100644 --- a/.github/workflows/mvn-verify-check.yml +++ b/.github/workflows/mvn-verify-check.yml @@ -61,7 +61,7 @@ jobs: for pom in pom.xml scala2.13/pom.xml; do mvn -f $pom help:evaluate -pl dist -Dexpression=included_buildvers \ -DforceStdout -PnoSnapshots -q | tr -d ',' | \ - xargs -n 1 bash -c 'mvn -f $1 initialize -pl sql-plugin-api -am -Dbuildver=$1' _ $pom; + xargs -n 1 bash -c 'mvn -f $1 initialize -pl sql-plugin-api -am -Dbuildver=$2' _ $pom; done && break || { if [[ $i -le $max_retry ]]; then echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2))