You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "haifxu (via GitHub)" <gi...@apache.org> on 2023/03/29 06:25:47 UTC

[GitHub] [inlong] haifxu opened a new pull request, #7723: [INLONG-7722][Manager] Check task result before returning

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

   ### Prepare a Pull Request
   
   - Fixes #7722 
   
   ### Motivation
   
   It's no error message displayed when the task failed.
   
   ### Modifications
   
   Check task result before returning
   


-- 
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 #7723: [INLONG-7722][Manager] Check task result before returning

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


-- 
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] haifxu commented on a diff in pull request #7723: [INLONG-7722][Manager] Check task result before returning

Posted by "haifxu (via GitHub)" <gi...@apache.org>.
haifxu commented on code in PR #7723:
URL: https://github.com/apache/inlong/pull/7723#discussion_r1151526351


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupProcessService.java:
##########
@@ -104,6 +104,11 @@ public WorkflowResult startProcess(String groupId, String operator) {
         groupService.updateStatus(groupId, GroupStatus.TO_BE_APPROVAL.getCode(), operator);
         ApplyGroupProcessForm form = genApplyGroupProcessForm(groupId);
         WorkflowResult result = workflowService.start(ProcessName.APPLY_GROUP_PROCESS, operator, form);
+        List<TaskResponse> tasks = result.getNewTasks();
+        if (TaskStatus.FAILED == tasks.get(tasks.size() - 1).getStatus()) {
+            throw new BusinessException(ErrorCodeEnum.WORKFLOW_DELETE_RECORD_FAILED,

Review Comment:
   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] fuweng11 commented on a diff in pull request #7723: [INLONG-7722][Manager] Check task result before returning

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #7723:
URL: https://github.com/apache/inlong/pull/7723#discussion_r1151500237


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupProcessService.java:
##########
@@ -104,6 +104,11 @@ public WorkflowResult startProcess(String groupId, String operator) {
         groupService.updateStatus(groupId, GroupStatus.TO_BE_APPROVAL.getCode(), operator);
         ApplyGroupProcessForm form = genApplyGroupProcessForm(groupId);
         WorkflowResult result = workflowService.start(ProcessName.APPLY_GROUP_PROCESS, operator, form);
+        List<TaskResponse> tasks = result.getNewTasks();
+        if (TaskStatus.FAILED == tasks.get(tasks.size() - 1).getStatus()) {
+            throw new BusinessException(ErrorCodeEnum.WORKFLOW_DELETE_RECORD_FAILED,

Review Comment:
   `WORKFLOW_START_RECORD_FAILED
   `



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupProcessService.java:
##########
@@ -184,6 +194,11 @@ public WorkflowResult restartProcess(String groupId, String operator) {
         InlongGroupInfo groupInfo = groupService.get(groupId);
         GroupResourceProcessForm form = genGroupResourceProcessForm(groupInfo, GroupOperateType.RESTART);
         WorkflowResult result = workflowService.start(ProcessName.RESTART_GROUP_PROCESS, operator, form);
+        List<TaskResponse> tasks = result.getNewTasks();
+        if (TaskStatus.FAILED == tasks.get(tasks.size() - 1).getStatus()) {
+            throw new BusinessException(ErrorCodeEnum.WORKFLOW_DELETE_RECORD_FAILED,

Review Comment:
   WORKFLOW_RESTART_RECORD_FAILED
   



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupProcessService.java:
##########
@@ -146,6 +151,11 @@ public WorkflowResult suspendProcess(String groupId, String operator) {
         InlongGroupInfo groupInfo = groupService.get(groupId);
         GroupResourceProcessForm form = genGroupResourceProcessForm(groupInfo, GroupOperateType.SUSPEND);
         WorkflowResult result = workflowService.start(ProcessName.SUSPEND_GROUP_PROCESS, operator, form);
+        List<TaskResponse> tasks = result.getNewTasks();
+        if (TaskStatus.FAILED == tasks.get(tasks.size() - 1).getStatus()) {
+            throw new BusinessException(ErrorCodeEnum.WORKFLOW_DELETE_RECORD_FAILED,

Review Comment:
   WORKFLOW_SUPSPEND_RECORD_FAILED
   



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