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 2021/09/06 14:37:54 UTC
[GitHub] [dubbo] plusmancn opened a new pull request #8699: [3.0] Add preferredProtocol fallback strategy
plusmancn opened a new pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699
Fixes #8698
--
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 edited a comment on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-913738197
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?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 [#8699](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3b8fa5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/7c8662e99ebdcc66f08d089bc3e7493e4d2d89cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7c8662e) will **decrease** coverage by `0.18%`.
> The diff coverage is `85.71%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8699/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8699 +/- ##
============================================
- Coverage 63.66% 63.48% -0.19%
+ Complexity 311 310 -1
============================================
Files 1141 1146 +5
Lines 47815 48152 +337
Branches 7162 7231 +69
============================================
+ Hits 30441 30568 +127
- Misses 14013 14196 +183
- Partials 3361 3388 +27
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ig/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9TZXJ2aWNlSW5zdGFuY2VIb3N0UG9ydEN1c3RvbWl6ZXIuamF2YQ==) | `93.75% <85.71%> (+13.75%)` | :arrow_up: |
| [.../org/apache/dubbo/rpc/model/ServiceDescriptor.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvU2VydmljZURlc2NyaXB0b3IuamF2YQ==) | `75.60% <0.00%> (-24.40%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-13.80%)` | :arrow_down: |
| [.../remoting/transport/netty4/NettyServerHandler.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5U2VydmVySGFuZGxlci5qYXZh) | `62.79% <0.00%> (-9.31%)` | :arrow_down: |
| [...he/dubbo/rpc/model/FrameworkServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvRnJhbWV3b3JrU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `78.78% <0.00%> (-7.88%)` | :arrow_down: |
| [...pache/dubbo/rpc/model/ModuleServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `64.04% <0.00%> (-7.70%)` | :arrow_down: |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `77.58% <0.00%> (-6.90%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/rpc/model/ModuleModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlTW9kZWwuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [...ache/dubbo/registry/client/InstanceAddressURL.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvSW5zdGFuY2VBZGRyZXNzVVJMLmphdmE=) | `51.65% <0.00%> (-6.04%)` | :arrow_down: |
| [.../org/apache/dubbo/config/MetadataReportConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0YWRhdGFSZXBvcnRDb25maWcuamF2YQ==) | `83.13% <0.00%> (-6.03%)` | :arrow_down: |
| ... and [101 more](https://codecov.io/gh/apache/dubbo/pull/8699/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7c8662e...f3b8fa5](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] EarthChen commented on a change in pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
EarthChen commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703181785
##########
File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizer.java
##########
@@ -56,11 +60,19 @@ public void customize(ServiceInstance serviceInstance) {
break;
}
}
+
+ if (host == null || port == -1) {
+ logger.warn("The default preferredProtocol \"" + preferredProtocol + "\" is not found, fall back to the strategy that pick the first found protocol. Please try to modify the config of dubbo.application.protocol");
+ URL url = urls.iterator().next();
+ host = url.getHost();
+ port = url.getPort();
+ }
} else {
URL url = urls.iterator().next();
Review comment:
Set does not guarantee order
--
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 #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-913738197
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?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 [#8699](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e9807d5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/7c8662e99ebdcc66f08d089bc3e7493e4d2d89cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7c8662e) will **increase** coverage by `0.07%`.
> The diff coverage is `85.71%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8699/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8699 +/- ##
============================================
+ Coverage 63.66% 63.73% +0.07%
- Complexity 311 313 +2
============================================
Files 1141 1142 +1
Lines 47815 48084 +269
Branches 7162 7249 +87
============================================
+ Hits 30441 30646 +205
- Misses 14013 14063 +50
- Partials 3361 3375 +14
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ig/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9TZXJ2aWNlSW5zdGFuY2VIb3N0UG9ydEN1c3RvbWl6ZXIuamF2YQ==) | `81.25% <85.71%> (+1.25%)` | :arrow_up: |
| [.../org/apache/dubbo/rpc/model/ServiceDescriptor.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvU2VydmljZURlc2NyaXB0b3IuamF2YQ==) | `75.60% <0.00%> (-24.40%)` | :arrow_down: |
| [...he/dubbo/rpc/model/FrameworkServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvRnJhbWV3b3JrU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `78.78% <0.00%> (-7.88%)` | :arrow_down: |
| [...pache/dubbo/rpc/model/ModuleServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `64.04% <0.00%> (-7.70%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/rpc/model/ModuleModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlTW9kZWwuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [...ache/dubbo/registry/client/InstanceAddressURL.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvSW5zdGFuY2VBZGRyZXNzVVJMLmphdmE=) | `51.65% <0.00%> (-6.04%)` | :arrow_down: |
| [.../org/apache/dubbo/config/MetadataReportConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0YWRhdGFSZXBvcnRDb25maWcuamF2YQ==) | `83.13% <0.00%> (-6.03%)` | :arrow_down: |
| [...java/org/apache/dubbo/rpc/model/ProviderModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvUHJvdmlkZXJNb2RlbC5qYXZh) | `38.23% <0.00%> (-5.84%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/metadata/MetadataInfo.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9NZXRhZGF0YUluZm8uamF2YQ==) | `61.16% <0.00%> (-5.83%)` | :arrow_down: |
| [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `77.66% <0.00%> (-5.49%)` | :arrow_down: |
| ... and [90 more](https://codecov.io/gh/apache/dubbo/pull/8699/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7c8662e...e9807d5](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] plusmancn commented on a change in pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
plusmancn commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703152958
##########
File path: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizerTest.java
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config.metadata;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.metadata.WritableMetadataService;
+import org.apache.dubbo.registry.client.DefaultServiceInstance;
+import org.apache.dubbo.registry.client.ServiceInstance;
+import org.apache.dubbo.rpc.model.ApplicationModel;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test for https://github.com/apache/dubbo/issues/8698
+ */
+class ServiceInstanceHostPortCustomizerTest {
+ private static ServiceInstanceHostPortCustomizer serviceInstanceHostPortCustomizer;
+
+ @BeforeAll
+ public static void setUp() {
+ serviceInstanceHostPortCustomizer = new ServiceInstanceHostPortCustomizer();
+ }
+
+ @Test
+ void customizePreferredProtocol() {
+ ApplicationModel applicationModel = ApplicationModel.defaultModel();
+ applicationModel.getApplicationConfigManager().setApplication(new ApplicationConfig("service-preferredProtocol"));
Review comment:
It's not safe for shared-instance
The CI has failed in this.
--
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 edited a comment on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-913738197
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?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 [#8699](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3b8fa5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/7c8662e99ebdcc66f08d089bc3e7493e4d2d89cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7c8662e) will **increase** coverage by `0.01%`.
> The diff coverage is `85.71%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8699/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8699 +/- ##
============================================
+ Coverage 63.66% 63.67% +0.01%
Complexity 311 311
============================================
Files 1141 1146 +5
Lines 47815 48152 +337
Branches 7162 7253 +91
============================================
+ Hits 30441 30661 +220
- Misses 14013 14122 +109
- Partials 3361 3369 +8
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ig/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9TZXJ2aWNlSW5zdGFuY2VIb3N0UG9ydEN1c3RvbWl6ZXIuamF2YQ==) | `93.75% <85.71%> (+13.75%)` | :arrow_up: |
| [.../org/apache/dubbo/rpc/model/ServiceDescriptor.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvU2VydmljZURlc2NyaXB0b3IuamF2YQ==) | `75.60% <0.00%> (-24.40%)` | :arrow_down: |
| [...he/dubbo/rpc/model/FrameworkServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvRnJhbWV3b3JrU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `78.78% <0.00%> (-7.88%)` | :arrow_down: |
| [...pache/dubbo/rpc/model/ModuleServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `64.04% <0.00%> (-7.70%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/rpc/model/ModuleModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlTW9kZWwuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [...ache/dubbo/registry/client/InstanceAddressURL.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvSW5zdGFuY2VBZGRyZXNzVVJMLmphdmE=) | `51.65% <0.00%> (-6.04%)` | :arrow_down: |
| [.../org/apache/dubbo/config/MetadataReportConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0YWRhdGFSZXBvcnRDb25maWcuamF2YQ==) | `83.13% <0.00%> (-6.03%)` | :arrow_down: |
| [...java/org/apache/dubbo/rpc/model/ProviderModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvUHJvdmlkZXJNb2RlbC5qYXZh) | `38.23% <0.00%> (-5.84%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/metadata/MetadataInfo.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9NZXRhZGF0YUluZm8uamF2YQ==) | `61.16% <0.00%> (-5.83%)` | :arrow_down: |
| [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `77.66% <0.00%> (-5.49%)` | :arrow_down: |
| ... and [101 more](https://codecov.io/gh/apache/dubbo/pull/8699/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7c8662e...f3b8fa5](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov-commenter edited a comment on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-913738197
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?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 [#8699](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e9807d5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/7c8662e99ebdcc66f08d089bc3e7493e4d2d89cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7c8662e) will **increase** coverage by `0.09%`.
> The diff coverage is `85.71%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8699/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8699 +/- ##
============================================
+ Coverage 63.66% 63.75% +0.09%
- Complexity 311 313 +2
============================================
Files 1141 1142 +1
Lines 47815 48084 +269
Branches 7162 7249 +87
============================================
+ Hits 30441 30656 +215
- Misses 14013 14058 +45
- Partials 3361 3370 +9
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ig/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9TZXJ2aWNlSW5zdGFuY2VIb3N0UG9ydEN1c3RvbWl6ZXIuamF2YQ==) | `81.25% <85.71%> (+1.25%)` | :arrow_up: |
| [.../org/apache/dubbo/rpc/model/ServiceDescriptor.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvU2VydmljZURlc2NyaXB0b3IuamF2YQ==) | `75.60% <0.00%> (-24.40%)` | :arrow_down: |
| [...he/dubbo/rpc/model/FrameworkServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvRnJhbWV3b3JrU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `78.78% <0.00%> (-7.88%)` | :arrow_down: |
| [...pache/dubbo/rpc/model/ModuleServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `64.04% <0.00%> (-7.70%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/rpc/model/ModuleModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlTW9kZWwuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [...ache/dubbo/registry/client/InstanceAddressURL.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvSW5zdGFuY2VBZGRyZXNzVVJMLmphdmE=) | `51.65% <0.00%> (-6.04%)` | :arrow_down: |
| [.../org/apache/dubbo/config/MetadataReportConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0YWRhdGFSZXBvcnRDb25maWcuamF2YQ==) | `83.13% <0.00%> (-6.03%)` | :arrow_down: |
| [...java/org/apache/dubbo/rpc/model/ProviderModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvUHJvdmlkZXJNb2RlbC5qYXZh) | `38.23% <0.00%> (-5.84%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/metadata/MetadataInfo.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9NZXRhZGF0YUluZm8uamF2YQ==) | `61.16% <0.00%> (-5.83%)` | :arrow_down: |
| [...va/org/apache/dubbo/config/ConfigCenterConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvQ29uZmlnQ2VudGVyQ29uZmlnLmphdmE=) | `82.10% <0.00%> (-5.27%)` | :arrow_down: |
| ... and [94 more](https://codecov.io/gh/apache/dubbo/pull/8699/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7c8662e...e9807d5](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov-commenter edited a comment on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-913738197
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?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 [#8699](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3b8fa5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/7c8662e99ebdcc66f08d089bc3e7493e4d2d89cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7c8662e) will **decrease** coverage by `0.11%`.
> The diff coverage is `85.71%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8699/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8699 +/- ##
============================================
- Coverage 63.66% 63.55% -0.12%
Complexity 311 311
============================================
Files 1141 1146 +5
Lines 47815 48152 +337
Branches 7162 7253 +91
============================================
+ Hits 30441 30602 +161
- Misses 14013 14170 +157
- Partials 3361 3380 +19
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ig/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9TZXJ2aWNlSW5zdGFuY2VIb3N0UG9ydEN1c3RvbWl6ZXIuamF2YQ==) | `93.75% <85.71%> (+13.75%)` | :arrow_up: |
| [.../org/apache/dubbo/rpc/model/ServiceDescriptor.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvU2VydmljZURlc2NyaXB0b3IuamF2YQ==) | `75.60% <0.00%> (-24.40%)` | :arrow_down: |
| [...he/dubbo/rpc/model/FrameworkServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvRnJhbWV3b3JrU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `78.78% <0.00%> (-7.88%)` | :arrow_down: |
| [...pache/dubbo/rpc/model/ModuleServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `64.04% <0.00%> (-7.70%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `68.96% <0.00%> (-6.90%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/rpc/model/ModuleModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlTW9kZWwuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [...ache/dubbo/registry/client/InstanceAddressURL.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvSW5zdGFuY2VBZGRyZXNzVVJMLmphdmE=) | `51.65% <0.00%> (-6.04%)` | :arrow_down: |
| [.../org/apache/dubbo/config/MetadataReportConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0YWRhdGFSZXBvcnRDb25maWcuamF2YQ==) | `83.13% <0.00%> (-6.03%)` | :arrow_down: |
| [...java/org/apache/dubbo/rpc/model/ProviderModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvUHJvdmlkZXJNb2RlbC5qYXZh) | `38.23% <0.00%> (-5.84%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/metadata/MetadataInfo.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9NZXRhZGF0YUluZm8uamF2YQ==) | `61.16% <0.00%> (-5.83%)` | :arrow_down: |
| ... and [93 more](https://codecov.io/gh/apache/dubbo/pull/8699/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7c8662e...f3b8fa5](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] guohao commented on a change in pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
guohao commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703178747
##########
File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizer.java
##########
@@ -56,11 +60,19 @@ public void customize(ServiceInstance serviceInstance) {
break;
}
}
+
+ if (host == null || port == -1) {
+ logger.warn("The default preferredProtocol \"" + preferredProtocol + "\" is not found, fall back to the strategy that pick the first found protocol. Please try to modify the config of dubbo.application.protocol");
+ URL url = urls.iterator().next();
+ host = url.getHost();
+ port = url.getPort();
+ }
} else {
URL url = urls.iterator().next();
Review comment:
It is undeterminable that which protocol will be selected
--
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] plusmancn commented on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
plusmancn commented on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-914154704
> Don't merge now, the unit test still has a little problem. I am trying to solve this.
Done! The problem of the unit test had been fixed.
It can be merged. @AlbumenJ
--
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 edited a comment on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-913738197
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?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 [#8699](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3b8fa5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/7c8662e99ebdcc66f08d089bc3e7493e4d2d89cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7c8662e) will **increase** coverage by `0.03%`.
> The diff coverage is `85.71%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8699/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #8699 +/- ##
============================================
+ Coverage 63.66% 63.70% +0.03%
- Complexity 311 312 +1
============================================
Files 1141 1146 +5
Lines 47815 48152 +337
Branches 7162 7253 +91
============================================
+ Hits 30441 30673 +232
- Misses 14013 14114 +101
- Partials 3361 3365 +4
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ig/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9tZXRhZGF0YS9TZXJ2aWNlSW5zdGFuY2VIb3N0UG9ydEN1c3RvbWl6ZXIuamF2YQ==) | `93.75% <85.71%> (+13.75%)` | :arrow_up: |
| [.../org/apache/dubbo/rpc/model/ServiceDescriptor.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvU2VydmljZURlc2NyaXB0b3IuamF2YQ==) | `75.60% <0.00%> (-24.40%)` | :arrow_down: |
| [...he/dubbo/rpc/model/FrameworkServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvRnJhbWV3b3JrU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `78.78% <0.00%> (-7.88%)` | :arrow_down: |
| [...pache/dubbo/rpc/model/ModuleServiceRepository.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlU2VydmljZVJlcG9zaXRvcnkuamF2YQ==) | `64.04% <0.00%> (-7.70%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/rpc/model/ModuleModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvTW9kdWxlTW9kZWwuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [...ache/dubbo/registry/client/InstanceAddressURL.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvSW5zdGFuY2VBZGRyZXNzVVJMLmphdmE=) | `51.65% <0.00%> (-6.04%)` | :arrow_down: |
| [.../org/apache/dubbo/config/MetadataReportConfig.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb25maWcvTWV0YWRhdGFSZXBvcnRDb25maWcuamF2YQ==) | `83.13% <0.00%> (-6.03%)` | :arrow_down: |
| [...java/org/apache/dubbo/rpc/model/ProviderModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvUHJvdmlkZXJNb2RlbC5qYXZh) | `38.23% <0.00%> (-5.84%)` | :arrow_down: |
| [...n/java/org/apache/dubbo/metadata/MetadataInfo.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9NZXRhZGF0YUluZm8uamF2YQ==) | `61.16% <0.00%> (-5.83%)` | :arrow_down: |
| [...a/org/apache/dubbo/rpc/model/ApplicationModel.java](https://codecov.io/gh/apache/dubbo/pull/8699/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvbW9kZWwvQXBwbGljYXRpb25Nb2RlbC5qYXZh) | `77.66% <0.00%> (-5.49%)` | :arrow_down: |
| ... and [104 more](https://codecov.io/gh/apache/dubbo/pull/8699/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7c8662e...f3b8fa5](https://codecov.io/gh/apache/dubbo/pull/8699?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] guohao commented on a change in pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
guohao commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703178747
##########
File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizer.java
##########
@@ -56,11 +60,19 @@ public void customize(ServiceInstance serviceInstance) {
break;
}
}
+
+ if (host == null || port == -1) {
+ logger.warn("The default preferredProtocol \"" + preferredProtocol + "\" is not found, fall back to the strategy that pick the first found protocol. Please try to modify the config of dubbo.application.protocol");
+ URL url = urls.iterator().next();
+ host = url.getHost();
+ port = url.getPort();
+ }
} else {
URL url = urls.iterator().next();
Review comment:
It is undeterminable that which protocol will be selected
--
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] guohao merged pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
guohao merged pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699
--
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] plusmancn commented on a change in pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
plusmancn commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703236652
##########
File path: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizerTest.java
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config.metadata;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.metadata.WritableMetadataService;
+import org.apache.dubbo.registry.client.DefaultServiceInstance;
+import org.apache.dubbo.registry.client.ServiceInstance;
+import org.apache.dubbo.rpc.model.ApplicationModel;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test for https://github.com/apache/dubbo/issues/8698
+ */
+class ServiceInstanceHostPortCustomizerTest {
+ private static ServiceInstanceHostPortCustomizer serviceInstanceHostPortCustomizer;
+
+ @BeforeAll
+ public static void setUp() {
+ serviceInstanceHostPortCustomizer = new ServiceInstanceHostPortCustomizer();
+ }
+
+ @Test
+ void customizePreferredProtocol() {
+ ApplicationModel applicationModel = ApplicationModel.defaultModel();
+ applicationModel.getApplicationConfigManager().setApplication(new ApplicationConfig("service-preferredProtocol"));
Review comment:
Isolate `applicationModel` from default using multi-instacne feature
--
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] EarthChen commented on a change in pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
EarthChen commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703181785
##########
File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizer.java
##########
@@ -56,11 +60,19 @@ public void customize(ServiceInstance serviceInstance) {
break;
}
}
+
+ if (host == null || port == -1) {
+ logger.warn("The default preferredProtocol \"" + preferredProtocol + "\" is not found, fall back to the strategy that pick the first found protocol. Please try to modify the config of dubbo.application.protocol");
+ URL url = urls.iterator().next();
+ host = url.getHost();
+ port = url.getPort();
+ }
} else {
URL url = urls.iterator().next();
Review comment:
Set does not guarantee order
--
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] plusmancn commented on pull request #8699: [3.0] Add preferredProtocol fallback strategy
Posted by GitBox <gi...@apache.org>.
plusmancn commented on pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#issuecomment-914014345
Don't merge now, the unit test still has a little problem. I am trying to solve this.
--
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