Skip to content

Commit

Permalink
Merge branch '3.3' into 3.3-starter-micrometer
Browse files Browse the repository at this point in the history
  • Loading branch information
songxiaosheng authored Dec 13, 2024
2 parents 82fcca5 + a9e4910 commit 12abb43
Show file tree
Hide file tree
Showing 447 changed files with 19,009 additions and 6,409 deletions.
7 changes: 3 additions & 4 deletions .artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ dubbo-configcenter-apollo
dubbo-configcenter-nacos
dubbo-configcenter-zookeeper
dubbo-core-spi
dubbo-dependencies
dubbo-dependencies-all
dubbo-dependencies-bom
dubbo-dependencies-zookeeper-curator5
dubbo-distribution
dubbo-filter-cache
dubbo-filter-validation
dubbo-kubernetes
Expand Down Expand Up @@ -75,6 +72,7 @@ dubbo-remoting
dubbo-remoting-api
dubbo-remoting-http12
dubbo-remoting-http3
dubbo-remoting-websocket
dubbo-remoting-netty
dubbo-remoting-netty4
dubbo-remoting-zookeeper-curator5
Expand Down Expand Up @@ -105,7 +103,6 @@ dubbo-spring-boot-starter
dubbo-spring-boot-starters
dubbo-spring-boot-interceptor
dubbo-nacos-spring-boot-starter
dubbo-zookeeper-spring-boot-starter
dubbo-zookeeper-curator5-spring-boot-starter
dubbo-sentinel-spring-boot-starter
dubbo-seata-spring-boot-starter
Expand All @@ -115,4 +112,6 @@ dubbo-xds
dubbo-plugin-loom
dubbo-rest-jaxrs
dubbo-rest-spring
dubbo-rest-openapi
dubbo-triple-servlet
dubbo-triple-websocket
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
- [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
- [x] Make sure gitHub actions can pass. [Why the workflow is failing and how to fix it?](./CONTRIBUTING.md)
- [x] Make sure gitHub actions can pass. [Why the workflow is failing and how to fix it?](../CONTRIBUTING.md)
124 changes: 83 additions & 41 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
path: dubbo
- name: "Set up JDK"
uses: actions/setup-java@v4
with:
Expand All @@ -135,7 +133,6 @@ jobs:
run: rm -rf ~/.m2/repository/org/apache/dubbo
- name: "Build Dubbo with maven"
run: |
cd ./dubbo
./mvnw ${{ env.MAVEN_ARGS }} clean install -Psources,'!demo',skip-spotless,checkstyle -Dmaven.test.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
- name: "Save dubbo cache"
uses: actions/cache/save@v4
Expand Down Expand Up @@ -171,7 +168,7 @@ jobs:
- name: "Calculate Dubbo Version"
id: dubbo-version
run: |
REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml`
REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' ./pom.xml`
echo "version=$REVISION" >> $GITHUB_OUTPUT
echo "dubbo version: $REVISION"
Expand Down Expand Up @@ -210,7 +207,7 @@ jobs:
ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz
unit-test:
needs: [check-format, build-source, unit-test-prepare]
needs: [check-format, unit-test-prepare]
name: "Unit Test On ubuntu-latest"
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -251,15 +248,23 @@ jobs:
timeout-minutes: 90
run: |
set -o pipefail
./mvnw ${{ env.MAVEN_ARGS }} clean test verify -Pjacoco,jdk15ge-simple,'!jdk15ge','!demo',skip-spotless,jacoco089 -DtrimStackTrace=false -Dmaven.test.skip=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper 2>&1 | tee >(grep -n -B 1 -A 200 "FAILURE! -- in" > test_errors.log)
./mvnw ${{ env.MAVEN_ARGS }} clean test verify -Pjacoco,jdk15ge-simple,'!jdk15ge','!demo',skip-spotless -DtrimStackTrace=false -Dmaven.test.skip=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper 2>&1 | tee >(grep -n -B 1 -A 200 "FAILURE! -- in" > test_errors.log)
- name: "Print test error log"
if: failure()
run: cat test_errors.log
- name: "Upload coverage result"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
flags: unit-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: "Upload surefire reports"
uses: actions/upload-artifact@v4
with:
name: coverage-result
path: "**/target/site/**/jacoco.xml"
name: surefire-reports
path: "**/target/surefire-reports/**"

samples-test-prepare:
needs: check-format
Expand Down Expand Up @@ -467,21 +472,15 @@ jobs:
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh

jacoco-result-merge:
samples-jacoco-result-merge:
runs-on: ubuntu-latest
needs: [check-format, integration-test-result, samples-test-result, unit-test]
needs: [check-format, samples-test-result]
steps:
- uses: actions/checkout@v4
with:
path: "./dubbo"
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
path: "./dubbo-samples"
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
uses: actions/setup-java@v4
with:
Expand All @@ -495,38 +494,74 @@ jobs:
path: ${{ github.workspace }}
- name: "Unpack class result"
run: |
cd ${{ github.workspace }}/dubbo
unzip -o ${{ github.workspace }}/class.zip
- name: "Restore samples jacoco exec"
uses: actions/download-artifact@v4
with:
pattern: samples-jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-samples/target/
- name: "Merge samples jacoco result"
run: |
cd ${{ github.workspace }}/dubbo-samples/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}"
- name: "Remove old test result"
run: |
rm -rf ${{ github.workspace }}/dubbo-samples
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: samples-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

