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/08/10 02:03:28 UTC
[GitHub] [dubbo] sparkzxl opened a new pull request, #10434: fix validate violations is swallowed by ValidationException for issue#10415
sparkzxl opened a new pull request, #10434:
URL: https://github.com/apache/dubbo/pull/10434
## What is the purpose of the change
## 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] AlbumenJ commented on a diff in pull request #10434: fix validate violations is swallowed by ValidationException for issue#10415
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on code in PR #10434:
URL: https://github.com/apache/dubbo/pull/10434#discussion_r942432813
##########
dubbo-filter/dubbo-filter-validation/src/main/java/org/apache/dubbo/validation/support/jvalidation/JValidator.java:
##########
@@ -275,30 +275,30 @@ public void validate(String methodName, Class<?>[] parameterTypes, Object[] argu
groups.add(1, clazz);
// convert list to array
- Class<?>[] classgroups = groups.toArray(new Class[groups.size()]);
+ Class<?>[] classGroups = groups.toArray(new Class[groups.size()]);
Object parameterBean = getMethodParameterBean(clazz, method, arguments);
if (parameterBean != null) {
- violations.addAll(validator.validate(parameterBean, classgroups ));
+ violations.addAll(validator.validate(parameterBean, classGroups));
}
for (Object arg : arguments) {
- validate(violations, arg, classgroups);
- }
-
- if (!violations.isEmpty()) {
- logger.info("Failed to validate service: " + clazz.getName() + ", method: " + methodName + ", cause: " + violations);
- throw new ConstraintViolationException("Failed to validate service: " + clazz.getName() + ", method: " + methodName + ", cause: " + violations, violations);
+ validate(violations, arg, classGroups);
}
} catch (ValidationException e) {
// only use exception's message to avoid potential serialization issue
throw new ValidationException(e.getMessage());
Review Comment:
`javax.validation.ConstraintViolationException` might have potential serialization issue. Should be converted.
--
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] chickenlj commented on pull request #10434: fix validate violations is swallowed by ValidationException for issue#10415
Posted by GitBox <gi...@apache.org>.
chickenlj commented on PR #10434:
URL: https://github.com/apache/dubbo/pull/10434#issuecomment-1240279084
Check conclustion in https://github.com/apache/dubbo/issues/10415
--
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] sparkzxl commented on pull request #10434: fix validate violations is swallowed by ValidationException for issue#10415
Posted by GitBox <gi...@apache.org>.
sparkzxl commented on PR #10434:
URL: https://github.com/apache/dubbo/pull/10434#issuecomment-1210074854
fix issue#10415
--
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] liufeiyu1002 commented on pull request #10434: fix validate violations is swallowed by ValidationException for issue#10415
Posted by GitBox <gi...@apache.org>.
liufeiyu1002 commented on PR #10434:
URL: https://github.com/apache/dubbo/pull/10434#issuecomment-1213245979
`ConstraintViolationImpl `不同版本字段不一样, 新版本新增了字段,如果单纯这么包装的话 意义不大,只是拿到了你认为的有效信息, 最起码新的结果要实现 `ConstraintViolation` 接口
--
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 #10434: fix validate violations is swallowed by ValidationException for issue#10415
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #10434:
URL: https://github.com/apache/dubbo/pull/10434#issuecomment-1210285312
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/10434?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 [#10434](https://codecov.io/gh/apache/dubbo/pull/10434?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (55e77e1) into [3.0](https://codecov.io/gh/apache/dubbo/commit/1bc5e623c0efcb945d5d8e2bf70c05eafc32c659?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1bc5e62) will **decrease** coverage by `0.28%`.
> The diff coverage is `60.00%`.
```diff
@@ Coverage Diff @@
## 3.0 #10434 +/- ##
============================================
- Coverage 65.68% 65.40% -0.29%
- Complexity 296 318 +22
============================================
Files 1234 1234
Lines 53913 53913
Branches 8155 8156 +1
============================================
- Hits 35415 35261 -154
- Misses 14645 14779 +134
- Partials 3853 3873 +20
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/10434?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../validation/support/jvalidation/JValidatorNew.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tZmlsdGVyL2R1YmJvLWZpbHRlci12YWxpZGF0aW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby92YWxpZGF0aW9uL3N1cHBvcnQvanZhbGlkYXRpb24vSlZhbGlkYXRvck5ldy5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...bbo/validation/support/jvalidation/JValidator.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tZmlsdGVyL2R1YmJvLWZpbHRlci12YWxpZGF0aW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby92YWxpZGF0aW9uL3N1cHBvcnQvanZhbGlkYXRpb24vSlZhbGlkYXRvci5qYXZh) | `70.62% <100.00%> (-1.25%)` | :arrow_down: |
| [...dubbo/remoting/zookeeper/ZookeeperTransporter.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy96b29rZWVwZXIvWm9va2VlcGVyVHJhbnNwb3J0ZXIuamF2YQ==) | `50.00% <0.00%> (-33.34%)` | :arrow_down: |
| [...ng/zookeeper/curator5/Curator5ZookeeperClient.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3Rpbmctem9va2VlcGVyLWN1cmF0b3I1L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy96b29rZWVwZXIvY3VyYXRvcjUvQ3VyYXRvcjVab29rZWVwZXJDbGllbnQuamF2YQ==) | `43.33% <0.00%> (-26.67%)` | :arrow_down: |
| [...dubbo/common/status/support/LoadStatusChecker.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vc3RhdHVzL3N1cHBvcnQvTG9hZFN0YXR1c0NoZWNrZXIuamF2YQ==) | `41.66% <0.00%> (-25.00%)` | :arrow_down: |
| [...nt/metadata/ServiceInstanceHostPortCustomizer.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWV0YWRhdGEvU2VydmljZUluc3RhbmNlSG9zdFBvcnRDdXN0b21pemVyLmphdmE=) | `65.78% <0.00%> (-21.06%)` | :arrow_down: |
| [.../apache/dubbo/rpc/filter/ProfilerServerFilter.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9maWx0ZXIvUHJvZmlsZXJTZXJ2ZXJGaWx0ZXIuamF2YQ==) | `62.85% <0.00%> (-20.00%)` | :arrow_down: |
| [...dubbo/remoting/exchange/support/DefaultFuture.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L0RlZmF1bHRGdXR1cmUuamF2YQ==) | `80.17% <0.00%> (-12.07%)` | :arrow_down: |
| [...che/dubbo/registry/client/NopServiceDiscovery.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvTm9wU2VydmljZURpc2NvdmVyeS5qYXZh) | `44.44% <0.00%> (-11.12%)` | :arrow_down: |
| [...va/org/apache/dubbo/remoting/TimeoutException.java](https://codecov.io/gh/apache/dubbo/pull/10434/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9UaW1lb3V0RXhjZXB0aW9uLmphdmE=) | `22.22% <0.00%> (-11.12%)` | :arrow_down: |
| ... and [29 more](https://codecov.io/gh/apache/dubbo/pull/10434/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: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?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] chickenlj closed pull request #10434: fix validate violations is swallowed by ValidationException for issue#10415
Posted by GitBox <gi...@apache.org>.
chickenlj closed pull request #10434: fix validate violations is swallowed by ValidationException for issue#10415
URL: https://github.com/apache/dubbo/pull/10434
--
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