yequsun opened a new issue, #15212: URL: https://github.com/apache/dolphinscheduler/issues/15212
### 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 tried to use PUT /v2/tasks/{code} to update only the upstreamTasksCodesof a task to change its dependencies. And it throws 50063 TASK_DEFINITION_NOT_CHANGE error, sayingtask definition do not change.### ### ### What you expected to happen I expect it to update the upstreamTasksCodesof the corresponding task. ### How to reproduce In the request body, only includes the upstreamTasksCodes field. For example, {“upstreamTasksCodes”: "0"} ### Anything else I did some digging in the source code and realized why is this happening. This Api endpoint is handled by updateTaskDefinitionV2 method and it uses TaskDefinitionUpdateValid to check if there is any modifications. TaskDefinitionUpdateValid compares the original and modified TaskDefinition object. However, upstreamTasksCodes is not in TaskDefinition class. So it thinks you have not made any changes if the fields in TaskDefinition are unmodified. My workaround for this is to change the description every time that I need to update the upstreamTasksCodes because "description" is in TaskDefinition class. ### Version 3.2.x ### Are you willing to submit PR? - [X] 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]
