reele opened a new issue, #16991: URL: https://github.com/apache/dolphinscheduler/issues/16991
### 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 https://github.com/apache/dolphinscheduler/blob/44165480b2b97ca569741b995d68940f29ae12a6/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/runnable/FailedRecoverTaskInstanceFactory.java#L46-L61 when recover failed workflow, `RecoverFailureTaskCommandHandler` use `FailedRecoverTaskInstanceFactory` to create `TaskInstance`, but FailedRecoverTaskInstanceFactory didn't set environment content to `taskInstance.environmentConfig`. there may should call `injectEnvironmentConfigFromDB(taskInstance)` to set the `taskInstance.environmentConfig`. ### What you expected to happen FailedRecoverTaskInstanceFactory and FailoverTaskInstanceFactory should both set the `taskInstance.environmentConfig`. ### How to reproduce recover failed task with environment setting. ### Anything else _No response_ ### Version dev ### 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]
