njnu-seafish commented on PR #18664: URL: https://github.com/apache/dolphinscheduler/pull/18664#issuecomment-5886930360
> Preserve subworkflow validation when activating a schedule. > > The removed checkWorkflowDefinitionValid() call also verified that subworkflows were online, whereas doOnlineScheduler() only checks the parent workflow. > > Please keep offline schedule creation supported, but validate subworkflow readiness when activating the schedule and add coverage for this case. Good catch — the removed checkWorkflowDefinitionValid() did include subworkflow validation via checkSubWorkflowDefinitionValid(), and doOnlineScheduler() only checked the parent workflow. That gap is now closed in commit 484cb791c5: doOnlineScheduler() now calls executorService.checkSubWorkflowDefinitionValid(workflowDefinition) after the parent ONLINE check, throwing SUB_WORKFLOW_DEFINITION_NOT_RELEASE if any sub-workflow is offline. Offline schedule creation is still supported — insertSchedule saves the schedule as OFFLINE without registering Quartz. Added test coverage: testOnlineSchedulerRejectsOfflineSubWorkflow — parent ONLINE but sub-workflow OFFLINE → rejected, schedule stays OFFLINE, Quartz unregistered. testOnlineSchedulerSucceedsWhenSubWorkflowOnline — sub-workflows ready → schedule activated and Quartz registered. Since both onlineScheduler and onlineSchedulerByWorkflowCode go through doOnlineScheduler, the validation covers both entry points. -- 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]
