ruanwenjun commented on code in PR #18000:
URL:
https://github.com/apache/dolphinscheduler/pull/18000#discussion_r2853851549
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/TaskExecutionContextFactory.java:
##########
@@ -192,20 +193,27 @@ private Optional<String> getEnvironmentConfigFromDB(final
TaskInstance taskInsta
return Optional.ofNullable(environmentOptional.get().getConfig());
}
- // The successors of the task instance will be used to generate the var
pool
- // All out varPool from the successors will be merged into the var pool of
the task instance
- private List<Property> generateTaskInstanceVarPool(TaskDefinition
taskDefinition,
+ // The predecessors of the task instance will be used to generate the var
pool.
+ // In execute-task(TASK_ONLY) scenario, the predecessor might be outside
current execution sub-graph.
+ // For this case, fallback to workflow varPool to keep compatibility with
historical behavior.
+ private List<Property> generateTaskInstanceVarPool(WorkflowInstance
workflowInstance,
Review Comment:
It's better to use a clear logic, if the task instance is the start node,
then use the workflow instance's varpool as the task instance varpool.
--
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]