You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ca...@apache.org on 2022/02/21 09:29:33 UTC
[dolphinscheduler] branch 2.0.4-prepare updated: [Cherry-pick-204][API]fix releaseWorkflowAndSchedule api and relation binding api (#8466)
This is an automated email from the ASF dual-hosted git repository.
caishunfeng pushed a commit to branch 2.0.4-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.4-prepare by this push:
new 1f6be28 [Cherry-pick-204][API]fix releaseWorkflowAndSchedule api and relation binding api (#8466)
1f6be28 is described below
commit 1f6be286ccf5ce5057a290232cdea74519c427e3
Author: JinYong Li <42...@users.noreply.github.com>
AuthorDate: Mon Feb 21 17:27:57 2022 +0800
[Cherry-pick-204][API]fix releaseWorkflowAndSchedule api and relation binding api (#8466)
* fix relation unbinding bug
* [Bug-8053] Fix CronUtils.getMaxCycle return null (#8086)
* [bug] Fix datax task type error parse clickhouse reader sql (#8091)
* [Fix-8119][API] Update ProcessInstance error and without reason output (#8122)
* fix bug_8119
* fix bug_8119
* fix bug_8119
* fix bug_8119
* fix bug_8119
* pick-8086/8091/8122/8139
* [Bug-8169] [dolphinscheduler-ui] Fix `After you save the workflow, it… (#8198)
* [Fix-8187][UI] Add the function to the module of resource that you can re-upload the file on the page of the file management. (#8359)
* add reupload file
* develop reupload file
* fix this issue
* [Improvement-8284][Alert] Dingtalk alert plugin supports markdown message type (#8285)
* add msgtype in the dingtalk alert plugin
* update markdown msgtype 'at persion'
* fix sudo.enable=false Is invalid (#8388)
* [Fix][UI] Rectify this issue with missing the re-uploading file button when the file is under the root directory.
* [Bug] [API] fix releaseWorkflowAndSchedule api and relation binding api (#8464)
* fix relation unbinding bug
* fix 8463
Co-authored-by: springmonster <ch...@163.com>
Co-authored-by: seagle <se...@users.noreply.github.com>
Co-authored-by: xiangzihao <46...@qq.com>
Co-authored-by: Kerwin <37...@users.noreply.github.com>
Co-authored-by: calvin <ji...@163.com>
Co-authored-by: ShuiMuNianHuaLP <46...@users.noreply.github.com>
---
.../api/service/impl/ProcessDefinitionServiceImpl.java | 3 +--
.../org/apache/dolphinscheduler/service/process/ProcessService.java | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
index ad38475..b5fd941 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
@@ -1954,8 +1954,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
processDefinition.setReleaseState(releaseState);
processDefinitionMapper.updateById(processDefinition);
- scheduleObj.setReleaseState(ReleaseState.ONLINE);
- scheduleMapper.updateById(scheduleObj);
+ schedulerService.setScheduleState(loginUser, projectCode, scheduleObj.getId(), ReleaseState.ONLINE);
break;
case OFFLINE:
processDefinition.setReleaseState(releaseState);
diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
index 67fdad3..3c43823 100644
--- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
+++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
@@ -2323,7 +2323,7 @@ public class ProcessService {
Integer version = processDefineLogMapper.queryMaxVersionForDefinition(processDefinition.getCode());
int insertVersion = version == null || version == 0 ? Constants.VERSION_FIRST : version + 1;
processDefinitionLog.setVersion(insertVersion);
- processDefinitionLog.setReleaseState(isFromProcessDefine ? ReleaseState.OFFLINE : ReleaseState.ONLINE);
+ processDefinitionLog.setReleaseState(!isFromProcessDefine || processDefinitionLog.getReleaseState() == ReleaseState.ONLINE ? ReleaseState.ONLINE : ReleaseState.OFFLINE);
processDefinitionLog.setOperator(operator.getId());
processDefinitionLog.setOperateTime(processDefinition.getUpdateTime());
int insertLog = processDefineLogMapper.insert(processDefinitionLog);