njnu-seafish commented on code in PR #18130:
URL:
https://github.com/apache/dolphinscheduler/pull/18130#discussion_r3241301526
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/command/handler/RecoverFailureTaskCommandHandler.java:
##########
@@ -95,6 +96,12 @@ protected void assembleWorkflowInstance(
workflowInstance.setStateWithDesc(WorkflowExecutionStatus.RUNNING_EXECUTION,
command.getCommandType().name());
workflowInstance.setCommandType(command.getCommandType());
workflowInstance.setHost(masterConfig.getMasterAddress());
+
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
+ workflowInstance.getStartTime(),
+ workflowInstance.getWorkflowDefinitionCode(),
+ workflowInstance.getWorkflowDefinitionVersion(),
+ workflowInstance.getId()));
+
Review Comment:
> It's best to inject the log path at runtime. You can write the code at
`CommandEngine`, can add a new field at `WorkflowStartLifecycleEvent`.
That's a great idea! With your guidance, I found an even better way to
implement it: we can uniformly set the logPath value in the abstract parent
class, AbstractCommandHandler.
--
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]