hcwang512 opened a new issue, #10230: URL: https://github.com/apache/dolphinscheduler/issues/10230
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened i created a workflow with 3 tasks, and get task definition by api queryTaskDefinitionByCode, and found duplicate tasks in taskDefinitionList in api response. the image below shows the worflow dag, and api response in code block. both s2.1 and s2.2 appears multiple times in taskDefinitionList. https://files.slack.com/files-pri/T01L3LB96V7-F03H33374CR/image.png ``` { “code”: 0, “msg”: “成功“, “data”: { “processDefinition”: { “id”: 2, “code”: 5616739016224, “name”: “d2", “version”: 4, “releaseState”: “OFFLINE”, “projectCode”: 5613369171232, “description”: “”, “globalParams”: “[]“, “globalParamList”: [], “globalParamMap”: {}, “createTime”: “2022-05-23 21:06:13", “updateTime”: “2022-05-24 17:50:49", “flag”: “YES”, “userId”: 1, “userName”: null, “projectName”: null, “locations”: “[{\“taskCode\“:5616733900960,\“x\“:160,\“y\“:74},{\“taskCode\“:5617086730656,\“x\“:740,\“y\“:74},{\“taskCode\“:5617103013536,\“x\“:450,\“y\“:180}]“, “scheduleReleaseState”: null, “timeout”: 0, “tenantId”: 1, “tenantCode”: “sudo”, “modifyBy”: null, “warningGroupId”: 0 }, “processTaskRelationList”: [ { “id”: 21, “name”: “”, “processDefinitionVersion”: 4, “projectCode”: 5613369171232, “processDefinitionCode”: 5616739016224, “preTaskCode”: 0, “preTaskVersion”: 0, “postTaskCode”: 5616733900960, “postTaskVersion”: 1, “conditionType”: “NONE”, “conditionParams”: {}, “createTime”: “2022-05-24 17:50:49”, “updateTime”: “2022-05-24 17:50:49”, “operator”: 1, “operateTime”: “2022-05-24 17:50:49" }, { “id”: 20, “name”: “”, “processDefinitionVersion”: 4, “projectCode”: 5613369171232, “processDefinitionCode”: 5616739016224, “preTaskCode”: 5617103013536, “preTaskVersion”: 1, “postTaskCode”: 5617086730656, “postTaskVersion”: 1, “conditionType”: “NONE”, “conditionParams”: {}, “createTime”: “2022-05-24 17:50:49”, “updateTime”: “2022-05-24 17:50:49”, “operator”: 1, “operateTime”: “2022-05-24 17:50:49" }, { “id”: 19, “name”: “”, “processDefinitionVersion”: 4, “projectCode”: 5613369171232, “processDefinitionCode”: 5616739016224, “preTaskCode”: 5616733900960, “preTaskVersion”: 1, “postTaskCode”: 5617086730656, “postTaskVersion”: 1, “conditionType”: “NONE”, “conditionParams”: {}, “createTime”: “2022-05-24 17:50:49”, “updateTime”: “2022-05-24 17:50:49”, “operator”: 1, “operateTime”: “2022-05-24 17:50:49" }, { “id”: 18, “name”: “”, “processDefinitionVersion”: 4, “projectCode”: 5613369171232, “processDefinitionCode”: 5616739016224, “preTaskCode”: 5616733900960, “preTaskVersion”: 1, “postTaskCode”: 5617103013536, “postTaskVersion”: 1, “conditionType”: “NONE”, “conditionParams”: {}, “createTime”: “2022-05-24 17:50:49”, “updateTime”: “2022-05-24 17:50:49”, “operator”: 1, “operateTime”: “2022-05-24 17:50:49" } ], “taskDefinitionList”: [ { “id”: 3, “code”: 5616733900960, “name”: “s2”, “version”: 1, “description”: “”, “projectCode”: 5613369171232, “userId”: 1, “taskType”: “SHELL”, “taskParams”: { “resourceList”: [], “localParams”: [], “rawScript”: “echo \“aloha\“”, “dependence”: {}, “conditionResult”: { “successNode”: [], “failedNode”: [] }, “waitStartTimeout”: {}, “switchResult”: {} }, “taskParamList”: [], “taskParamMap”: {}, “flag”: “YES”, “taskPriority”: “MEDIUM”, “userName”: null, “projectName”: null, “workerGroup”: “default”, “environmentCode”: -1, “failRetryTimes”: 0, “failRetryInterval”: 1, “timeoutFlag”: “CLOSE”, “timeoutNotifyStrategy”: null, “timeout”: 0, “delayTime”: 0, “resourceIds”: “”, “createTime”: “2022-05-23 21:06:13”, “updateTime”: “2022-05-23 21:06:13”, “modifyBy”: null, “operator”: 1, “operateTime”: “2022-05-23 21:06:13”, “dependence”: “{}” }, { “id”: 7, “code”: 5617103013536, “name”: “s2.1”, “version”: 1, “description”: “”, “projectCode”: 5613369171232, “userId”: 1, “taskType”: “SHELL”, “taskParams”: { “resourceList”: [], “localParams”: [], “rawScript”: “echo \“s2.1\“”, “dependence”: {}, “conditionResult”: { “successNode”: [], “failedNode”: [] }, “waitStartTimeout”: {}, “switchResult”: {} }, “taskParamList”: [], “taskParamMap”: {}, “flag”: “YES”, “taskPriority”: “MEDIUM”, “userName”: null, “projectName”: null, “workerGroup”: “default”, “environmentCode”: -1, “failRetryTimes”: 0, “failRetryInterval”: 1, “timeoutFlag”: “CLOSE”, “timeoutNotifyStrategy”: null, “timeout”: 0, “delayTime”: 0, “resourceIds”: “”, “createTime”: “2022-05-23 21:53:57”, “updateTime”: “2022-05-23 21:53:57”, “modifyBy”: null, “operator”: 1, “operateTime”: “2022-05-23 21:53:57”, “dependence”: “{}” }, { “id”: 8, “code”: 5617103013536, “name”: “s2.1”, “version”: 1, “description”: “”, “projectCode”: 5613369171232, “userId”: 1, “taskType”: “SHELL”, “taskParams”: { “resourceList”: [], “localParams”: [], “rawScript”: “echo \“s2.1\“”, “dependence”: {}, “conditionResult”: { “successNode”: [], “failedNode”: [] }, “waitStartTimeout”: {}, “switchResult”: {} }, “taskParamList”: [], “taskParamMap”: {}, “flag”: “YES”, “taskPriority”: “MEDIUM”, “userName”: null, “projectName”: null, “workerGroup”: “default”, “environmentCode”: -1, “failRetryTimes”: 0, “failRetryInterval”: 1, “timeoutFlag”: “CLOSE”, “timeoutNotifyStrategy”: “WARN”, “timeout”: 0, “delayTime”: 0, “resourceIds”: “”, “createTime”: “2022-05-23 21:55:11", “updateTime”: “2022-05-23 21:55:11", “modifyBy”: null, “operator”: 1, “operateTime”: “2022-05-23 21:55:11", “dependence”: “{}” }, { “id”: 9, “code”: 5617086730656, “name”: “s2.2", “version”: 1, “description”: “”, “projectCode”: 5613369171232, “userId”: 1, “taskType”: “SHELL”, “taskParams”: { “resourceList”: [], “localParams”: [], “rawScript”: “echo \“s2.2\“”, “dependence”: {}, “conditionResult”: { “successNode”: [], “failedNode”: [] }, “waitStartTimeout”: {}, “switchResult”: {} }, “taskParamList”: [], “taskParamMap”: {}, “flag”: “YES”, “taskPriority”: “MEDIUM”, “userName”: null, “projectName”: null, “workerGroup”: “default”, “environmentCode”: -1, “failRetryTimes”: 0, “failRetryInterval”: 1, “timeoutFlag”: “CLOSE”, “timeoutNotifyStrategy”: null, “timeout”: 0, “delayTime”: 0, “resourceIds”: “”, “createTime”: “2022-05-23 21:55:11”, “updateTime”: “2022-05-23 21:55:11”, “modifyBy”: null, “operator”: 1, “operateTime”: “2022-05-23 21:55:11”, “dependence”: “{}” }, { “id”: 10, “code”: 5617103013536, “name”: “s2.1”, “version”: 1, “description”: “”, “projectCode”: 5613369171232, “userId”: 1, “taskType”: “SHELL”, “taskParams”: { “resourceList”: [], “localParams”: [], “rawScript”: “echo \“s2.1\“”, “dependence”: {}, “conditionResult”: { “successNode”: [], “failedNode”: [] }, “waitStartTimeout”: {}, “switchResult”: {} }, “taskParamList”: [], “taskParamMap”: {}, “flag”: “YES”, “taskPriority”: “MEDIUM”, “userName”: null, “projectName”: null, “workerGroup”: “default”, “environmentCode”: -1, “failRetryTimes”: 0, “failRetryInterval”: 1, “timeoutFlag”: “CLOSE”, “timeoutNotifyStrategy”: “WARN”, “timeout”: 0, “delayTime”: 0, “resourceIds”: “”, “createTime”: “2022-05-24 17:50:49", “updateTime”: “2022-05-24 17:50:49", “modifyBy”: null, “operator”: 1, “operateTime”: “2022-05-24 17:50:49", “dependence”: “{}” }, { “id”: 11, “code”: 5617086730656, “name”: “s2.2", “version”: 1, “description”: “”, “projectCode”: 5613369171232, “userId”: 1, “taskType”: “SHELL”, “taskParams”: { “resourceList”: [], “localParams”: [], “rawScript”: “echo \“s2.2\“”, “dependence”: {}, “conditionResult”: { “successNode”: [], “failedNode”: [] }, “waitStartTimeout”: {}, “switchResult”: {} }, “taskParamList”: [], “taskParamMap”: {}, “flag”: “YES”, “taskPriority”: “MEDIUM”, “userName”: null, “projectName”: null, “workerGroup”: “default”, “environmentCode”: -1, “failRetryTimes”: 0, “failRetryInterval”: 1, “timeoutFlag”: “CLOSE”, “timeoutNotifyStrategy”: null, “timeout”: 0, “delayTime”: 0, “resourceIds”: “”, “createTime”: “2022-05-24 17:50:49”, “updateTime”: “2022-05-24 17:50:49”, “modifyBy”: null, “operator”: 1, “operateTime”: “2022-05-24 17:50:49”, “dependence”: “{}” } ] }, “failed”: false, “success”: true } ``` ### What you expected to happen the tasks appears only once in taskDefinitionList ### How to reproduce use docker-compose to start dolphonescheduler, use image apache/dolphinscheduler:2.0.4, and create a workflow like image above and get task definition via api queryTaskDefinitionByCode dolphinscheduler/projects/{projectCode}/task-definition/{code}. ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
