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

[GitHub] [eventmesh] nikam14 opened a new pull request, #3817: fixes#3390[Enhancement] "getExtension()" can return null.[BatchPublishMessageProcessor]

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

   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request.
   
     - Fill out the template below to describe the changes contributed by the pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Closes #<XXX>`.)
   -->
   
   Fixes #3390 .
   
   ### Motivation
   
   
   
   
   
   ### Modifications
   
   imported the Objects class and
   added Objects.requireNonNull().
   
   
   
   ### 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] Alonexc commented on a diff in pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

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


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/processor/BatchPublishMessageProcessor.java:
##########
@@ -103,7 +104,7 @@ public void process(BatchMessage message, EventEmitter<Response> emitter) throws
 
         for (CloudEvent event : cloudEvents) {
             String seqNum = event.getId();
-            String uniqueId = (event.getExtension(ProtocolKey.UNIQUE_ID) == null) ? "" : event.getExtension(ProtocolKey.UNIQUE_ID).toString();
+            String uniqueId = (event.getExtension(ProtocolKey.UNIQUE_ID) == null) ? "" : Objects.requireNonNull(event).getExtension(ProtocolKey.UNIQUE_ID).toString();

Review Comment:
   This line is too long and causes the checkstyle to not pass, so you can change the line.[107]



-- 
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] mroccyen commented on pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

Posted by "mroccyen (via GitHub)" <gi...@apache.org>.
mroccyen commented on PR #3817:
URL: https://github.com/apache/eventmesh/pull/3817#issuecomment-1523077608

   ![image](https://user-images.githubusercontent.com/22514893/234531172-a182de61-1cf4-4fc3-85aa-a543fe937c0f.png)
   
   @nikam14 please fix checkstyle


-- 
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] nikam14 commented on pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

Posted by "nikam14 (via GitHub)" <gi...@apache.org>.
nikam14 commented on PR #3817:
URL: https://github.com/apache/eventmesh/pull/3817#issuecomment-1525031961

   @Alonexc @mxsm @mroccyen thanks your guidance.


-- 
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 #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

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


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/processor/BatchPublishMessageProcessor.java:
##########
@@ -103,7 +104,7 @@ public void process(BatchMessage message, EventEmitter<Response> emitter) throws
 
         for (CloudEvent event : cloudEvents) {
             String seqNum = event.getId();
-            String uniqueId = (event.getExtension(ProtocolKey.UNIQUE_ID) == null) ? "" : event.getExtension(ProtocolKey.UNIQUE_ID).toString();
+            String uniqueId = (event.getExtension(ProtocolKey.UNIQUE_ID) == null) ? "" : Objects.requireNonNull(event).getExtension(ProtocolKey.UNIQUE_ID).toString();

Review Comment:
   This line is too long and causes the checkstyle to not pass, so you can change the line.



-- 
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] nikam14 commented on pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

Posted by "nikam14 (via GitHub)" <gi...@apache.org>.
nikam14 commented on PR #3817:
URL: https://github.com/apache/eventmesh/pull/3817#issuecomment-1522826301

   @Alonexc can you help the test cases are failing


-- 
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] nikam14 commented on a diff in pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

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


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/processor/BatchPublishMessageProcessor.java:
##########
@@ -103,7 +104,7 @@ public void process(BatchMessage message, EventEmitter<Response> emitter) throws
 
         for (CloudEvent event : cloudEvents) {
             String seqNum = event.getId();
-            String uniqueId = (event.getExtension(ProtocolKey.UNIQUE_ID) == null) ? "" : event.getExtension(ProtocolKey.UNIQUE_ID).toString();
+            String uniqueId = (event.getExtension(ProtocolKey.UNIQUE_ID) == null) ? "" : Objects.requireNonNull(event).getExtension(ProtocolKey.UNIQUE_ID).toString();

Review Comment:
   changed the line in this [pr](https://github.com/nikam14/incubator-eventmesh/pull/1). 
   waiting for your respose to make PR to main repo.



-- 
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] codecov[bot] commented on pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

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

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/3817?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 [#3817](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ae81d76) into [master](https://app.codecov.io/gh/apache/eventmesh/commit/a2300cd1edc6833a63f4a2cc4534b260f4ed7bcd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a2300cd) will **increase** coverage by `0.01%`.
   > The diff coverage is `3.22%`.
   
   > :exclamation: Current head ae81d76 differs from pull request most recent head 9d6ed71. Consider uploading reports for the commit 9d6ed71 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3817      +/-   ##
   ============================================
   + Coverage     13.78%   13.79%   +0.01%     
   - Complexity     1290     1291       +1     
   ============================================
     Files           571      571              
     Lines         29137    29080      -57     
     Branches       2849     2829      -20     
   ============================================
   - Hits           4017     4013       -4     
   + Misses        24747    24695      -52     
   + Partials        373      372       -1     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...olver/http/SendMessageBatchV2ProtocolResolver.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXByb3RvY29sLXBsdWdpbi9ldmVudG1lc2gtcHJvdG9jb2wtbWVzaG1lc3NhZ2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9wcm90b2NvbC9tZXNobWVzc2FnZS9yZXNvbHZlci9odHRwL1NlbmRNZXNzYWdlQmF0Y2hWMlByb3RvY29sUmVzb2x2ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...olver/http/SendMessageRequestProtocolResolver.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXByb3RvY29sLXBsdWdpbi9ldmVudG1lc2gtcHJvdG9jb2wtbWVzaG1lc3NhZ2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9wcm90b2NvbC9tZXNobWVzc2FnZS9yZXNvbHZlci9odHRwL1NlbmRNZXNzYWdlUmVxdWVzdFByb3RvY29sUmVzb2x2ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...sh/runtime/admin/handler/ConfigurationHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvQ29uZmlndXJhdGlvbkhhbmRsZXIuamF2YQ==) | `11.32% <0.00%> (ø)` | |
   | [.../eventmesh/runtime/admin/handler/EventHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvRXZlbnRIYW5kbGVyLmphdmE=) | `6.25% <0.00%> (ø)` | |
   | [...tmesh/runtime/admin/handler/GrpcClientHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvR3JwY0NsaWVudEhhbmRsZXIuamF2YQ==) | `4.59% <0.00%> (ø)` | |
   | [...tmesh/runtime/admin/handler/HTTPClientHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvSFRUUENsaWVudEhhbmRsZXIuamF2YQ==) | `5.00% <0.00%> (ø)` | |
   | [...entmesh/runtime/admin/handler/RegistryHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUmVnaXN0cnlIYW5kbGVyLmphdmE=) | `7.40% <0.00%> (ø)` | |
   | [.../eventmesh/runtime/admin/handler/TopicHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvVG9waWNIYW5kbGVyLmphdmE=) | `7.14% <0.00%> (+0.89%)` | :arrow_up: |
   | [...l/grpc/processor/BatchPublishMessageProcessor.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvZ3JwYy9wcm9jZXNzb3IvQmF0Y2hQdWJsaXNoTWVzc2FnZVByb2Nlc3Nvci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...me/core/protocol/grpc/push/WebhookPushRequest.java](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvZ3JwYy9wdXNoL1dlYmhvb2tQdXNoUmVxdWVzdC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | ... and [14 more](https://app.codecov.io/gh/apache/eventmesh/pull/3817?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/apache/eventmesh/pull/3817/indirect-changes?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: 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] xwm1992 merged pull request #3817: [ISSUE #3390] "getExtension()" can return null.[BatchPublishMessageProcessor]

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


-- 
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