Skip to content

[Fix-18731][API] Offline schedules when switching workflow versions - #18732

Merged
SbloodyS merged 2 commits into
apache:devfrom
zhuangchong:fix-switch-version-offline-schedule
Oct 23, 2026
Merged

SbloodyS merged 2 commits into
apache:devfrom
zhuangchong:fix-switch-version-offline-schedule

Conversation

@zhuangchong

Copy link
Copy Markdown
Contributor

Summary

  • Offline the associated schedule immediately after a successful workflow version switch, reusing the same schedule-offline method as the normal workflow offline action.
  • Remove the associated Quartz job without waiting for the next scheduled trigger to detect the offline workflow.
  • Add a regression test verifying that successful version switching invokes schedule cleanup.

Fixes #18731.

Test plan

  • Run WorkflowDefinitionServiceTest: 55 tests passed, with no failures or errors.
  • Apply Spotless formatting and run git diff --check.
  • Verify in a running environment that switching an online workflow version immediately offlines its schedule and removes its Quartz job.

Local test command (JDK 11):

./mvnw -pl dolphinscheduler-api -am test \
  -Dtest=WorkflowDefinitionServiceTest \
  -Dsurefire.failIfNoSpecifiedTests=false \
  -Djacoco.skip=true \
  -Dspotless.check.skip=true

Keep workflow and schedule release states aligned after version switches
instead of waiting for the next scheduled trigger to clean up the job.

Closes apache#18731.
@zhuangchong zhuangchong added this to the 3.5.0 milestone Oct 23, 2026
@zhuangchong zhuangchong added the bug Something isn't working label Oct 23, 2026

@SbloodyS SbloodyS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SbloodyS
SbloodyS merged commit 5d9d23e into apache:dev Oct 23, 2026
142 of 148 checks passed
@zhuangchong
zhuangchong deleted the fix-switch-version-offline-schedule branch October 23, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][API] Switching workflow versions leaves schedules online

2 participants