fix(nacos): Add application key to consumer subscribe URL
Fixes #15843
The subscriber URL constructed in NacosRegistry for the non-compatible mode was missing the application key, causing the application name to default to "unknown" in the Nacos client metadata. This commit adds the CommonConstants.APPLICATION_KEY parameter using the consumer URL's application name.
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?
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 60.78%. Comparing base (3feacb8) to head (59564d9).
Additional details and impacted files
@@ Coverage Diff @@
## 3.3 #15872 +/- ##
============================================
- Coverage 60.78% 60.78% -0.01%
- Complexity 11705 11708 +3
============================================
Files 1938 1938
Lines 88692 88694 +2
Branches 13387 13387
============================================
- Hits 53915 53914 -1
- Misses 29250 29253 +3
Partials 5527 5527
| Flag | Coverage Δ | |
|---|---|---|
| integration-tests-java21 | 32.32% <100.00%> (+<0.01%) |
:arrow_up: |
| integration-tests-java8 | 32.44% <100.00%> (-0.09%) |
:arrow_down: |
| samples-tests-java21 | 32.03% <100.00%> (-0.01%) |
:arrow_down: |
| samples-tests-java8 | 29.72% <100.00%> (+0.01%) |
:arrow_up: |
| unit-tests-java11 | 59.10% <100.00%> (+0.01%) |
:arrow_up: |
| unit-tests-java17 | 58.54% <100.00%> (-0.02%) |
:arrow_down: |
| unit-tests-java21 | 58.59% <100.00%> (+<0.01%) |
:arrow_up: |
| unit-tests-java25 | 58.52% <100.00%> (-0.02%) |
:arrow_down: |
| unit-tests-java8 | 59.09% <100.00%> (-0.01%) |
:arrow_down: |
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.
please remove: '// <-- Your actual fix'
@heliang666s:
The unnecessary comment has been removed as requested, and I have pushed the new commit (style: remove unnecessary comment...).
I also confirmed the build still passes locally after the change. Ready for your final re-review! Thank you.