Skip to content

Conversation

unigof
Copy link
Contributor

@unigof unigof commented May 9, 2025

Purpose of the pull request

fix #17169 , unify depList and preTasks to predecessors in TaskNode, to avoid type conversion

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

Copy link

boring-cyborg bot commented May 9, 2025

Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)

@unigof unigof changed the title [Improvement-17169][service] Use depList instead of preTasks in TaskNode, to avoid type convertion [Improvement-17169][service] Use depList instead of preTasks in TaskNode, to avoid type conversion May 10, 2025
@SbloodyS SbloodyS added improvement make more easy to user or prompt friendly first time contributor First-time contributor labels May 11, 2025
@SbloodyS SbloodyS added this to the 3.3.1 milestone May 11, 2025
@SbloodyS SbloodyS requested a review from ruanwenjun May 12, 2025 08:12
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not unify this in front-end and back-end, we can only keep one field in TaskNode.

@unigof
Copy link
Contributor Author

unigof commented May 12, 2025

Why not unify this in front-end and back-end, we can only keep one field in TaskNode.

good idea, let me try it

@unigof unigof force-pushed the dev_imp-service-prenode branch 2 times, most recently from d09565a to 72a4e0e Compare May 13, 2025 00:57
@unigof
Copy link
Contributor Author

unigof commented May 13, 2025

I think TaskNode just used in back-end when workflow running, in front-end it use taskDefinitionJson to represent task node in dag. And I searched ui module and not found TaskNode to use.

@unigof
Copy link
Contributor Author

unigof commented May 15, 2025

could you approval this workflow? @ruanwenjun @SbloodyS thx~

@SbloodyS
Copy link
Member

could you approval this workflow? @ruanwenjun @SbloodyS thx~

Done.

@unigof
Copy link
Contributor Author

unigof commented May 15, 2025

could you have a time to review this pr? thx~ @SbloodyS @ruanwenjun

Comment on lines -102 to -108
/**
* inner dependency information
*/
@JsonDeserialize(using = JSONUtils.JsonDataDeserializer.class)
@JsonSerialize(using = JSONUtils.JsonDataSerializer.class)
private String preTasks;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this field used in front-end?

Copy link
Contributor Author

@unigof unigof May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think TaskNode just used in back-end when workflow running, in front-end it use taskDefinitionJson to represent task node in dag. And I searched ui module and not found TaskNode to use.

It maybe same name preTasks in front-end, because TaskNode is a inner data structure in Master module when workflow running.
If I loss some info, please tell me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is used by frontend in workflow definition and workflow instance and task definition and task instance. You should change the frontend too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is used by frontend in workflow definition and workflow instance and task definition and task instance. You should change the frontend too.

Maybe I miss some info and not found usage by frontend, could you give me an example? @SbloodyS thank you~

e.g. I found the field preTasks used in task-node.ts and taskRelationJson in definition/create/create/index.tsx, but maybe it is not same with preTasks in class TaskNode. It represent task relation, but it is not TaskNode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you mean just change field name preTasks to predecessors in front-end? @SbloodyS @ruanwenjun

@ruanwenjun
Copy link
Member

ruanwenjun commented May 15, 2025

And I would like to use predecessors to represent the upstream node, depList is confused with dependent node.

@unigof unigof force-pushed the dev_imp-service-prenode branch from 6c177e4 to 432d021 Compare May 15, 2025 12:47
@unigof
Copy link
Contributor Author

unigof commented May 15, 2025

And I would like to use predecessors to represent the upstream node, depList is confused with dependent node.

Done.
Could you approval this workflow? thx~ @ruanwenjun @SbloodyS

@unigof unigof changed the title [Improvement-17169][service] Use depList instead of preTasks in TaskNode, to avoid type conversion [Improvement-17169][service] unify preTasks and depList to predecessors in TaskNode, to avoid type conversion May 18, 2025
Copy link

@unigof
Copy link
Contributor Author

unigof commented May 20, 2025

Do you have any suggestions? thank you @ruanwenjun @SbloodyS

@SbloodyS
Copy link
Member

Do you have any suggestions? thank you @ruanwenjun @SbloodyS

You can check comments #17170 (comment)

@SbloodyS SbloodyS removed this from the 3.3.1 milestone Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend first time contributor First-time contributor improvement make more easy to user or prompt friendly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][service] Use depList instead of preTasks in TaskNode, to avoid type conversion
3 participants