You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/06/24 10:07:33 UTC

[GitHub] [inlong] leosanqing opened a new pull request, #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

leosanqing opened a new pull request, #4768:
URL: https://github.com/apache/inlong/pull/4768

   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   - Fixes #4761 
   
   ### Motivation
   
   - Missing unit tests
   - The validation method is not used correctly
   - Find some bugs
   
   ### Modifications
   
   - Add addReq and UpdateReq interfaces for add and update validation
   - Add unit test DataNodeControllerTest
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [x] This change is already covered by existing tests, such as:
       - DataNodeControllerTest
   


-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] dockerzhang commented on pull request #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on PR #4768:
URL: https://github.com/apache/inlong/pull/4768#issuecomment-1168145487

   @leosanqing please process the conflict firstly.


-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] healchow commented on a diff in pull request #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4768:
URL: https://github.com/apache/inlong/pull/4768#discussion_r906626107


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/common/AddReq.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * 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.inlong.manager.common.pojo.common;
+
+import javax.validation.groups.Default;
+
+/**
+ * used for validate add request fields group
+ */
+public interface AddReq extends Default {

Review Comment:
   It is recommended to change the class name to `SaveRequest`, or `SaveRequestValidation`, or `SaveRequestValidate`.



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] healchow commented on a diff in pull request #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4768:
URL: https://github.com/apache/inlong/pull/4768#discussion_r906626107


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/common/AddReq.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * 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.inlong.manager.common.pojo.common;
+
+import javax.validation.groups.Default;
+
+/**
+ * used for validate add request fields group
+ */
+public interface AddReq extends Default {

Review Comment:
   It is recommended to change the class name to `SaveRequest`.



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] leosanqing commented on pull request #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

Posted by GitBox <gi...@apache.org>.
leosanqing commented on PR #4768:
URL: https://github.com/apache/inlong/pull/4768#issuecomment-1171894102

   > @leosanqing please process the conflict firstly.
   
   done


-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] healchow commented on a diff in pull request #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4768:
URL: https://github.com/apache/inlong/pull/4768#discussion_r906626640


##########
inlong-manager/manager-test/src/main/resources/h2/data.sql:
##########
@@ -17,4 +17,15 @@
 INSERT INTO `user` (`id`, `name`, `password`, `account_type`, `due_date`, `create_time`,
                     `update_time`, `create_by`, `update_by`)
 VALUES (1, 'admin', '628ed559bff5ae36bd2184d4216973cf', 0, '2099-12-31 23:59:59', '2022-06-05 08:58:06',
-        '2022-06-05 08:58:06', 'inlong_init', 'inlong_init');
\ No newline at end of file
+        '2022-06-05 08:58:06', 'inlong_init', 'inlong_init');
+
+INSERT INTO `user` (`id`, `name`, `password`, `account_type`, `due_date`, `create_time`,
+                    `update_time`, `create_by`, `update_by`)
+VALUES (2, 'operator', '628ed559bff5ae36bd2184d4216973cf', 1, '2099-12-31 23:59:59', '2022-06-05 08:58:06',
+        '2022-06-05 08:58:06', 'inlong_init', 'inlong_init');
+
+INSERT INTO `data_node` (`id`, `name`, `type`, `url`, `username`, `token`, `ext_params`,

Review Comment:
   Why insert this data rather than save it by 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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] dockerzhang merged pull request #4768: [INLONG-4761][Manager] Optimize DataNode related business and write some unit tests

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #4768:
URL: https://github.com/apache/inlong/pull/4768


-- 
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: commits-unsubscribe@inlong.apache.org

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