ruanwenjun commented on PR #18597:
URL: 
https://github.com/apache/dolphinscheduler/pull/18597#issuecomment-5447951115

   > #### Validate missing sub-workflows at execution time as well
   > The new checker protects workflow creation, updates, version switches, and 
online operations, but the execution path still accepts missing sub-workflow 
definitions.
   > 
   > `ExecutorServiceImpl#checkSubWorkflowDefinitionValid()` collects the 
referenced workflow codes and calls `workflowDefinitionDao.queryByCodes()`. It 
then only checks whether any returned definition is offline. If one or all 
referenced definitions are missing, they are absent from the query result, so 
the method still returns `true`.
   > 
   > This affects:
   > 
   > * invalid workflows that were already online before this patch;
   > * an online workflow whose referenced sub-workflow later becomes 
unavailable;
   > * already-online workflows for which `onlineWorkflowDefinition()` returns 
early without running the new checker.
   
   Thanks for catching this. I updated `checkSubWorkflowDefinitionValid()` to 
return false when `queryByCodes()` returns null or does not contain every 
referenced sub-workflow code, before checking the release state.


-- 
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]

Reply via email to