You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/08 08:45:26 UTC
[GitHub] [incubator-eventmesh] weihubeats opened a new pull request, #2509: [Enhancement] Remove redundant parameter passing
weihubeats opened a new pull request, #2509:
URL: https://github.com/apache/incubator-eventmesh/pull/2509
Fixes https://github.com/apache/incubator-eventmesh/issues/2508
### Motivation
*Explain the content here.*
*Explain why you want to make the changes and what problem you're trying to solve.*
### Modifications
*Describe the modifications you've done.*
### Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
--
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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
[GitHub] [incubator-eventmesh] horoc commented on a diff in pull request #2509: [Enhancement] Remove redundant parameter passing
Posted by GitBox <gi...@apache.org>.
horoc commented on code in PR #2509:
URL: https://github.com/apache/incubator-eventmesh/pull/2509#discussion_r1043212767
##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java:
##########
@@ -123,12 +123,12 @@ private String checkNotEmpty(String key) {
return value;
}
- private String checkNumeric(String key) {
- String value = configurationWrapper.getProp(key);
+ private String checkNumeric() {
+ String value = configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_SYSID);
Review Comment:
I think the method `private String checkNumeric(String key)` here is introduced as a common method to check and get numeric property, if we remove the key parameter and just use `checkNumeric()` to get specific property, the method name would be very confusing.
--
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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
[GitHub] [incubator-eventmesh] horoc commented on a diff in pull request #2509: [Enhancement] Remove redundant parameter passing
Posted by GitBox <gi...@apache.org>.
horoc commented on code in PR #2509:
URL: https://github.com/apache/incubator-eventmesh/pull/2509#discussion_r1043212767
##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java:
##########
@@ -123,12 +123,12 @@ private String checkNotEmpty(String key) {
return value;
}
- private String checkNumeric(String key) {
- String value = configurationWrapper.getProp(key);
+ private String checkNumeric() {
+ String value = configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_SYSID);
Review Comment:
I think the method `private String checkNumeric(String key)` here is introduced as a common method to check the numeric property, if we remove the key parameter and just use `checkNumeric()` to get specific property, the method name would be very confusing.
--
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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
[GitHub] [incubator-eventmesh] codecov[bot] commented on pull request #2509: [Enhancement] Remove redundant parameter passing
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2509:
URL: https://github.com/apache/incubator-eventmesh/pull/2509#issuecomment-1342320236
# [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509?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 [#2509](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (877f75a) into [master](https://codecov.io/gh/apache/incubator-eventmesh/commit/ff6708e8936908d36f09850e6d1caa2cff5c93a8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ff6708e) will **increase** coverage by `0.00%`.
> The diff coverage is `66.66%`.
```diff
@@ Coverage Diff @@
## master #2509 +/- ##
=========================================
Coverage 11.78% 11.79%
- Complexity 903 904 +1
=========================================
Files 469 469
Lines 27783 27795 +12
Branches 3014 3006 -8
=========================================
+ Hits 3275 3278 +3
- Misses 24212 24226 +14
+ Partials 296 291 -5
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509?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/eventmesh/common/config/CommonConfiguration.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9jb25maWcvQ29tbW9uQ29uZmlndXJhdGlvbi5qYXZh) | `75.00% <66.66%> (ø)` | |
| [...eventmeshmessage/EventMeshMessageTCPSubClient.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L3RjcC9pbXBsL2V2ZW50bWVzaG1lc3NhZ2UvRXZlbnRNZXNoTWVzc2FnZVRDUFN1YkNsaWVudC5qYXZh) | `6.25% <0.00%> (-0.21%)` | :arrow_down: |
| [...nt/tcp/impl/cloudevent/CloudEventTCPSubClient.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L3RjcC9pbXBsL2Nsb3VkZXZlbnQvQ2xvdWRFdmVudFRDUFN1YkNsaWVudC5qYXZh) | `5.88% <0.00%> (-0.18%)` | :arrow_down: |
| [...otocol/meshmessage/MeshMessageProtocolAdaptor.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXByb3RvY29sLXBsdWdpbi9ldmVudG1lc2gtcHJvdG9jb2wtbWVzaG1lc3NhZ2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9wcm90b2NvbC9tZXNobWVzc2FnZS9NZXNoTWVzc2FnZVByb3RvY29sQWRhcHRvci5qYXZh) | `3.77% <0.00%> (-0.08%)` | :arrow_down: |
| [...rg/apache/eventmesh/runtime/trace/LogExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL3RyYWNlL0xvZ0V4cG9ydGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...che/eventmesh/runtime/boot/EventMeshTCPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvRXZlbnRNZXNoVENQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...sh/client/http/producer/EventMeshHttpProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L2h0dHAvcHJvZHVjZXIvRXZlbnRNZXNoSHR0cFByb2R1Y2VyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ime/admin/handler/RedirectClientByPathHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUmVkaXJlY3RDbGllbnRCeVBhdGhIYW5kbGVyLmphdmE=) | `84.78% <0.00%> (ø)` | |
| [...e/admin/handler/RedirectClientByIpPortHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUmVkaXJlY3RDbGllbnRCeUlwUG9ydEhhbmRsZXIuamF2YQ==) | `31.37% <0.00%> (ø)` | |
| ... and [11 more](https://codecov.io/gh/apache/incubator-eventmesh/pull/2509/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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
[GitHub] [incubator-eventmesh] horoc commented on a diff in pull request #2509: [Enhancement] Remove redundant parameter passing
Posted by GitBox <gi...@apache.org>.
horoc commented on code in PR #2509:
URL: https://github.com/apache/incubator-eventmesh/pull/2509#discussion_r1043212767
##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java:
##########
@@ -123,12 +123,12 @@ private String checkNotEmpty(String key) {
return value;
}
- private String checkNumeric(String key) {
- String value = configurationWrapper.getProp(key);
+ private String checkNumeric() {
+ String value = configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_SYSID);
Review Comment:
I think the method `private String checkNumeric(String key)` here is introduced as a common method to check and get certain numeric property values.
if we remove the key parameter and just use `checkNumeric()` to get property `ConfKeys.KEYS_EVENTMESH_SYSID`, the method name would be very confusing.
--
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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
[GitHub] [incubator-eventmesh] weihubeats commented on a diff in pull request #2509: [Enhancement] Remove redundant parameter passing
Posted by GitBox <gi...@apache.org>.
weihubeats commented on code in PR #2509:
URL: https://github.com/apache/incubator-eventmesh/pull/2509#discussion_r1043240385
##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java:
##########
@@ -123,12 +123,12 @@ private String checkNotEmpty(String key) {
return value;
}
- private String checkNumeric(String key) {
- String value = configurationWrapper.getProp(key);
+ private String checkNumeric() {
+ String value = configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_SYSID);
Review Comment:
Makes sense
--
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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
[GitHub] [incubator-eventmesh] weihubeats closed pull request #2509: [Enhancement] Remove redundant parameter passing
Posted by GitBox <gi...@apache.org>.
weihubeats closed pull request #2509: [Enhancement] Remove redundant parameter passing
URL: https://github.com/apache/incubator-eventmesh/pull/2509
--
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: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org