Skip to content

Commit ba82cb6

Browse files
authored
Merge pull request #1476 from chengyouling/develop-dubbo3-workflow
add dubbo3.x router workflow
2 parents 7b8e8e0 + f7ee44d commit ba82cb6

File tree

48 files changed

+1179
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1179
-274
lines changed

.github/actions/common/dubbo/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ runs:
5656
shell: bash
5757
run: echo "projectPath=2-6" >> $GITHUB_ENV
5858
- name: configuration for 2.7.x
59-
if: matrix.dubbo-version == '2-7'
59+
if: matrix.dubbo-version == '2-7' || matrix.dubbo-version == '3-0' || matrix.dubbo-version == '3-1' || matrix.dubbo-version == '3-2'
6060
shell: bash
6161
run: echo "projectPath=2-7" >> $GITHUB_ENV
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: "Dubbo3 Lane Test"
2+
description: "Auto test for dubbo3.x lane"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: entry
7+
uses: ./.github/actions/common/entry
8+
with:
9+
log-dir: ./logs/dubbo3-lane
10+
- name: package dubbo 3.0.x tests
11+
shell: bash
12+
if: matrix.dubbo-version == '3-0'
13+
run: mvn package -Ddubbo.version=3.0.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml
14+
- name: package dubbo 3.1.x tests
15+
shell: bash
16+
if: matrix.dubbo-version == '3-1'
17+
run: mvn package -Ddubbo.version=3.1.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml
18+
- name: package dubbo 3.2.x tests
19+
shell: bash
20+
if: matrix.dubbo-version == '3-2'
21+
run: mvn package -Ddubbo.version=3.2.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml
22+
- name: post config to local-cse
23+
shell: bash
24+
env:
25+
TEST_TYPE: lane-config
26+
run: mvn test --file sermant-integration-tests/dubbo-test/pom.xml
27+
- name: start provider service
28+
shell: bash
29+
env:
30+
dynamic.config.dynamicConfigType: KIE
31+
dynamic.config.serverAddress: 127.0.0.1:30110
32+
SERVICE_META_ENVIRONMENT: development
33+
SERVICE_META_APPLICATION: lane
34+
SERVICE_META_VERSION: 1.0.0
35+
SERVER_PORT: 18021
36+
DUBBO_PROTOCOL_PORT: 18821
37+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
38+
run: |
39+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -Ddubbo.application.qos-enable=false -jar \
40+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-provider.log 2>&1 &
41+
- name: start second provider service
42+
shell: bash
43+
env:
44+
dynamic.config.dynamicConfigType: KIE
45+
dynamic.config.serverAddress: 127.0.0.1:30110
46+
SERVICE_META_ENVIRONMENT: development
47+
SERVICE_META_APPLICATION: lane
48+
SERVICE_META_VERSION: 1.0.1
49+
SERVER_PORT: 18022
50+
DUBBO_PROTOCOL_PORT: 18822
51+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
52+
run: |
53+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -Ddubbo.application.qos-enable=false -jar \
54+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-provider2.log 2>&1 &
55+
- name: waiting for providers start
56+
shell: bash
57+
run: |
58+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:18021/actuator/health 120
59+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:18022/actuator/health 120
60+
- name: start consumer service
61+
shell: bash
62+
env:
63+
dynamic.config.dynamicConfigType: KIE
64+
dynamic.config.serverAddress: 127.0.0.1:30110
65+
SERVICE_META_ENVIRONMENT: development
66+
SERVICE_META_APPLICATION: lane
67+
SERVICE_META_VERSION: 1.0.0
68+
SERVER_PORT: 18023
69+
DUBBO_PROTOCOL_PORT: 18823
70+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
71+
run: |
72+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-consumer -Dexecute.barService.getMetadata=true -Ddubbo.application.qos-enable=false -Ddubbo.application.enable-file-cache=false -jar \
73+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-consumer/target/dubbo-integration-consumer.jar > ${{ env.logDir }}/dubbo-consumer.log 2>&1 &
74+
- name: start second consumer service
75+
shell: bash
76+
env:
77+
dynamic.config.dynamicConfigType: KIE
78+
dynamic.config.serverAddress: 127.0.0.1:30110
79+
SERVICE_META_ENVIRONMENT: development
80+
SERVICE_META_APPLICATION: lane
81+
SERVICE_META_VERSION: 1.0.1
82+
SERVER_PORT: 18024
83+
DUBBO_PROTOCOL_PORT: 18824
84+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
85+
run: |
86+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-consumer -Dexecute.barService.getMetadata=true -Ddubbo.application.qos-enable=false -Ddubbo.application.enable-file-cache=false -jar \
87+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-consumer/target/dubbo-integration-consumer.jar > ${{ env.logDir }}/dubbo-consumer2.log 2>&1 &
88+
- name: waiting for consumer start
89+
shell: bash
90+
run: |
91+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:18023/actuator/health 120
92+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:18024/actuator/health 120
93+
- name: start controller service
94+
shell: bash
95+
env:
96+
dynamic.config.dynamicConfigType: KIE
97+
dynamic.config.serverAddress: 127.0.0.1:30110
98+
SERVICE_META_ENVIRONMENT: development
99+
SERVICE_META_APPLICATION: lane
100+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
101+
run: |
102+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-controller -Ddubbo.application.qos-enable=false -jar \
103+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-controller/target/dubbo-integration-controller.jar > ${{ env.logDir }}/dubbo-controller.log 2>&1 &
104+
- name: waiting for controller start
105+
shell: bash
106+
run: |
107+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:28019/actuator/health 120
108+
- name: Sleep for 10 Seconds
109+
shell: bash
110+
run: sleep 10
111+
- name: integration test
112+
shell: bash
113+
env:
114+
TEST_TYPE: lane
115+
run: mvn -Dexecute.spring.test=false test --file sermant-integration-tests/dubbo-test/pom.xml
116+
- name: exit
117+
if: always()
118+
uses: ./.github/actions/common/exit
119+
with:
120+
processor-keyword: dubbo
121+
- name: if failure then upload error log
122+
uses: actions/upload-artifact@v3
123+
if: ${{ failure() || cancelled() }}
124+
with:
125+
name: (test-for-dubbo-lane)-(${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }})-logs
126+
path: |
127+
./*.log
128+
./logs/**/*.log
129+
if-no-files-found: warn
130+
retention-days: 2
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
name: "Dubbo3 Router Test"
2+
description: "Auto test for dubbo3.x route for plugin sermant-router"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: entry
7+
uses: ./.github/actions/common/entry
8+
with:
9+
log-dir: ./logs/dubbo3-router
10+
- name: package dubbo 3.0.x tests
11+
shell: bash
12+
if: matrix.dubbo-version == '3-0'
13+
run: mvn package -Ddubbo.version=3.0.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml
14+
- name: package dubbo 3.1.x tests
15+
shell: bash
16+
if: matrix.dubbo-version == '3-1'
17+
run: mvn package -Ddubbo.version=3.1.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml
18+
- name: package dubbo 3.2.x tests
19+
shell: bash
20+
if: matrix.dubbo-version == '3-2'
21+
run: mvn package -Ddubbo.version=3.2.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml
22+
- name: post config to local-cse
23+
shell: bash
24+
env:
25+
TEST_TYPE: router-config
26+
run: mvn test --file sermant-integration-tests/dubbo-test/pom.xml
27+
- name: echo registry model
28+
shell: bash
29+
run: |
30+
echo "=======registry-model======"-${{ matrix.registry-model }}
31+
- name: remove flowcontrol for dubbo3
32+
# flowcontrol plugin not support dubbo3.
33+
shell: bash
34+
run: |
35+
mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar.dubbo3
36+
mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar.dubbo3
37+
ls sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin
38+
- name: start dubbo3 provider service
39+
shell: bash
40+
env:
41+
dynamic.config.dynamicConfigType: KIE
42+
dynamic.config.serverAddress: 127.0.0.1:30110
43+
SERVICE_META_ENVIRONMENT: development
44+
ROUTER_PLUGIN_USE_REQUEST_ROUTER: false
45+
SERVICE_META_VERSION: 1.0.0
46+
SERVICE_META_ZONE: az1
47+
SERVER_PORT: 18021
48+
DUBBO_PROTOCOL_PORT: 18821
49+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
50+
run: |
51+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -jar \
52+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-zk-provider.log 2>&1 &
53+
- name: start second dubbo3 provider service
54+
shell: bash
55+
env:
56+
dynamic.config.dynamicConfigType: KIE
57+
dynamic.config.serverAddress: 127.0.0.1:30110
58+
SERVICE_META_ENVIRONMENT: development
59+
ROUTER_PLUGIN_USE_REQUEST_ROUTER: false
60+
SERVICE_META_PARAMETERS: group-test:gray
61+
SERVICE_META_ZONE: az1
62+
SERVICE_META_VERSION: 1.0.1
63+
SERVER_PORT: 38022
64+
DUBBO_PROTOCOL_PORT: 18822
65+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
66+
run: |
67+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -jar \
68+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-zk-provider2.log 2>&1 &
69+
- name: start third dubbo3 provider service
70+
shell: bash
71+
env:
72+
dynamic.config.dynamicConfigType: KIE
73+
dynamic.config.serverAddress: 127.0.0.1:30110
74+
SERVICE_META_ENVIRONMENT: development
75+
ROUTER_PLUGIN_USE_REQUEST_ROUTER: false
76+
SERVICE_META_PARAMETERS: group-test:red
77+
SERVICE_META_ZONE: az2
78+
SERVICE_META_VERSION: 1.0.1
79+
SERVER_PORT: 48023
80+
DUBBO_PROTOCOL_PORT: 18823
81+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
82+
run: |
83+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -jar \
84+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-zk-provider3.log 2>&1 &
85+
- name: waiting for dubbo3 provider start
86+
shell: bash
87+
run: |
88+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:18021/actuator/health 120
89+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:38022/actuator/health 120
90+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:48023/actuator/health 120
91+
- name: start dubbo3 consumer service
92+
shell: bash
93+
env:
94+
dynamic.config.dynamicConfigType: KIE
95+
dynamic.config.serverAddress: 127.0.0.1:30110
96+
SERVICE_META_ENVIRONMENT: development
97+
ROUTER_PLUGIN_USE_REQUEST_ROUTER: false
98+
SERVICE_META_PARAMETERS: group-test:gray
99+
SERVICE_META_ZONE: az1
100+
SERVER_PORT: 28020
101+
DUBBO_PROTOCOL_PORT: 18020
102+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
103+
run: |
104+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-consumer -jar \
105+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-consumer/target/dubbo-integration-consumer.jar > ${{ env.logDir }}/zookeeper-consumer.log 2>&1 &
106+
- name: waiting for dubbo3 consumer start
107+
shell: bash
108+
run: |
109+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:28020/actuator/health 120
110+
- name: start controller service
111+
shell: bash
112+
env:
113+
dynamic.config.dynamicConfigType: KIE
114+
dynamic.config.serverAddress: 127.0.0.1:30110
115+
SERVICE_META_ENVIRONMENT: development
116+
ROUTER_PLUGIN_USE_REQUEST_ROUTER: false
117+
DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }}
118+
run: |
119+
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-controller -jar \
120+
sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-controller/target/dubbo-integration-controller.jar > ${{ env.logDir }}/cse-controller.log 2>&1 &
121+
- name: waiting for controller start
122+
shell: bash
123+
run: |
124+
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:28019/actuator/health 120
125+
- name: Sleep for 20 Seconds
126+
shell: bash
127+
run: sleep 20
128+
- name: restore flowcontrol for dubbo3
129+
# flowcontrol plugin not support dubbo3.
130+
shell: bash
131+
run: |
132+
mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar.dubbo3 sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar
133+
mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar.dubbo3 sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar
134+
ls sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin
135+
- name: integration test dubbo3
136+
shell: bash
137+
env:
138+
TEST_TYPE: router
139+
run: mvn -Dexecute.spring.test=false test --file sermant-integration-tests/dubbo-test/pom.xml
140+
- name: exit
141+
if: always()
142+
uses: ./.github/actions/common/exit
143+
with:
144+
processor-keyword: dubbo
145+
- name: if failure then upload error log
146+
uses: actions/upload-artifact@v3
147+
if: ${{ failure() || cancelled() }}
148+
with:
149+
name: (test-for-dubbo3-router)-(${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }})-logs
150+
path: |
151+
./*.log
152+
./logs/**/*.log
153+
if-no-files-found: warn
154+
retention-days: 2

0 commit comments

Comments
 (0)