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/09/10 15:10:16 UTC
[GitHub] [dubbo] cnjxzhao opened a new pull request, #10599: Error code is managed with constants (#10549)
cnjxzhao opened a new pull request, #10599:
URL: https://github.com/apache/dubbo/pull/10599
## 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] win120a commented on pull request #10599: Error code is managed with constants (#10549)
Posted by GitBox <gi...@apache.org>.
win120a commented on PR #10599:
URL: https://github.com/apache/dubbo/pull/10599#issuecomment-1242754122
有个想法,就是不知道能不能把不同模块的错误码作为一个个内部类,这样子是不是更好找点?比如这样:
另外,这边认为用 final 类 + 私有构造器更好些,因为这边让其他类去 “实现” 这个接口不太合适。
```java
public final class LoggerCodeConstants {
private LoggerCodeConstants() {
throw new UnsupportedOperationException("...");
}
// 下面的内部类的私有构造器省略。
public static final class CommonModuleErrorCodeConstants {
// common module 0-1 ~ 0-4
public static final String COMMON_THREAD_POOL_EXHAUSTED = "0-1";
public static final String COMMON_PROPERTY_MISSPELLING = "0-2";
public static final String COMMON_CACHE_PATH_INACCESSIBLE = "0-3";
public static final String COMMON_CACHE_FILE_EXCEED_MAXIMUM_LIMIT = "0-4";
}
public static final class RegistryModuleErrorCodeConstants {
// registry module
public static final String REGISTRY_ADDRESS_INVALID = "1-1";
public static final String REGISTRY_ABSENCE = "1-2";
public static final String REGISTRY_FAILED_URL_EVICTING = "1-3";
}
// .....
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ merged pull request #10599: Error code is managed with constants (#10549)
Posted by GitBox <gi...@apache.org>.
AlbumenJ merged PR #10599:
URL: https://github.com/apache/dubbo/pull/10599
--
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 #10599: Error code is managed with constants (#10549)
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #10599:
URL: https://github.com/apache/dubbo/pull/10599#issuecomment-1242763589
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/10599?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 [#10599](https://codecov.io/gh/apache/dubbo/pull/10599?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5fe3fb2) into [3.1](https://codecov.io/gh/apache/dubbo/commit/eeac1c3eaf0b06be5e1fd275c7447f085f48a48b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eeac1c3) will **decrease** coverage by `0.36%`.
> The diff coverage is `40.51%`.
```diff
@@ Coverage Diff @@
## 3.1 #10599 +/- ##
============================================
- Coverage 64.76% 64.39% -0.37%
+ Complexity 397 395 -2
============================================
Files 1331 1331
Lines 56564 56525 -39
Branches 8377 8348 -29
============================================
- Hits 36632 36400 -232
- Misses 15987 16159 +172
- Partials 3945 3966 +21
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/10599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...e/dubbo/rpc/cluster/directory/StaticDirectory.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvZGlyZWN0b3J5L1N0YXRpY0RpcmVjdG9yeS5qYXZh) | `65.11% <0.00%> (ø)` | |
| [...apache/dubbo/rpc/cluster/merger/MergerFactory.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbWVyZ2VyL01lcmdlckZhY3RvcnkuamF2YQ==) | `71.42% <0.00%> (ø)` | |
| [...router/condition/config/ListenableStateRouter.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL2NvbmRpdGlvbi9jb25maWcvTGlzdGVuYWJsZVN0YXRlUm91dGVyLmphdmE=) | `69.64% <0.00%> (ø)` | |
| [...rpc/cluster/router/mesh/route/MeshRuleManager.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL21lc2gvcm91dGUvTWVzaFJ1bGVNYW5hZ2VyLmphdmE=) | `95.45% <0.00%> (ø)` | |
| [.../rpc/cluster/router/mesh/route/MeshRuleRouter.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL21lc2gvcm91dGUvTWVzaFJ1bGVSb3V0ZXIuamF2YQ==) | `94.23% <0.00%> (ø)` | |
| [...bo/rpc/cluster/support/AbstractClusterInvoker.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9BYnN0cmFjdENsdXN0ZXJJbnZva2VyLmphdmE=) | `79.47% <0.00%> (-0.67%)` | :arrow_down: |
| [...ava/org/apache/dubbo/config/DubboShutdownHook.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9EdWJib1NodXRkb3duSG9vay5qYXZh) | `38.88% <0.00%> (ø)` | |
| [...ubbo/config/deploy/DefaultApplicationDeployer.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9kZXBsb3kvRGVmYXVsdEFwcGxpY2F0aW9uRGVwbG95ZXIuamF2YQ==) | `73.26% <0.00%> (-0.26%)` | :arrow_down: |
| [...che/dubbo/config/deploy/DefaultModuleDeployer.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9kZXBsb3kvRGVmYXVsdE1vZHVsZURlcGxveWVyLmphdmE=) | `67.53% <0.00%> (ø)` | |
| [...spring/context/DubboDeployApplicationListener.java](https://codecov.io/gh/apache/dubbo/pull/10599/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvY29udGV4dC9EdWJib0RlcGxveUFwcGxpY2F0aW9uTGlzdGVuZXIuamF2YQ==) | `75.00% <0.00%> (ø)` | |
| ... and [107 more](https://codecov.io/gh/apache/dubbo/pull/10599/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org