You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "pandaapo (via GitHub)" <gi...@apache.org> on 2023/04/22 19:04:59 UTC

[GitHub] [eventmesh] pandaapo opened a new pull request, #3802: [ISSUE #3461]Do some code optimization[HTTPMessageHandler]

pandaapo opened a new pull request, #3802:
URL: https://github.com/apache/eventmesh/pull/3802

   Fixes #3461.
   
   ### 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? no


-- 
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] [eventmesh] weihubeats merged pull request #3802: [ISSUE #3461]Do some code optimization[HTTPMessageHandler]

Posted by "weihubeats (via GitHub)" <gi...@apache.org>.
weihubeats merged PR #3802:
URL: https://github.com/apache/eventmesh/pull/3802


-- 
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] [eventmesh] codecov[bot] commented on pull request #3802: [ISSUE #3461]Do some code optimization[HTTPMessageHandler]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3802:
URL: https://github.com/apache/eventmesh/pull/3802#issuecomment-1519638181

   ## [Codecov](https://codecov.io/gh/apache/eventmesh/pull/3802?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 [#3802](https://codecov.io/gh/apache/eventmesh/pull/3802?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (59e7f46) into [master](https://codecov.io/gh/apache/eventmesh/commit/7d3bbde05289982d19ab39ff1a8f1c55a382e5d5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d3bbde) will **increase** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 59e7f46 differs from pull request most recent head f22e30f. Consider uploading reports for the commit f22e30f to get more accurate results
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #3802   +/-   ##
   =========================================
     Coverage     13.80%   13.80%           
     Complexity     1291     1291           
   =========================================
     Files           571      571           
     Lines         29154    29151    -3     
     Branches       2856     2854    -2     
   =========================================
     Hits           4024     4024           
   + Misses        24756    24753    -3     
     Partials        374      374           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/eventmesh/pull/3802?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...re/protocol/http/push/AbstractHTTPPushRequest.java](https://codecov.io/gh/apache/eventmesh/pull/3802?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9wdXNoL0Fic3RyYWN0SFRUUFB1c2hSZXF1ZXN0LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [.../core/protocol/http/push/AsyncHTTPPushRequest.java](https://codecov.io/gh/apache/eventmesh/pull/3802?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9wdXNoL0FzeW5jSFRUUFB1c2hSZXF1ZXN0LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...untime/core/protocol/http/push/HTTPClientPool.java](https://codecov.io/gh/apache/eventmesh/pull/3802?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9wdXNoL0hUVFBDbGllbnRQb29sLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...me/core/protocol/http/push/HTTPMessageHandler.java](https://codecov.io/gh/apache/eventmesh/pull/3802?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9wdXNoL0hUVFBNZXNzYWdlSGFuZGxlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   
   :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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] pandaapo commented on a diff in pull request #3802: [ISSUE #3461]Do some code optimization[HTTPMessageHandler]

Posted by "pandaapo (via GitHub)" <gi...@apache.org>.
pandaapo commented on code in PR #3802:
URL: https://github.com/apache/eventmesh/pull/3802#discussion_r1175158102


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java:
##########
@@ -175,7 +172,7 @@ public void tryHTTPRequest() {
         body.add(new BasicNameValuePair(PushMessageRequestBody.EXTFIELDS,
             JsonUtils.toJSONString(EventMeshUtil.getEventProp(handleMsgContext.getEvent()))));
 
-        HttpEntity httpEntity = new UrlEncodedFormEntity(body, StandardCharsets.UTF_8);

Review Comment:
   Thanks for your review.
   I'm not sure that is better. `StandardCharsets.UTF_8` is jdk provided natively, but it can't indicate the default meaning in EventMesh comparing with `Constants.DEFAULT_CHARSET`. I guess this may be the motivation for EventMesh to define this field.



-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] Alonexc commented on a diff in pull request #3802: [ISSUE #3461]Do some code optimization[HTTPMessageHandler]

Posted by "Alonexc (via GitHub)" <gi...@apache.org>.
Alonexc commented on code in PR #3802:
URL: https://github.com/apache/eventmesh/pull/3802#discussion_r1175927679


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java:
##########
@@ -175,7 +172,7 @@ public void tryHTTPRequest() {
         body.add(new BasicNameValuePair(PushMessageRequestBody.EXTFIELDS,
             JsonUtils.toJSONString(EventMeshUtil.getEventProp(handleMsgContext.getEvent()))));
 
-        HttpEntity httpEntity = new UrlEncodedFormEntity(body, StandardCharsets.UTF_8);

Review Comment:
   This one is eventmesh defined and is the same.
   ![image](https://user-images.githubusercontent.com/91315508/234152816-23022b1c-0df4-4606-ae86-ad9850829226.png)
   



-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] weihubeats commented on a diff in pull request #3802: [ISSUE #3461]Do some code optimization[HTTPMessageHandler]

Posted by "weihubeats (via GitHub)" <gi...@apache.org>.
weihubeats commented on code in PR #3802:
URL: https://github.com/apache/eventmesh/pull/3802#discussion_r1175131791


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java:
##########
@@ -175,7 +172,7 @@ public void tryHTTPRequest() {
         body.add(new BasicNameValuePair(PushMessageRequestBody.EXTFIELDS,
             JsonUtils.toJSONString(EventMeshUtil.getEventProp(handleMsgContext.getEvent()))));
 
-        HttpEntity httpEntity = new UrlEncodedFormEntity(body, StandardCharsets.UTF_8);

Review Comment:
   Would it be better to use the one that comes with jdk



-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org