njnu-seafish opened a new pull request, #18664: URL: https://github.com/apache/dolphinscheduler/pull/18664
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! --> ## Was this PR generated or assisted by AI? NO ## Purpose of the pull request close #18662 ## Brief change log The new schedule created by insertSchedule is always persisted with releaseState = OFFLINE and is not registered into the Quartz scheduler, so it cannot fire anything by itself. It only takes effect after the user explicitly goes it online via onlineScheduler. That "go online" path (doOnlineScheduler) keeps the workflow-level check — it still throws WORKFLOW_DEFINITION_NOT_RELEASE when the workflow definition is not ONLINE. So an offline workflow's schedule can never actually be triggered; the current design guard is not bypassed. The change only aligns insertSchedule with updateSchedule (which already allows offline workflows to save), and removes an unnecessary stricter check for the "configure a timer first, go online later" flow. ## Verify this pull request This change added tests and can be verified as follows: - Added unit tests in `SchedulerServiceTest`: creating a schedule for an offline workflow succeeds (persisted as OFFLINE, no trigger), while non-existent and cross-project workflows are still rejected. - Manually verified on a locally deployed cluster: offline workflow scheduling configuration can now be saved, and it takes effect only after the schedule is manually set online. ## Pull Request Notice [Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md) If your pull request contains incompatible change, you should also add it to `docs/docs/en/guide/upgrade/incompatible.md` -- 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]
