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

[PR] [Enhancement] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   Fixes #3495.
   
   ### Modifications
   
   - refactor with new module `eventmesh-admin-api`.
   - add `eventmesh-admin-redis`.
   - fit `eventmesh-admin-rocketmq`.
   
   


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   @fabian4 please fix the conflicts.


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   > The admin module is designed to be deployed independently, and it's better not to use SPI. It's also recommended to avoid heavy reliance on storage.api in admin.api. The existing interface path matching mechanism is not as good as the `@EventHttpHandler` annotation in `runtime.admin`. Therefore, the current design will pose significant difficulty for subsequent work.
   > 
   > It will be a good idea to add new features after the refactoring is complete. You may take a look at other modules first, like httpRetry. Currently, the retry logic for each protocol is separate, and we can create an API there to reduce coupling.
   
   Should I keep this pr until the refactoring is done ? If so let me know when it is ready.


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   > @fabian4 please fix the conflicts.
   
   @qqeasonchen https://github.com/apache/eventmesh/pull/4405 is ready to merge.
   
   This one may still be hold when @Pil0tXia is ready.


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   @fabian4 The EventMesh Dashboard is under devlopment in https://github.com/apache/eventmesh-dashboard Repo, and you're welcome to come and join us~


-- 
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] [Enhancement] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#4330](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (27b7783) into [master](https://app.codecov.io/gh/apache/eventmesh/commit/19dd2b1d5cc7abd327b808a3707ca4aaafce8b31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (19dd2b1) will **decrease** coverage by `0.03%`.
   > Report is 1 commits behind head on master.
   > The diff coverage is `6.25%`.
   
   > :exclamation: Current head 27b7783 differs from pull request most recent head 0335016. Consider uploading reports for the commit 0335016 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #4330      +/-   ##
   ============================================
   - Coverage     16.35%   16.32%   -0.03%     
     Complexity     1362     1362              
   ============================================
     Files           594      597       +3     
     Lines         25393    25430      +37     
     Branches       2393     2379      -14     
   ============================================
   - Hits           4152     4151       -1     
   - Misses        20818    20857      +39     
   + Partials        423      422       -1     
   ```
   
   
   | [Files Changed](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...java/org/apache/eventmesh/admin/api/Constants.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvQ29uc3RhbnRzLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...ventmesh/admin/api/controller/AdminController.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvY29udHJvbGxlci9BZG1pbkNvbnRyb2xsZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...ventmesh/admin/api/factory/AdminPluginFactory.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvZmFjdG9yeS9BZG1pblBsdWdpbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...ache/eventmesh/admin/api/handler/TopicHandler.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvaGFuZGxlci9Ub3BpY0hhbmRsZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...ventmesh/admin/api/request/TopicCreateRequest.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvcmVxdWVzdC9Ub3BpY0NyZWF0ZVJlcXVlc3QuamF2YQ==) | `100.00% <ø> (ø)` | |
   | [...he/eventmesh/admin/api/response/TopicResponse.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvcmVzcG9uc2UvVG9waWNSZXNwb25zZS5qYXZh) | `46.15% <ø> (ø)` | |
   | [...pache/eventmesh/admin/api/util/RequestMapping.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvdXRpbC9SZXF1ZXN0TWFwcGluZy5qYXZh) | `70.00% <ø> (ø)` | |
   | [...he/eventmesh/admin/api/util/UrlMappingPattern.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWFkbWluL2V2ZW50bWVzaC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9hZG1pbi9hcGkvdXRpbC9VcmxNYXBwaW5nUGF0dGVybi5qYXZh) | `92.85% <ø> (ø)` | |
   | [...ache/eventmesh/storage/redis/admin/RedisAdmin.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLXN0b3JhZ2UtcGx1Z2luL2V2ZW50bWVzaC1zdG9yYWdlLXJlZGlzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvc3RvcmFnZS9yZWRpcy9hZG1pbi9SZWRpc0FkbWluLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...entmesh/storage/redis/admin/RedisAdminAdaptor.java](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLXN0b3JhZ2UtcGx1Z2luL2V2ZW50bWVzaC1zdG9yYWdlLXJlZGlzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvc3RvcmFnZS9yZWRpcy9hZG1pbi9SZWRpc0FkbWluQWRhcHRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | ... and [2 more](https://app.codecov.io/gh/apache/eventmesh/pull/4330?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/apache/eventmesh/pull/4330/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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   @fabian4 I'll get back to you when the refactor is complete, and please feel free to do anything.


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

Posted by "fabian4 (via GitHub)" <gi...@apache.org>.
fabian4 closed pull request #4330: [ISSUE #3495] Optimize the eventmesh-admin of EventMesh
URL: https://github.com/apache/eventmesh/pull/4330


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   @fabian4 still conflicts here


-- 
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 #3495] Optimize the eventmesh-admin of EventMesh (eventmesh)

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

   @qqeasonchen @weihubeats The dependencies introduced by this PR do not align with the design of the admin module, so it cannot be merged at this time.


-- 
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] [Enhancement] Optimize the eventmesh-admin of EventMesh (eventmesh)

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


##########
eventmesh-runtime/conf/eventmesh.properties:
##########
@@ -75,7 +75,7 @@ eventMesh.server.blacklist.ipv6=::/128,::1/128,ff00::/8
 eventMesh.connector.plugin.type=standalone
 
 #storage plugin
-eventMesh.storage.plugin.type=standalone
+eventMesh.storage.plugin.type=redis

Review Comment:
   Please mind default configuration.



##########
eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/service/RocketMQService.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.admin.rocketmq.service;
+
+import static org.apache.eventmesh.admin.rocketmq.Constants.PLUGIN_NAME;
+
+import org.apache.eventmesh.admin.api.response.TopicResponse;
+import org.apache.eventmesh.admin.api.service.AdminService;
+import org.apache.eventmesh.api.admin.Admin;
+import org.apache.eventmesh.api.factory.StoragePluginFactory;
+import org.apache.eventmesh.common.Constants;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class RocketMQService implements AdminService {
+
+    private final Admin redisAdmin;
+
+    public RocketMQService() {
+        this.redisAdmin = StoragePluginFactory.getMeshMQAdmin(PLUGIN_NAME);
+    }
+
+    @Override
+    public TopicResponse createTopic(String topic) {
+        TopicResponse topicResponse = null;
+        try {
+            redisAdmin.createTopic(topic);
+            topicResponse = new TopicResponse(topic,

Review Comment:
   Please check after copying the code.



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