Skip to content

Commit

Permalink
Cherry-pick bug fix from master into 3.1.0 branch (#334)
Browse files Browse the repository at this point in the history
* [Dubbo-267] Fix protobuf type lose field when deepCopy inJvmInvoker Class. (#268)

* fix: dubbo-registry-dns resource leak (#308)

* fix: dubbo-registry-dns memory leak && add try catch

* revert junit

(cherry picked from commit b3033de)

* fix: redis connection do not close and return to connection pool (#311)

(cherry picked from commit cbad15d)

* fix test lib (#310)

* fix test lib

* remove useless dependency

* remove useless dependency

* fix bad test

* TimeoutException Increase time

* Revert "TimeoutException Increase time"

This reverts commit 5e5bb32.

* add MinaClientToServerTest disable

(cherry picked from commit f38363f)

* build: add Windows platform unit test for CI && add dependabot config

* chore: create etcd for each unit test

* chore: already check license by apache skywalking-eyes so skip rat-license check

* Revert "chore: already check license by apache skywalking-eyes so skip rat-license check"

This reverts commit 98d627b.

* fix: rat-check failed

---------

Co-authored-by: MaruHibiki <[email protected]>
Co-authored-by: 王聪洋 <[email protected]>
  • Loading branch information
3 people authored Apr 26, 2024
1 parent 605f5f4 commit a227f52
Show file tree
Hide file tree
Showing 17 changed files with 488 additions and 88 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:

- package-ecosystem: "maven"
directory: "/"
open-pull-requests-limit: 20
# Ignore major version updates
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
schedule:
interval: "weekly"
day: "monday"
time: "03:00"
timezone: "US/Eastern"
60 changes: 42 additions & 18 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
name: "Check License"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Check License
uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5
uses: apache/skywalking-eyes@v0.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Set up JDK 21"
Expand All @@ -34,7 +35,7 @@ jobs:
distribution: 'zulu'
java-version: 21
- name: Restore Maven local repository cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -52,10 +53,17 @@ jobs:
build-tools:
name: "Build-tools"
needs: check-license
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
fail-fast: false
outputs:
cache-key: ${{ steps.dubbo-build-tools.cache }}
steps:
- name: Support long paths on Windows
if: ${{ startsWith( matrix.os, 'windows') }}
run: git config --system core.longpaths true
- uses: actions/checkout@v4
name: build tools
with:
Expand All @@ -67,7 +75,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 21
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache local Maven repository"
with:
path: ~/.m2/repository
Expand Down Expand Up @@ -95,7 +103,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 8
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache local Maven repository"
with:
path: ~/.m2/repository
Expand Down Expand Up @@ -140,7 +148,7 @@ jobs:
# Download dependencies Prepare for unit test
unit-test-prepare:
name: "Preparation for Unit Test On ${{ matrix.os }}"
needs: [check-license, build-source]
needs: [check-license]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -149,7 +157,7 @@ jobs:
env:
ZOOKEEPER_VERSION: 3.6.3
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache zookeeper binary archive"
id: "cache-zookeeper"
with:
Expand Down Expand Up @@ -187,7 +195,7 @@ jobs:
wget -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz
echo "list the downloaded zookeeper binary archive"
ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache secret key"
id: "cache-secret-cert"
with:
Expand All @@ -206,8 +214,8 @@ jobs:
# Start unit test
unit-test:
needs: [check-license, build-source, unit-test-prepare]
name: "Unit Test On ${{ matrix.os }} with JDK ${{ matrix.jdk }}"
runs-on: ubuntu-latest
name: "Unit Test ${{ matrix.os }} with JDK ${{ matrix.jdk }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
Expand All @@ -218,6 +226,10 @@ jobs:
CURRENT_ROLE: ${{ matrix.case-role }}
DUBBO_DEFAULT_SERIALIZATION: fastjson2
steps:
- name: Support Windows
if: ${{ startsWith( matrix.os, 'windows') }}
run: |
git config --system core.longpaths true
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -226,23 +238,23 @@ jobs:
with:
distribution: 'zulu'
java-version: 8
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache local Maven repository"
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-maven-
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache zookeeper binary archive"
id: "cache-zookeeper"
with:
path: ${{ github.workspace }}/.tmp/zookeeper
key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }}
restore-keys: |
zookeeper-${{ runner.os }}-
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache secret key"
id: "cache-secret-cert"
with:
Expand All @@ -262,14 +274,26 @@ jobs:
# run: |
# source ${{ github.workspace }}/.tmp/decrypted-sonarcloud-token
# ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_dubbo -DtrimStackTrace=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper -Dsonar.coverage.jacoco.xmlReportPaths=dubbo-test/dubbo-dependencies-all/target/site/jacoco-aggregate/jacoco.xml -Dsonar.login=${SONAR_TOKEN}
- name: "Test with Maven without SonarCloud Scan"
- name: "Test with Maven without SonarCloud Scan On Linux"
if: ${{ startsWith( matrix.os, 'linux') || startsWith( matrix.os, 'ubuntu') }}
timeout-minutes: 70
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -DtrimStackTrace=false -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -Pjacoco -DtrimStackTrace=false -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=false -D"checkstyle.skip=false" -D"checkstyle_unix.skip=false" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper"
- name: "Test with Maven without SonarCloud Scan On Windows"
if: ${{ startsWith( matrix.os, 'windows') }}
timeout-minutes: 70
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -Pjacoco -DtrimStackTrace=false -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=false -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper"
- name: "Upload surefire-reports if failure"
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.jdk }}
path: "**/target/surefire-reports/**"
- name: "Upload coverage result"
uses: actions/upload-artifact@v4
with:
name: coverage-result-${{ matrix.os }}-jdk${{ matrix.jdk }}
name: coverage-result-${{ matrix.os }}-${{ matrix.jdk }}
path: "**/target/site/**/jacoco.xml"

# error-code-inspecting:
Expand All @@ -290,7 +314,7 @@ jobs:
# distribution: 'zulu'
# java-version: 21
# - name: Restore Maven local repository cache
# uses: actions/cache@v3
# uses: actions/cache@v4
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
58 changes: 42 additions & 16 deletions .github/workflows/build-and-test-scheduled-3.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ jobs:
name: "Check License"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
ref: '3.1.0'
- name: Check License
uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5
uses: apache/skywalking-eyes@v0.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Set up JDK 21"
Expand All @@ -37,7 +40,7 @@ jobs:
distribution: 'zulu'
java-version: 21
- name: Restore Maven local repository cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -55,10 +58,17 @@ jobs:
build-tools:
name: "Build-tools"
needs: check-license
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
fail-fast: false
outputs:
cache-key: ${{ steps.dubbo-build-tools.cache }}
steps:
- name: Support long paths on Windows
if: ${{ startsWith( matrix.os, 'windows') }}
run: git config --system core.longpaths true
- uses: actions/checkout@v4
name: build tools
with:
Expand All @@ -70,7 +80,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 21
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache local Maven repository"
with:
path: ~/.m2/repository
Expand Down Expand Up @@ -99,7 +109,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 8
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache local Maven repository"
with:
path: ~/.m2/repository
Expand Down Expand Up @@ -144,7 +154,7 @@ jobs:
# Download dependencies Prepare for unit test
unit-test-prepare:
name: "Preparation for Unit Test On ${{ matrix.os }}"
needs: [check-license, build-source]
needs: [check-license]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -153,7 +163,7 @@ jobs:
env:
ZOOKEEPER_VERSION: 3.6.3
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache zookeeper binary archive"
id: "cache-zookeeper"
with:
Expand Down Expand Up @@ -191,7 +201,7 @@ jobs:
wget -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz
echo "list the downloaded zookeeper binary archive"
ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache secret key"
id: "cache-secret-cert"
with:
Expand All @@ -211,7 +221,7 @@ jobs:
unit-test:
needs: [check-license, build-source, unit-test-prepare]
name: "Unit Test ${{ matrix.os }} with JDK ${{ matrix.jdk }}"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
Expand All @@ -222,6 +232,10 @@ jobs:
CURRENT_ROLE: ${{ matrix.case-role }}
DUBBO_DEFAULT_SERIALIZATION: fastjson2
steps:
- name: Support Windows
if: ${{ startsWith( matrix.os, 'windows') }}
run: |
git config --system core.longpaths true
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -230,23 +244,23 @@ jobs:
with:
distribution: 'zulu'
java-version: 8
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache local Maven repository"
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-maven-
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache zookeeper binary archive"
id: "cache-zookeeper"
with:
path: ${{ github.workspace }}/.tmp/zookeeper
key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }}
restore-keys: |
zookeeper-${{ runner.os }}-
- uses: actions/cache@v3
- uses: actions/cache@v4
name: "Cache secret key"
id: "cache-secret-cert"
with:
Expand All @@ -266,10 +280,22 @@ jobs:
# run: |
# source ${{ github.workspace }}/.tmp/decrypted-sonarcloud-token
# ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_dubbo -DtrimStackTrace=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper -Dsonar.coverage.jacoco.xmlReportPaths=dubbo-test/dubbo-dependencies-all/target/site/jacoco-aggregate/jacoco.xml -Dsonar.login=${SONAR_TOKEN}
- name: "Test with Maven without SonarCloud Scan"
- name: "Test with Maven without SonarCloud Scan On Linux"
if: ${{ startsWith( matrix.os, 'linux') || startsWith( matrix.os, 'ubuntu') }}
timeout-minutes: 70
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -DtrimStackTrace=false -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -Pjacoco -DtrimStackTrace=false -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=false -D"checkstyle.skip=false" -D"checkstyle_unix.skip=false" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper"
- name: "Test with Maven without SonarCloud Scan On Windows"
if: ${{ startsWith( matrix.os, 'windows') }}
timeout-minutes: 70
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -Pjacoco -DtrimStackTrace=false -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=false -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper"
- name: "Upload surefire-reports if failure"
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.jdk }}
path: "**/target/surefire-reports/**"
- name: "Upload coverage result"
uses: actions/upload-artifact@v4
with:
Expand All @@ -294,7 +320,7 @@ jobs:
# distribution: 'zulu'
# java-version: 21
# - name: Restore Maven local repository cache
# uses: actions/cache@v3
# uses: actions/cache@v4
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
Loading

0 comments on commit a227f52

Please sign in to comment.