Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with nacos grouping via group #8320

Merged
merged 2 commits into from
Jul 30, 2021

Conversation

xiaoheng1
Copy link
Contributor

What is the purpose of the change

Compatible with nacos grouping via group

see #8317

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2021

Codecov Report

Merging #8320 (8ef5908) into 3.0 (1abc66a) will decrease coverage by 0.41%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.0    #8320      +/-   ##
============================================
- Coverage     63.93%   63.51%   -0.42%     
- Complexity      311      312       +1     
============================================
  Files          1078     1099      +21     
  Lines         45728    46050     +322     
  Branches       6862     6953      +91     
============================================
+ Hits          29235    29250      +15     
- Misses        13237    13527     +290     
- Partials       3256     3273      +17     
Impacted Files Coverage Δ
...o/registry/nacos/util/NacosNamingServiceUtils.java 0.00% <0.00%> (ø)
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 81.13% <0.00%> (-11.33%) ⬇️
...va/org/apache/dubbo/registry/RegistryNotifier.java 85.71% <0.00%> (-10.96%) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 65.21% <0.00%> (-4.35%) ⬇️
...ry/client/metadata/MetadataServiceNameMapping.java 73.68% <0.00%> (-2.68%) ⬇️
...stry/client/ServiceDiscoveryRegistryDirectory.java 47.36% <0.00%> (-0.91%) ⬇️
...apache/dubbo/common/extension/ExtensionLoader.java 79.00% <0.00%> (-0.88%) ⬇️
...org/apache/dubbo/config/context/ConfigManager.java 75.94% <0.00%> (-0.69%) ⬇️
...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java 65.38% <0.00%> (-0.59%) ⬇️
...g/apache/dubbo/config/AbstractInterfaceConfig.java 86.75% <0.00%> (-0.52%) ⬇️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1abc66a...8ef5908. Read the comment docs.

@@ -183,6 +183,8 @@

String GROUP_KEY = "group";

String NACOS_GROUP_KEY = "nacos.group";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if we move this constant to dubbo-registry-nacos module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. i will modify it.

@xiaoheng1 xiaoheng1 requested a review from AlbumenJ July 23, 2021 07:21
@@ -91,7 +93,9 @@ public static ServiceInstance toServiceInstance(Instance instance) {
* @since 2.7.5
*/
public static String getGroup(URL connectionURL) {
return connectionURL.getParameter("nacos.group", DEFAULT_GROUP);
// Compatible with nacos grouping via group.
String group = connectionURL.getParameter(GROUP_KEY, DEFAULT_GROUP);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use dubbo as the default group will be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is modified to dubbo, then the nacos registration center and configuration center side also need to be adjusted synchronously. This impact is relatively large.

@xiaoheng1 xiaoheng1 requested a review from horizonzy July 28, 2021 09:37
@AlbumenJ AlbumenJ merged commit e5aaeff into apache:3.0 Jul 30, 2021
haoyann pushed a commit to haoyann/dubbo that referenced this pull request Aug 2, 2021
* Compatible with nacos grouping via group

* move nacos.group to dubbo.registry.nacos module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants