|
|
|
@@ -2,7 +2,6 @@ package com.ruoyi.platform.service.impl; |
|
|
|
|
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils; |
|
|
|
import com.ruoyi.platform.annotations.CheckDuplicate; |
|
|
|
import com.ruoyi.system.api.constant.Constant; |
|
|
|
import com.ruoyi.platform.domain.AssetWorkflow; |
|
|
|
import com.ruoyi.platform.domain.Experiment; |
|
|
|
import com.ruoyi.platform.domain.ImageVersion; |
|
|
|
@@ -15,6 +14,7 @@ import com.ruoyi.platform.service.WorkflowService; |
|
|
|
import com.ruoyi.platform.utils.HttpUtils; |
|
|
|
import com.ruoyi.platform.utils.JsonUtils; |
|
|
|
import com.ruoyi.platform.utils.MinioUtil; |
|
|
|
import com.ruoyi.system.api.constant.Constant; |
|
|
|
import com.ruoyi.system.api.model.LoginUser; |
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
@@ -180,6 +180,10 @@ public class WorkflowServiceImpl implements WorkflowService { |
|
|
|
Workflow workflow = this.queryById(id); |
|
|
|
if (workflow != null) { |
|
|
|
try { |
|
|
|
if (workflow.getName().length() >= 64) { |
|
|
|
throw new RuntimeException("流水线名称大于最大长度"); |
|
|
|
} |
|
|
|
|
|
|
|
Workflow duplicateWorkflow = new Workflow(); |
|
|
|
duplicateWorkflow.setName(workflow.getName() + "-copy-" + UUID.randomUUID().toString().substring(0, 6)); |
|
|
|
String oldDag = workflow.getDag(); |
|
|
|
@@ -205,7 +209,6 @@ public class WorkflowServiceImpl implements WorkflowService { |
|
|
|
return this.insert(duplicateWorkflow); |
|
|
|
} catch (Exception e) { |
|
|
|
throw new RuntimeException("复制流水线失败: " + e.getMessage(), e); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
|