Skip to content

Commit f81bc85

Browse files
committed
Revert "feat: 新增接口用于修改工作流全局变量#AI Commit#"
This reverts commit fc623db, reversing changes made to f6887de.
1 parent c7674b9 commit f81bc85

10 files changed

Lines changed: 164 additions & 629 deletions

File tree

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-common/src/main/java/com/webank/wedatasphere/dss/workflow/common/entity/DSSFlow.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public class DSSFlow implements Flow {
5757

5858
private String defaultProxyUser;
5959

60-
private String defaultTenant;
61-
6260
public List<String[]> getFlowIdParamConfTemplateIdTuples() {
6361
return flowIdParamConfTemplateIdTuples;
6462
}
@@ -297,12 +295,4 @@ public String getDefaultProxyUser() {
297295
public void setDefaultProxyUser(String defaultProxyUser) {
298296
this.defaultProxyUser = defaultProxyUser;
299297
}
300-
301-
public String getDefaultTenant() {
302-
return defaultTenant;
303-
}
304-
305-
public void setDefaultTenant(String defaultTenant) {
306-
this.defaultTenant = defaultTenant;
307-
}
308298
}

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/dao/FlowMapper.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.webank.wedatasphere.dss.workflow.dao;
1818

1919

20-
import com.webank.wedatasphere.dss.orchestrator.common.entity.DSSOrchestratorInfo;
2120
import com.webank.wedatasphere.dss.workflow.common.entity.DSSFlow;
2221
import com.webank.wedatasphere.dss.workflow.common.entity.DSSFlowRelation;
2322
import com.webank.wedatasphere.dss.workflow.entity.vo.FlowInfoVo;
@@ -64,6 +63,4 @@ public interface FlowMapper {
6463
List<String> getSubflowName(Long parentFlowID);
6564

6665
List<DSSFlow> selectFlowListByOrchestratorId(@Param("orchestratorIdList") List<Long> orchestratorIdList);
67-
68-
List<DSSOrchestratorInfo> selectOrchestratorByName(@Param("projectId") Long projectId,@Param("orchestratorName") String orchestratorName);
6966
}

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/dao/TenantVariableLogMapper.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/dao/impl/flowMapper.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@
163163
</foreach>
164164
) t2 on t1.id = t2.app_id
165165
</select>
166-
167-
168-
<select id="selectOrchestratorByName">
169-
select * from dss_orchestrator_info where project_id = #{projectId} and name =#{orchestratorName}
170-
</select>
171-
166+
167+
172168
</mapper>

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/entity/TenantVariableLogEntry.java

Lines changed: 0 additions & 106 deletions
This file was deleted.

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/entity/request/UpdateTenantVariableRequest.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/restful/FlowRestfulApi.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import com.webank.wedatasphere.dss.common.label.EnvDSSLabel;
3131
import com.webank.wedatasphere.dss.common.label.LabelRouteVO;
3232
import com.webank.wedatasphere.dss.common.utils.AuditLogUtils;
33-
import com.webank.wedatasphere.dss.common.conf.DSSCommonConf;
3433
import com.webank.wedatasphere.dss.common.utils.DSSCommonUtils;
3534
import com.webank.wedatasphere.dss.common.utils.DSSExceptionUtils;
3635
import com.webank.wedatasphere.dss.contextservice.service.ContextService;
@@ -53,7 +52,6 @@
5352
import com.webank.wedatasphere.dss.workflow.service.PublishService;
5453
import org.apache.commons.collections.CollectionUtils;
5554
import org.apache.commons.lang.StringUtils;
56-
import org.apache.commons.lang3.ArrayUtils;
5755
import org.apache.linkis.common.exception.ErrorException;
5856
import org.apache.linkis.cs.client.utils.SerializeHelper;
5957
import org.apache.linkis.cs.common.entity.source.LinkisHAWorkFlowContextID;
@@ -501,37 +499,4 @@ public Message getNodeInfoByName(@RequestBody QueryNodeInfoByNameRequest queryNo
501499
return Message.ok("获取节点信息成功").data("data",dssNodeDefaultList);
502500
}
503501

504-
/**
505-
* 更新租户变量接口,仅超级管理员可调用
506-
* 将tenant全局变量写入到指定根工作流中(子工作流通过getRootFlowProxy动态继承)
507-
*
508-
* @param request 包含orchestratorName、projectName、tenantValue的请求体
509-
* @return 操作结果
510-
*/
511-
@RequestMapping(value = "/updateTenantVariable", method = RequestMethod.POST)
512-
public Message updateTenantVariable(@RequestBody UpdateTenantVariableRequest request) {
513-
String userName = SecurityFilter.getLoginUsername(httpServletRequest);
514-
515-
// 校验超级用户权限
516-
if (!ArrayUtils.contains(DSSCommonConf.SUPER_ADMIN_LIST, userName)) {
517-
return Message.error("仅超级管理员可执行此操作").data("errCode", 90005);
518-
}
519-
520-
request.setOperator(userName);
521-
522-
try {
523-
Cookie[] cookies = httpServletRequest.getCookies();
524-
String ticketId = Arrays.stream(cookies)
525-
.filter(cookie -> DSSWorkFlowConstant.BDP_USER_TICKET_ID.equals(cookie.getName()))
526-
.findFirst().map(Cookie::getValue).get();
527-
dssFlowService.updateTenantVariable(request, ticketId);
528-
} catch (Exception e) {
529-
LOGGER.error("租户变量更新失败, orchestratorName={}, projectName={}",
530-
request.getOrchestratorName(), request.getProjectName(), e);
531-
return Message.error("租户变量更新失败,原因为:" + e.getMessage());
532-
}
533-
534-
return Message.ok("租户变量写入成功");
535-
}
536-
537502
}

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/service/DSSFlowService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,4 @@ QueryNodeInfoByPathResponse queryNodeInfo(Long projectId,
136136

137137
void updateGlobalVariables(UpdateGlobalVariablesRequest request, String ticketId) throws Exception;
138138

139-
void updateTenantVariable(UpdateTenantVariableRequest request, String ticketId) throws Exception;
140-
141139
}

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/service/TenantVariableProtector.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)