integration-jacoco-result-merge:
runs-on: ubuntu-latest
needs: [check-format, integration-test-result, samples-test-result]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: "Restore class result"
uses: actions/download-artifact@v4
with:
name: "class-file"
github-token: ${{ secrets.GITHUB_TOKEN }}
path: ${{ github.workspace }}
- name: "Unpack class result"
run: |
unzip -o ${{ github.workspace }}/class.zip
- name: "Restore integration test jacoco exec"
uses: actions/download-artifact@v4
with:
pattern: jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-integration-cases/target/
- name: "Merge samples jacoco result"
run: |
cd ${{ github.workspace }}/dubbo-samples/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}/dubbo"
- name: "Merge integration test jacoco result"
run: |
cd ${{ github.workspace }}/dubbo-integration-cases/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-integration-cases ${{github.workspace}}/dubbo"
- name: "Restore coverage result"
uses: actions/download-artifact@v4
with:
name: coverage-result
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo/
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-integration-cases ${{github.workspace}}"
- name: "Remove old test result"
run: |
rm -rf ${{ github.workspace }}/dubbo-integration-cases
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


error-code-inspecting:
needs: check-format
Expand Down Expand Up @@ -579,15 +614,15 @@ jobs:
- uses: actions/checkout@v4
with:
path: "./dubbo"
- name: "Setup GraalVM environment"
- name: "Set up GraalVM environment"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: "Setup Zookeeper environment"
- name: "Set up Zookeeper environment"
run: |
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
Expand All @@ -599,7 +634,7 @@ jobs:
native-image --version
- name: "Set current date as env variable"
run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: "Restore local maven repository cache"
- name: "Restore local Maven repository cache"
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
Expand All @@ -611,14 +646,21 @@ jobs:
run: |
cd ${{ github.workspace }}/dubbo
./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P '!demo',skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
- name: "Compile and run Dubbo demo for native (Linux)"
- name: "Checkout dubbo-samples repository"
uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
path: "./dubbo-samples"
- name: "Compile and run Dubbo native image demo"
run: |
cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-interface
MVNW="${{ github.workspace }}/dubbo/mvnw ${{ env.MAVEN_ARGS }} -T 2C -Dmaven.test.skip=true"
$MVNW clean install
cd ../dubbo-demo-native-provider
$MVNW clean package -P native native:compile
nohup ./target/dubbo-demo-native-provider &
cd ../dubbo-demo-native-consumer
MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true"
cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
$MVNW clean package -P native native:compile
./target/dubbo-demo-native-consumer
nohup ./target/dubbo-samples-native-image-provider &
sleep 10
curl \
--header "Content-Type: application/json" \
--data '{"name":"Dubbo"}' \
http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/
10 changes: 6 additions & 4 deletions .github/workflows/build-and-test-scheduled-3.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
name: samples-test-result-${{matrix.job_id}}
path: test/jobs/*-result*
samples-test-result:
needs: [samples-test-job]
Expand All @@ -316,7 +316,8 @@ jobs:
- name: "Download test result"
uses: actions/download-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
name: samples-test-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
Expand Down Expand Up @@ -395,7 +396,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
name: integration-test-result-${{matrix.job_id}}
path: test/jobs/*-result*
integration-test-result:
needs: [integration-test-job]
Expand All @@ -414,7 +415,8 @@ jobs:
- name: "Download test result"
uses: actions/download-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
name: integration-test-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/build-and-test-scheduled-3.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
name: samples-test-result-${{matrix.job_id}}
path: test/jobs/*-result*
samples-test-result:
needs: [samples-test-job]
Expand All @@ -316,7 +316,8 @@ jobs:
- name: "Download test result"
uses: actions/download-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
name: samples-test-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
Expand Down Expand Up @@ -395,7 +396,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
name: integration-test-result-${{matrix.job_id}}
path: test/jobs/*-result*
integration-test-result:
needs: [integration-test-job]
Expand All @@ -414,7 +415,8 @@ jobs:
- name: "Download test result"
uses: actions/download-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
name: integration-test-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
Expand Down
Loading

0 comments on commit 12abb43

Please sign in to comment.