dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

Add NacosAppNameUtils to bridge Dubbo application name with Nacos project name

Open bpzhang opened this issue 1 week ago • 1 comments

Add NacosAppNameUtils to bridge Dubbo application name with Nacos project name

fix issue #15843

What is the purpose of the change?

Checklist

  • [x] Make sure there is a GitHub_issue 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 project.
  • [x] Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

bpzhang avatar Dec 15 '25 05:12 bpzhang

Codecov Report

:x: Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 60.77%. Comparing base (3feacb8) to head (482991f).

Files with missing lines Patch % Lines
...g/apache/dubbo/common/nacos/NacosAppNameUtils.java 93.33% 0 Missing and 2 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15851      +/-   ##
============================================
- Coverage     60.78%   60.77%   -0.02%     
+ Complexity    11705    11700       -5     
============================================
  Files          1938     1939       +1     
  Lines         88692    88726      +34     
  Branches      13387    13395       +8     
============================================
+ Hits          53915    53923       +8     
- Misses        29250    29267      +17     
- Partials       5527     5536       +9     
Flag Coverage Δ
integration-tests-java21 32.30% <20.58%> (-0.02%) :arrow_down:
integration-tests-java8 32.43% <20.58%> (-0.10%) :arrow_down:
samples-tests-java21 32.03% <20.58%> (+<0.01%) :arrow_up:
samples-tests-java8 29.71% <20.58%> (+<0.01%) :arrow_up:
unit-tests-java11 59.09% <94.11%> (+<0.01%) :arrow_up:
unit-tests-java17 58.57% <94.11%> (+0.02%) :arrow_up:
unit-tests-java21 58.59% <94.11%> (+<0.01%) :arrow_up:
unit-tests-java25 58.55% <94.11%> (+0.01%) :arrow_up:
unit-tests-java8 59.11% <94.11%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Dec 15 '25 06:12 codecov-commenter

it's might have more concise way to fix https://github.com/apache/dubbo/issues/15843 see details at https://github.com/apache/dubbo/pull/15872

zrlw avatar Dec 17 '25 02:12 zrlw

This issue is not just about the subscription page; it involves all places where names are displayed in Nacos, including the configuration center and metadataReport. The simplest way to address this issue is to add the -Dproject.name property during Java startup. This pull request aims to resolve this problem.

bpzhang avatar Dec 17 '25 02:12 bpzhang

This issue is not just about the subscription page; it involves all places where names are displayed in Nacos, including the configuration center and metadataReport. The simplest way to address this issue is to add the -Dproject.name property during Java startup. This pull request aims to resolve this problem.

another issue should be sumbit if there are other problems.

zrlw avatar Dec 17 '25 06:12 zrlw