You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "reele (via GitHub)" <gi...@apache.org> on 2025/01/31 02:21:43 UTC

[I] [Bug] [FailedRecoverTaskInstanceFactory] Missing environmentConfig when recover failed task. [dolphinscheduler]

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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [FailedRecoverTaskInstanceFactory] Missing environmentConfig when recover failed task. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun closed issue #16991: [Bug] [FailedRecoverTaskInstanceFactory] Missing environmentConfig when recover failed task.
URL: https://github.com/apache/dolphinscheduler/issues/16991


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [FailedRecoverTaskInstanceFactory] Missing environmentConfig when recover failed task. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on issue #16991:
URL: https://github.com/apache/dolphinscheduler/issues/16991#issuecomment-2635648267

   > > We will clone the environment config from the old task instance, this not work?
   > 
   > not working...,
   > 
   > when recover a workflow, `RecoverFailureTaskCommandHandler.dealWithHistoryTaskInstances` call `getValidTaskInstance` to query taskInstances from db, shell task write temp .sh using `environmentConfig`, but this field is not in db, it's only generated by `injectEnvironmentConfigFromDB()` in `FirstRunTaskInstanceFactory.createTaskInstance`.
   
   Got it, we need to add `@TableField(exist = false)` on `environmentConfig`. And other execute type will also have this problem.
   
   <img width="1555" alt="Image" src="https://github.com/user-attachments/assets/126f2184-4e4c-4f7c-946b-45e67b25ad3b" />
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [FailedRecoverTaskInstanceFactory] Missing environmentConfig when recover failed task. [dolphinscheduler]

Posted by "reele (via GitHub)" <gi...@apache.org>.
reele commented on issue #16991:
URL: https://github.com/apache/dolphinscheduler/issues/16991#issuecomment-2635629757

   > We will clone the environment config from the old task instance, this not work?
   
   not working..., 
   
   when recover a workflow, `RecoverFailureTaskCommandHandler.dealWithHistoryTaskInstances` call `getValidTaskInstance` to query taskInstances from db,
   shell task write temp .sh using `environmentConfig`, but this field is not in db, it's only generated by `injectEnvironmentConfigFromDB()` in `FirstRunTaskInstanceFactory.createTaskInstance`.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [FailedRecoverTaskInstanceFactory] Missing environmentConfig when recover failed task. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on issue #16991:
URL: https://github.com/apache/dolphinscheduler/issues/16991#issuecomment-2635618441

   We will clone the environment config from the old task instance, this not work?


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org