Skip to content

Commit

Permalink
适配3.0-3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chengyouling committed Feb 27, 2025
1 parent 13c493e commit d16a361
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
10 changes: 0 additions & 10 deletions .github/actions/scenarios/dubbo/dubbo3-flow/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ runs:
uses: ./.github/actions/common/entry
with:
log-dir: ./logs/dubbo3-flow
- name: add load rule.yaml configuration for dubbo3 flow test
shell: bash
run: |
mv -f sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/ProviderApplication.java sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/ProviderApplication.java.banck
mv -f sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/Dubbo3ProviderApplication.java.banck sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/Dubbo3ProviderApplication.java
- name: package dubbo 3.0.x tests
shell: bash
if: matrix.dubbo-version == '3-0'
Expand Down Expand Up @@ -53,11 +48,6 @@ runs:
env:
TEST_TYPE: dubbo3-flow
run: mvn test --file sermant-integration-tests/dubbo-test/pom.xml
- name: reset Application file
shell: bash
run: |
mv -f sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/ProviderApplication.java.banck sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/ProviderApplication.java
mv -f sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/Dubbo3ProviderApplication.java sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/Dubbo3ProviderApplication.java.banck
- name: mvn clean
shell: bash
run: mvn clean --file sermant-integration-tests/dubbo-test/pom.xml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2025-2025 Sermant Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.sermant.flowcontrol;

/**
* Intercept the invoke method of org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter
* for dubbo3.0-3.1 consumer
*
* @author chengyouling
* @since 2025-02-27
*/
public class ConsumerContextFilterDeclarer extends DubboDeclarer {
private static final String ENHANCE_CLASS = "org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter";

private static final String INTERCEPT_CLASS = ApacheDubboInterceptor.class.getCanonicalName();

/**
* apache dubbo Declarer
*/
public ConsumerContextFilterDeclarer() {
super(ENHANCE_CLASS, INTERCEPT_CLASS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* Intercept the invoke method of org.apache.dubbo.metrics.filter.MetricsFilter
* for dubbo3.0-3.2 consumer
* for dubbo3.2 consumer
*
* @author chengyouling
* @since 2025-02-27
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ io.sermant.flowcontrol.AlibabaDubboDeclarer
io.sermant.flowcontrol.ApacheDubboDeclarer
io.sermant.flowcontrol.ConsumerRpcExceptionFilterDeclarer
io.sermant.flowcontrol.MetricsFilterDeclarer
io.sermant.flowcontrol.ConsumerContextFilterDeclarer
io.sermant.flowcontrol.config.DubboServiceNameDeclarer
io.sermant.flowcontrol.config.ApacheDubboConfigDeclarer
io.sermant.flowcontrol.config.AlibabaDubboConfigDeclarer
Expand Down

0 comments on commit d16a361

Please sign in to comment.