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/05/10 00:00:51 UTC

[GitHub] [eventmesh] pandaapo opened a new pull request, #3893: [ISSUE #3892]SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body

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

   Fixes #3892.
   
   ### Motivation
   
   See "Enhancement Request" in [issue](https://github.com/apache/eventmesh/issues/3892#issue-1702256968).
   
   
   
   ### Modifications
   
   See "Describe the solution you'd like" in [issue](https://github.com/apache/eventmesh/issues/3892#issue-1702256968).
   
   
   
   ### 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


Re: [PR] [ISSUE #3892]SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body (eventmesh)

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

   It has been 60 days since the last activity on this pull request. I am reaching out here to gently remind you that the Apache EventMesh community values every pull request, and please feel free to get in touch with the reviewers at any time. They are available to assist you in advancing the progress of your pull request and offering the latest feedback.
   
   If you encounter any challenges during development, seeking support within the community is encouraged. We sincerely appreciate your contributions to Apache EventMesh.


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


Re: [PR] [ISSUE #3892]SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body (eventmesh)

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

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/3893?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `78.16092%` with `19 lines` in your changes are missing coverage. Please review.
   > Project coverage is 14.55%. Comparing base [(`0ce8d57`)](https://app.codecov.io/gh/apache/eventmesh/commit/0ce8d57e6a87890354fdc0643f06aae4acb6cc41?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`e4b2db9`)](https://app.codecov.io/gh/apache/eventmesh/pull/3893?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 431 commits behind head on master.
   
   > :exclamation: Current head e4b2db9 differs from pull request most recent head d3129d8. Consider uploading reports for the commit d3129d8 to get more accurate results
   
   | [Files](https://app.codecov.io/gh/apache/eventmesh/pull/3893?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [.../http/header/message/BaseSendMsgRequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&filepath=eventmesh-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Feventmesh%2Fcommon%2Fprotocol%2Fhttp%2Fheader%2Fmessage%2FBaseSendMsgRequestHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL0Jhc2VTZW5kTXNnUmVxdWVzdEhlYWRlci5qYXZh) | 83.95% | [13 Missing :warning: ](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../header/message/SendMessageBatchRequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&filepath=eventmesh-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Feventmesh%2Fcommon%2Fprotocol%2Fhttp%2Fheader%2Fmessage%2FSendMessageBatchRequestHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL1NlbmRNZXNzYWdlQmF0Y2hSZXF1ZXN0SGVhZGVyLmphdmE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...eader/message/SendMessageBatchV2RequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&filepath=eventmesh-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Feventmesh%2Fcommon%2Fprotocol%2Fhttp%2Fheader%2Fmessage%2FSendMessageBatchV2RequestHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL1NlbmRNZXNzYWdlQmF0Y2hWMlJlcXVlc3RIZWFkZXIuamF2YQ==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../http/header/message/SendMessageRequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&filepath=eventmesh-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Feventmesh%2Fcommon%2Fprotocol%2Fhttp%2Fheader%2Fmessage%2FSendMessageRequestHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL1NlbmRNZXNzYWdlUmVxdWVzdEhlYWRlci5qYXZh) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3893      +/-   ##
   ============================================
   + Coverage     14.24%   14.55%   +0.31%     
   - Complexity     1320     1350      +30     
   ============================================
     Files           579      580       +1     
     Lines         28967    28811     -156     
     Branches       2802     2799       -3     
   ============================================
   + Hits           4125     4194      +69     
   + Misses        24450    24225     -225     
     Partials        392      392              
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/eventmesh/pull/3893?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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 #3893: [ISSUE #3892]SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body

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

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#3893](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (53b783d) into [master](https://app.codecov.io/gh/apache/eventmesh/commit/3edfe92329418ad10ffc9dfdfd2e5392d127a802?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (3edfe92) will **increase** coverage by `0.31%`.
   > The diff coverage is `78.16%`.
   
   > :exclamation: Current head 53b783d differs from pull request most recent head 9ec8cc4. Consider uploading reports for the commit 9ec8cc4 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3893      +/-   ##
   ============================================
   + Coverage     13.93%   14.25%   +0.31%     
   - Complexity     1291     1321      +30     
   ============================================
     Files           570      571       +1     
     Lines         28842    28686     -156     
     Branches       2807     2804       -3     
   ============================================
   + Hits           4019     4088      +69     
   + Misses        24450    24225     -225     
     Partials        373      373              
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [.../header/message/SendMessageBatchRequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL1NlbmRNZXNzYWdlQmF0Y2hSZXF1ZXN0SGVhZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...eader/message/SendMessageBatchV2RequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL1NlbmRNZXNzYWdlQmF0Y2hWMlJlcXVlc3RIZWFkZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../http/header/message/SendMessageRequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL1NlbmRNZXNzYWdlUmVxdWVzdEhlYWRlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../http/header/message/BaseSendMsgRequestHeader.java](https://app.codecov.io/gh/apache/eventmesh/pull/3893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL2hlYWRlci9tZXNzYWdlL0Jhc2VTZW5kTXNnUmVxdWVzdEhlYWRlci5qYXZh) | `83.95% <83.95%> (ø)` | |
   
   ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/eventmesh/pull/3893/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :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=apache)
   


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


Re: [PR] [ISSUE #3892]SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body (eventmesh)

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


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/message/BaseSendMsgRequestHeader.java:
##########
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.common.protocol.http.header.message;
+
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.protocol.http.common.ProtocolKey;
+import org.apache.eventmesh.common.protocol.http.common.ProtocolVersion;
+import org.apache.eventmesh.common.protocol.http.header.Header;
+
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Base class of {@link SendMessageRequestHeader}, {@link SendMessageBatchRequestHeader}
+ * and {@link SendMessageBatchV2RequestHeader}
+ *
+ */
+public abstract class BaseSendMsgRequestHeader extends Header {
+
+    //request code
+    private String code;
+
+    //requester language description
+    private String language;
+
+    //protocol version adopted by requester, default:1.0
+    private ProtocolVersion version;
+
+    //protocol type, cloudevents or eventmeshMessage
+    private String protocolType;
+
+    //protocol version, cloudevents:1.0 or 0.3
+    private String protocolVersion;
+
+    //protocol desc
+    private String protocolDesc;
+
+    //the environment number of the requester
+    private String env;
+
+    //the IDC of the requester
+    private String idc;
+
+    //subsystem of the requester
+    private String sys;
+
+    //PID of the requester
+    private String pid;
+
+    //IP of the requester
+    private String ip;
+
+    //USERNAME of the requester
+    private String username;
+
+    //PASSWD of the requester
+    private String passwd;
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPasswd() {
+        return passwd;
+    }
+
+    public void setPasswd(String passwd) {
+        this.passwd = passwd;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getLanguage() {
+        return language;
+    }
+
+    public void setLanguage(String language) {
+        this.language = language;
+    }

Review Comment:
   How about using the `@Data` annotation to save space on those getters and setters?



##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/message/BaseSendMsgRequestHeader.java:
##########
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.common.protocol.http.header.message;
+
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.protocol.http.common.ProtocolKey;
+import org.apache.eventmesh.common.protocol.http.common.ProtocolVersion;
+import org.apache.eventmesh.common.protocol.http.header.Header;
+
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Base class of {@link SendMessageRequestHeader}, {@link SendMessageBatchRequestHeader}
+ * and {@link SendMessageBatchV2RequestHeader}
+ *
+ */
+public abstract class BaseSendMsgRequestHeader extends Header {
+
+    //request code
+    private String code;

Review Comment:
   How about using the `AbstractSendMsgRequestHeader` naming, to match the naming of other classes?



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