You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/10/31 02:58:33 UTC

[GitHub] [dubbo] a364176773 opened a new pull request, #10855: bugfix: meatadata service support read dubbo:protocol

a364176773 opened a new pull request, #10855:
URL: https://github.com/apache/dubbo/pull/10855

   ## What is the purpose of the change
   fixes #10826
   
   
   ## Brief changelog
   
   
   ## Verifying this change
   
   
   <!-- Follow this checklist to help us incorporate your contribution quickly and easily: -->
   
   ## Checklist
   - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) 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](https://github.com/apache/dubbo-samples) project.
   - [ ] Add some description to [dubbo-website](https://github.com/apache/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](https://github.com/apache/dubbo/wiki/Software-donation-guide).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] a364176773 closed pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
a364176773 closed pull request #10855: bugfix: meatadata service support read dubbo:protocol
URL: https://github.com/apache/dubbo/pull/10855


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] a364176773 commented on a diff in pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
a364176773 commented on code in PR #10855:
URL: https://github.com/apache/dubbo/pull/10855#discussion_r1011060811


##########
dubbo-common/src/main/java/org/apache/dubbo/config/ProtocolConfig.java:
##########
@@ -579,4 +582,28 @@ public String getExtProtocol() {
     public void setExtProtocol(String extProtocol) {
         this.extProtocol = extProtocol;
     }
+
+    public void mergeProtocol(ProtocolConfig protocolConfig) {

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] a364176773 commented on a diff in pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
a364176773 commented on code in PR #10855:
URL: https://github.com/apache/dubbo/pull/10855#discussion_r1010013156


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -113,7 +117,8 @@ private ProtocolConfig generateMetadataProtocol() {
 
         ProtocolConfig protocolConfig = new ProtocolConfig();
         protocolConfig.setName(specifiedProtocol);
-
+        String serialization = getSerialization(specifiedProtocol);
+        protocolConfig.setSerialization(serialization);

Review Comment:
   > BTW, please add some uts to verify this
   
   We should do this, but need to establish a priority for the configuration reads



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] codecov-commenter commented on pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #10855:
URL: https://github.com/apache/dubbo/pull/10855#issuecomment-1299470607

   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/10855?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10855](https://codecov.io/gh/apache/dubbo/pull/10855?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b6ee71d) into [3.1](https://codecov.io/gh/apache/dubbo/commit/a0367b7da262eea80f4003f9be8f930f7e88eb31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0367b7) will **decrease** coverage by `3.81%`.
   > The diff coverage is `75.00%`.
   
   > :exclamation: Current head b6ee71d differs from pull request most recent head 31aae5e. Consider uploading reports for the commit 31aae5e to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##                3.1   #10855      +/-   ##
   ============================================
   - Coverage     68.39%   64.57%   -3.82%     
   + Complexity      534      469      -65     
   ============================================
     Files          1358     1336      -22     
     Lines         68917    56997   -11920     
     Branches      11945     8405    -3540     
   ============================================
   - Hits          47135    36808   -10327     
   + Misses        17407    16232    -1175     
   + Partials       4375     3957     -418     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/10855?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...n/java/org/apache/dubbo/config/ProtocolConfig.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvUHJvdG9jb2xDb25maWcuamF2YQ==) | `82.46% <64.70%> (-5.80%)` | :arrow_down: |
   | [...org/apache/dubbo/common/utils/CollectionUtils.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvQ29sbGVjdGlvblV0aWxzLmphdmE=) | `80.98% <88.88%> (+0.46%)` | :arrow_up: |
   | [.../metadata/ConfigurableMetadataServiceExporter.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9Db25maWd1cmFibGVNZXRhZGF0YVNlcnZpY2VFeHBvcnRlci5qYXZh) | `78.78% <100.00%> (-3.38%)` | :arrow_down: |
   | [...luster/router/script/ScriptStateRouterFactory.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL3NjcmlwdC9TY3JpcHRTdGF0ZVJvdXRlckZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...zookeeper/curator/CuratorZookeeperTransporter.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3Rpbmctem9va2VlcGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy96b29rZWVwZXIvY3VyYXRvci9DdXJhdG9yWm9va2VlcGVyVHJhbnNwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...pc/cluster/router/file/FileStateRouterFactory.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL2ZpbGUvRmlsZVN0YXRlUm91dGVyRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-80.96%)` | :arrow_down: |
   | [...o/rpc/cluster/router/script/ScriptStateRouter.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL3NjcmlwdC9TY3JpcHRTdGF0ZVJvdXRlci5qYXZh) | `0.00% <0.00%> (-73.34%)` | :arrow_down: |
   | [...ting/zookeeper/curator/CuratorZookeeperClient.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3Rpbmctem9va2VlcGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy96b29rZWVwZXIvY3VyYXRvci9DdXJhdG9yWm9va2VlcGVyQ2xpZW50LmphdmE=) | `15.38% <0.00%> (-62.83%)` | :arrow_down: |
   | [...mmon/serialize/fastjson2/FastJson2ObjectInput.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tc2VyaWFsaXphdGlvbi9kdWJiby1zZXJpYWxpemF0aW9uLWZhc3Rqc29uMi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vY29tbW9uL3NlcmlhbGl6ZS9mYXN0anNvbjIvRmFzdEpzb24yT2JqZWN0SW5wdXQuamF2YQ==) | `0.00% <0.00%> (-62.50%)` | :arrow_down: |
   | [...mon/serialize/fastjson2/FastJson2ObjectOutput.java](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tc2VyaWFsaXphdGlvbi9kdWJiby1zZXJpYWxpemF0aW9uLWZhc3Rqc29uMi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vY29tbW9uL3NlcmlhbGl6ZS9mYXN0anNvbjIvRmFzdEpzb24yT2JqZWN0T3V0cHV0LmphdmE=) | `0.00% <0.00%> (-56.25%)` | :arrow_down: |
   | ... and [365 more](https://codecov.io/gh/apache/dubbo/pull/10855/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on code in PR #10855:
URL: https://github.com/apache/dubbo/pull/10855#discussion_r1009976413


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -113,7 +117,8 @@ private ProtocolConfig generateMetadataProtocol() {
 
         ProtocolConfig protocolConfig = new ProtocolConfig();
         protocolConfig.setName(specifiedProtocol);
-
+        String serialization = getSerialization(specifiedProtocol);
+        protocolConfig.setSerialization(serialization);

Review Comment:
   BTW, please add some uts to verify this



##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -113,7 +117,8 @@ private ProtocolConfig generateMetadataProtocol() {
 
         ProtocolConfig protocolConfig = new ProtocolConfig();
         protocolConfig.setName(specifiedProtocol);
-
+        String serialization = getSerialization(specifiedProtocol);
+        protocolConfig.setSerialization(serialization);

Review Comment:
   Maybe we can merge all of the config from exist protocol config, or directly reuse(if user do not specify different port).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ merged pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
AlbumenJ merged PR #10855:
URL: https://github.com/apache/dubbo/pull/10855


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on code in PR #10855:
URL: https://github.com/apache/dubbo/pull/10855#discussion_r1011020256


##########
dubbo-common/src/main/java/org/apache/dubbo/config/ProtocolConfig.java:
##########
@@ -579,4 +582,28 @@ public String getExtProtocol() {
     public void setExtProtocol(String extProtocol) {
         this.extProtocol = extProtocol;
     }
+
+    public void mergeProtocol(ProtocolConfig protocolConfig) {

Review Comment:
   add some unit test cases for this



##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -146,6 +145,9 @@ private ProtocolConfig generateMetadataProtocol() {
         } else {
             protocolConfig.setPort(port);
         }
+        
+        applicationModel.getApplicationConfigManager().getProtocol(specifiedProtocol)
+            .ifPresent(protocolConfig::mergeProtocol);

Review Comment:
   Will this override `port` configuration?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] a364176773 commented on a diff in pull request #10855: bugfix: meatadata service support read dubbo:protocol

Posted by GitBox <gi...@apache.org>.
a364176773 commented on code in PR #10855:
URL: https://github.com/apache/dubbo/pull/10855#discussion_r1011056599


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -146,6 +145,9 @@ private ProtocolConfig generateMetadataProtocol() {
         } else {
             protocolConfig.setPort(port);
         }
+        
+        applicationModel.getApplicationConfigManager().getProtocol(specifiedProtocol)
+            .ifPresent(protocolConfig::mergeProtocol);

Review Comment:
   > Will this override `port` configuration?
   
   No, it will only work on variables with null values



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org