You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "zhaoyunxing92 (via GitHub)" <gi...@apache.org> on 2023/12/21 16:40:27 UTC
[PR] feat:DubboService annotation support custom serialization [dubbo]
zhaoyunxing92 opened a new pull request, #13553:
URL: https://github.com/apache/dubbo/pull/13553
## What is the purpose of the change
- DubboService annotation support custom serialization
- Serialization key verify when starting
## 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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on code in PR #13553:
URL: https://github.com/apache/dubbo/pull/13553#discussion_r1434651939
##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java:
##########
@@ -602,6 +603,11 @@ public static void validateProtocolConfig(ProtocolConfig config) {
checkMultiExtension(config.getScopeModel(), Codec2.class, CODEC_KEY, config.getCodec());
checkMultiExtension(
config.getScopeModel(), Serialization.class, SERIALIZATION_KEY, config.getSerialization());
+ checkMultiExtension(
+ config.getScopeModel(),
+ Serialization.class,
+ PREFER_SERIALIZATION_KEY,
+ config.getPreferSerialization());
Review Comment:
The value of `prefer.serialization` should be splitted first cause it can be `fastjson2,hessian2`.
--
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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13553:
URL: https://github.com/apache/dubbo/pull/13553#issuecomment-1869920296
## [](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=13553) **Quality Gate passed**
Kudos, no new issues were introduced!
[0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13553&resolved=false&inNewCodePeriod=true)
[0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13553&resolved=false&inNewCodePeriod=true)
[100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13553&metric=new_coverage&view=list)
[12.1% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13553&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=13553)
--
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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #13553:
URL: https://github.com/apache/dubbo/pull/13553#issuecomment-1868217276
## [Codecov](https://app.codecov.io/gh/apache/dubbo/pull/13553?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`cb8d7a3`)](https://app.codecov.io/gh/apache/dubbo/commit/cb8d7a36f92c54ede87a05ddee62253ebc93db12?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 70.35% compared to head [(`f9a1bf6`)](https://app.codecov.io/gh/apache/dubbo/pull/13553?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 70.39%.
> Report is 2 commits behind head on 3.2.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 3.2 #13553 +/- ##
==========================================
+ Coverage 70.35% 70.39% +0.04%
==========================================
Files 1603 1603
Lines 69886 69892 +6
Branches 10092 10092
==========================================
+ Hits 49165 49201 +36
+ Misses 16096 16054 -42
- Partials 4625 4637 +12
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dubbo/pull/13553?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "zhaoyunxing92 (via GitHub)" <gi...@apache.org>.
zhaoyunxing92 commented on code in PR #13553:
URL: https://github.com/apache/dubbo/pull/13553#discussion_r1434658088
##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java:
##########
@@ -602,6 +603,11 @@ public static void validateProtocolConfig(ProtocolConfig config) {
checkMultiExtension(config.getScopeModel(), Codec2.class, CODEC_KEY, config.getCodec());
checkMultiExtension(
config.getScopeModel(), Serialization.class, SERIALIZATION_KEY, config.getSerialization());
+ checkMultiExtension(
+ config.getScopeModel(),
+ Serialization.class,
+ PREFER_SERIALIZATION_KEY,
+ config.getPreferSerialization());
Review Comment:
[ConfigValidationUtils.java#L695](https://github.com/apache/dubbo/blob/3.2/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java#L695) value has been splitted
--
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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13553:
URL: https://github.com/apache/dubbo/pull/13553#issuecomment-1868216584
## [](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=13553) **Quality Gate passed**
Kudos, no new issues were introduced!
[0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13553&resolved=false&inNewCodePeriod=true)
[0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13553&resolved=false&inNewCodePeriod=true)
[100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13553&metric=new_coverage&view=list)
[14.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13553&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=13553)
--
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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ merged PR #13553:
URL: https://github.com/apache/dubbo/pull/13553
--
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
Re: [PR] feat:DubboService annotation support custom serialization [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on code in PR #13553:
URL: https://github.com/apache/dubbo/pull/13553#discussion_r1436069489
##########
dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java:
##########
@@ -70,6 +70,17 @@ void testValidateProtocolConfig() {
ConfigValidationUtils.validateProtocolConfig(protocolConfig);
}
+ @Test
+ void testValidateProtocolConfigSerialization() {
+ ProtocolConfig protocolConfig = new ProtocolConfig();
+ protocolConfig.setCodec("exchange");
+ protocolConfig.setName("dubbo");
+ protocolConfig.setHost("host");
+ protocolConfig.setSerialization("fastjson2");
+ protocolConfig.setPreferSerialization("hessian2,java,compactedjava,nativejava");
+ ConfigValidationUtils.validateProtocolConfig(protocolConfig);
Review Comment:
Pls add a test case that violate the rule.
--
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