Skip to content

Commit

Permalink
修改获取Version
Browse files Browse the repository at this point in the history
Signed-off-by: chengyouling <[email protected]>
  • Loading branch information
chengyouling committed Feb 19, 2025
1 parent 8331b74 commit ce53f9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/dubbo_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ jobs:
uses: ./.github/actions/scenarios/dubbo/removal
test-for-dubbo3:
name: Test for dubbo3.x
if: needs.set-execution-conditions.outputs.enableDubbo3Router == 'true'
|| needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true'
|| needs.set-execution-conditions.outputs.enableDubbo3Flow == 'true'
if: needs.set-execution-conditions.outputs.enableDubbo3Router == 'true' || needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true' || needs.set-execution-conditions.outputs.enableDubbo3Flow == 'true'
runs-on: ubuntu-latest
needs: [set-execution-conditions, download-midwares-and-cache, build-agent-and-cache ]
strategy:
Expand Down Expand Up @@ -245,6 +243,6 @@ jobs:
- name: (dubbo3.x lane) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }}
if: needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true'
uses: ./.github/actions/scenarios/dubbo/lane-dubbo3
- name: (dubbo common) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }}
- name: (dubbo3.x flow) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }}
if: needs.set-execution-conditions.outputs.enableDubbo3Flow == 'true'
uses: ./.github/actions/scenarios/dubbo/dubbo3-flow
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import java.util.Map;
import java.util.Optional;

import org.apache.dubbo.common.Version;

Check failure on line 26 in sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/io/sermant/flowcontrol/common/util/DubboAttachmentsHelper.java

View workflow job for this annotation

GitHub Actions / Checkstyle

[Checkstyle Check] reported by reviewdog 🐶 Wrong order for 'org.apache.dubbo.common.Version' import. Raw Output: /home/runner/work/Sermant/Sermant/./sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/io/sermant/flowcontrol/common/util/DubboAttachmentsHelper.java:26:1: error: Wrong order for 'org.apache.dubbo.common.Version' import. (com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck)

/**
* Request body conversion tool class, mainly based on reflection
*
Expand Down Expand Up @@ -57,6 +59,9 @@ public static Map<String, String> resolveAttachments(Object invocation, boolean
return Collections.emptyMap();
}
String dubboVersion = invocation.getClass().getPackage().getImplementationVersion();
if (dubboVersion == null) {
dubboVersion = Version.getVersion();
}
final Map<String, String> attachments = new HashMap<>();
if (isApache) {
if (dubboVersion.startsWith(DUBBO_3X_PREFIX)) {
Expand Down

0 comments on commit ce53f9c

Please sign in to comment.