status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} private void doBatchOperateProcessDefinition(User loginUser, long targetProjectCode, List<String> failedProcessList, String processDefinitionCodes, Map<String, Object> result, boolean isCopy) { Set<Long> definitionCodes = Arrays.stream(processDefinitionCodes.split(Constants.COMMA)).map(Long::parseLong).collect(Collectors.toSet()); List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(definitionCodes); Set<Long> queryCodes = processDefinitionList.stream().map(ProcessDefinition::getCode).collect(Collectors.toSet()); Set<Long> diffCode = definitionCodes.stream().filter(code -> !queryCodes.contains(code)).collect(Collectors.toSet()); diffCode.forEach(code -> failedProcessList.add(code + "[null]")); for (ProcessDefinition processDefinition : processDefinitionList) { List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode()); List<ProcessTaskRelationLog> taskRelationList = processTaskRelations.stream().map(ProcessTaskRelationLog::new).collect(Collectors.toList()); processDefinition.setProjectCode(targetProjectCode); if (isCopy) { List<TaskDefinitionLog> taskDefinitionLogs = processService.genTaskDefineList(processTaskRelations); Map<Long, Long> taskCodeMap = new HashMap<>(); for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) { if (TaskType.CONDITIONS.getDesc().equals(taskDefinitionLog.getTaskType()) || TaskType.SWITCH.getDesc().equals(taskDefinitionLog.getTaskType()) || TaskType.SUB_PROCESS.getDesc().equals(taskDefinitionLog.getTaskType()) || TaskType.DEPENDENT.getDesc().equals(taskDefinitionLog.getTaskType())) { putMsg(result, Status.NOT_SUPPORT_COPY_TASK_TYPE, taskDefinitionLog.getTaskType()); return; } try {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
long taskCode = CodeGenerateUtils.getInstance().genCode(); taskCodeMap.put(taskDefinitionLog.getCode(), taskCode); taskDefinitionLog.setCode(taskCode); } catch (CodeGenerateException e) { putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS); } taskDefinitionLog.setProjectCode(targetProjectCode); taskDefinitionLog.setVersion(0); taskDefinitionLog.setName(taskDefinitionLog.getName() + "_copy_" + DateUtils.getCurrentTimeStamp()); } for (ProcessTaskRelationLog processTaskRelationLog : taskRelationList) { if (processTaskRelationLog.getPreTaskCode() > 0) { processTaskRelationLog.setPreTaskCode(taskCodeMap.get(processTaskRelationLog.getPreTaskCode())); } if (processTaskRelationLog.getPostTaskCode() > 0) { processTaskRelationLog.setPostTaskCode(taskCodeMap.get(processTaskRelationLog.getPostTaskCode())); } } try { processDefinition.setCode(CodeGenerateUtils.getInstance().genCode()); } catch (CodeGenerateException e) { putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS); } processDefinition.setId(0); processDefinition.setUserId(loginUser.getId()); processDefinition.setName(processDefinition.getName() + "_copy_" + DateUtils.getCurrentTimeStamp()); if (StringUtils.isNotBlank(processDefinition.getLocations())) { ArrayNode jsonNodes = JSONUtils.parseArray(processDefinition.getLocations());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
for (int i = 0; i < jsonNodes.size(); i++) { ObjectNode node = (ObjectNode) jsonNodes.path(i); node.put("taskCode", taskCodeMap.get(node.get("taskCode").asLong())); jsonNodes.set(i, node); } processDefinition.setLocations(JSONUtils.toJsonString(jsonNodes)); } try { result.putAll(createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs)); } catch (Exception e) { putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR); throw new ServiceException(Status.COPY_PROCESS_DEFINITION_ERROR); } } else { try { result.putAll(updateDagDefine(loginUser, taskRelationList, processDefinition, null, Lists.newArrayList())); } catch (Exception e) { putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR); throw new ServiceException(Status.MOVE_PROCESS_DEFINITION_ERROR); } } if (result.get(Constants.STATUS) != Status.SUCCESS) { failedProcessList.add(processDefinition.getCode() + "[" + processDefinition.getName() + "]"); } } } /** * switch the defined process definition version * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param projectCode project code * @param code process definition code * @param version the version user want to switch * @return switch process definition version result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> switchProcessDefinitionVersion(User loginUser, long projectCode, long code, int version) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (Objects.isNull(processDefinition) || projectCode != processDefinition.getProjectCode()) { putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR, code); return result; } ProcessDefinitionLog processDefinitionLog = processDefinitionLogMapper.queryByDefinitionCodeAndVersion(code, version); if (Objects.isNull(processDefinitionLog)) { putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR, processDefinition.getCode(), version); return result; } int switchVersion = processService.switchVersion(processDefinition, processDefinitionLog); if (switchVersion <= 0) { putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR); throw new ServiceException(Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR); } putMsg(result, Status.SUCCESS);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
return result; } /** * check batch operate result * * @param srcProjectCode srcProjectCode * @param targetProjectCode targetProjectCode * @param result result * @param failedProcessList failedProcessList * @param isCopy isCopy */ private void checkBatchOperateResult(long srcProjectCode, long targetProjectCode, Map<String, Object> result, List<String> failedProcessList, boolean isCopy) { if (!failedProcessList.isEmpty()) { if (isCopy) { putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode, String.join(",", failedProcessList)); } else { putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode, String.join(",", failedProcessList)); } } else { putMsg(result, Status.SUCCESS); } } /** * query the pagination versions info by one certain process definition code * * @param loginUser login user info to check auth * @param projectCode project code * @param pageNo page number * @param pageSize page size
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param code process definition code * @return the pagination process definition versions info of the certain process definition */ @Override public Result queryProcessDefinitionVersions(User loginUser, long projectCode, int pageNo, int pageSize, long code) { Result result = new Result(); Project project = projectMapper.queryByCode(projectCode); Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectCode); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { putMsg(result, resultStatus); return result; } PageInfo<ProcessDefinitionLog> pageInfo = new PageInfo<>(pageNo, pageSize); Page<ProcessDefinitionLog> page = new Page<>(pageNo, pageSize); IPage<ProcessDefinitionLog> processDefinitionVersionsPaging = processDefinitionLogMapper.queryProcessDefinitionVersionsPaging(page, code, projectCode); List<ProcessDefinitionLog> processDefinitionLogs = processDefinitionVersionsPaging.getRecords(); pageInfo.setTotalList(processDefinitionLogs); pageInfo.setTotal((int) processDefinitionVersionsPaging.getTotal()); result.setData(pageInfo); putMsg(result, Status.SUCCESS); return result; } /** * delete one certain process definition by version number and process definition code * * @param loginUser login user info to check auth * @param projectCode project code * @param code process definition code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param version version number * @return delete result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> deleteProcessDefinitionVersion(User loginUser, long projectCode, long code, int version) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (processDefinition == null || projectCode != processDefinition.getProjectCode()) { putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, code); } else { if (processDefinition.getVersion() == version) { putMsg(result, Status.MAIN_TABLE_USING_VERSION); return result; } int deleteLog = processDefinitionLogMapper.deleteByProcessDefinitionCodeAndVersion(code, version); int deleteRelationLog = processTaskRelationLogMapper.deleteByCode(processDefinition.getCode(), processDefinition.getVersion()); if (deleteLog == 0 || deleteRelationLog == 0) { putMsg(result, Status.DELETE_PROCESS_DEFINE_BY_CODE_ERROR); throw new ServiceException(Status.DELETE_PROCESS_DEFINE_BY_CODE_ERROR); } putMsg(result, Status.SUCCESS); } return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
/** * create empty process definition * * @param loginUser login user * @param projectCode project code * @param name process definition name * @param description description * @param globalParams globalParams * @param timeout timeout * @param tenantCode tenantCode * @param scheduleJson scheduleJson * @return process definition code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> createEmptyProcessDefinition(User loginUser, long projectCode, String name, String description, String globalParams, int timeout, String tenantCode, String scheduleJson, ProcessExecutionTypeEnum executionType) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
ProcessDefinition definition = processDefinitionMapper.verifyByDefineName(project.getCode(), name); if (definition != null) { putMsg(result, Status.PROCESS_DEFINITION_NAME_EXIST, name); return result; } int tenantId = -1; if (!Constants.DEFAULT.equals(tenantCode)) { Tenant tenant = tenantMapper.queryByTenantCode(tenantCode); if (tenant == null) { putMsg(result, Status.TENANT_NOT_EXIST); return result; } tenantId = tenant.getId(); } long processDefinitionCode; try { processDefinitionCode = CodeGenerateUtils.getInstance().genCode(); } catch (CodeGenerateException e) { putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); return result; } ProcessDefinition processDefinition = new ProcessDefinition(projectCode, name, processDefinitionCode, description, globalParams, "", timeout, loginUser.getId(), tenantId); processDefinition.setExecutionType(executionType); result = createEmptyDagDefine(loginUser, processDefinition); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (StringUtils.isBlank(scheduleJson)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
return result; } Map<String, Object> scheduleResult = createDagSchedule(loginUser, processDefinition, scheduleJson); if (scheduleResult.get(Constants.STATUS) != Status.SUCCESS) { Status scheduleResultStatus = (Status) scheduleResult.get(Constants.STATUS); putMsg(result, scheduleResultStatus); throw new ServiceException(scheduleResultStatus); } return result; } private Map<String, Object> createEmptyDagDefine(User loginUser, ProcessDefinition processDefinition) { Map<String, Object> result = new HashMap<>(); int insertVersion = processService.saveProcessDefine(loginUser, processDefinition, true); if (insertVersion == 0) { putMsg(result, Status.CREATE_PROCESS_DEFINITION_ERROR); throw new ServiceException(Status.CREATE_PROCESS_DEFINITION_ERROR); } putMsg(result, Status.SUCCESS); result.put(Constants.DATA_LIST, processDefinition); return result; } private Map<String, Object> createDagSchedule(User loginUser, ProcessDefinition processDefinition, String scheduleJson) { Map<String, Object> result = new HashMap<>(); Schedule scheduleObj = JSONUtils.parseObject(scheduleJson, Schedule.class); if (scheduleObj == null) { putMsg(result, Status.DATA_IS_NOT_VALID, scheduleJson); throw new ServiceException(Status.DATA_IS_NOT_VALID); } Date now = new Date();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
scheduleObj.setProcessDefinitionCode(processDefinition.getCode()); if (DateUtils.differSec(scheduleObj.getStartTime(), scheduleObj.getEndTime()) == 0) { logger.warn("The start time must not be the same as the end"); putMsg(result, Status.SCHEDULE_START_TIME_END_TIME_SAME); return result; } if (!org.quartz.CronExpression.isValidExpression(scheduleObj.getCrontab())) { logger.error("{} verify failure", scheduleObj.getCrontab()); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, scheduleObj.getCrontab()); return result; } scheduleObj.setWarningType(scheduleObj.getWarningType() == null ? WarningType.NONE : scheduleObj.getWarningType()); scheduleObj.setWarningGroupId(scheduleObj.getWarningGroupId() == 0 ? 1 : scheduleObj.getWarningGroupId()); scheduleObj.setFailureStrategy(scheduleObj.getFailureStrategy() == null ? FailureStrategy.CONTINUE : scheduleObj.getFailureStrategy()); scheduleObj.setCreateTime(now); scheduleObj.setUpdateTime(now); scheduleObj.setUserId(loginUser.getId()); scheduleObj.setReleaseState(ReleaseState.OFFLINE); scheduleObj.setProcessInstancePriority(scheduleObj.getProcessInstancePriority() == null ? Priority.MEDIUM : scheduleObj.getProcessInstancePriority()); scheduleObj.setWorkerGroup(scheduleObj.getWorkerGroup() == null ? "default" : scheduleObj.getWorkerGroup()); scheduleObj.setEnvironmentCode(scheduleObj.getEnvironmentCode() == null ? -1 : scheduleObj.getEnvironmentCode()); scheduleMapper.insert(scheduleObj); putMsg(result, Status.SUCCESS); result.put("scheduleId", scheduleObj.getId()); return result; } /** * update process definition basic info * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param projectCode project code * @param name process definition name * @param code process definition code * @param description description * @param globalParams globalParams * @param timeout timeout * @param tenantCode tenantCode * @param scheduleJson scheduleJson * @param executionType executionType * @return update result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> updateProcessDefinitionBasicInfo(User loginUser, long projectCode, String name, long code, String description, String globalParams, int timeout, String tenantCode, String scheduleJson, ProcessExecutionTypeEnum executionType) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } int tenantId = -1;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
if (!Constants.DEFAULT.equals(tenantCode)) { Tenant tenant = tenantMapper.queryByTenantCode(tenantCode); if (tenant == null) { putMsg(result, Status.TENANT_NOT_EXIST); return result; } tenantId = tenant.getId(); } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (processDefinition == null || projectCode != processDefinition.getProjectCode()) { putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, code); return result; } if (processDefinition.getReleaseState() == ReleaseState.ONLINE) { putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefinition.getName()); return result; } if (!name.equals(processDefinition.getName())) { ProcessDefinition definition = processDefinitionMapper.verifyByDefineName(project.getCode(), name); if (definition != null) { putMsg(result, Status.PROCESS_DEFINITION_NAME_EXIST, name); return result; } } ProcessDefinition processDefinitionDeepCopy = JSONUtils.parseObject(JSONUtils.toJsonString(processDefinition), ProcessDefinition.class); processDefinition.set(projectCode, name, description, globalParams, "", timeout, tenantId); processDefinition.setExecutionType(executionType);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
List<ProcessTaskRelationLog> taskRelationList = processTaskRelationLogMapper.queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion()); result = updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy, Lists.newArrayList()); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (StringUtils.isBlank(scheduleJson)) { return result; } Map<String, Object> scheduleResult = updateDagSchedule(loginUser, projectCode, code, scheduleJson); if (scheduleResult.get(Constants.STATUS) != Status.SUCCESS) { Status scheduleResultStatus = (Status) scheduleResult.get(Constants.STATUS); putMsg(result, scheduleResultStatus); throw new ServiceException(scheduleResultStatus); } return result; } private Map<String, Object> updateDagSchedule(User loginUser, long projectCode, long processDefinitionCode, String scheduleJson) { Map<String, Object> result = new HashMap<>(); Schedule schedule = JSONUtils.parseObject(scheduleJson, Schedule.class); if (schedule == null) { putMsg(result, Status.DATA_IS_NOT_VALID, scheduleJson); throw new ServiceException(Status.DATA_IS_NOT_VALID); } FailureStrategy failureStrategy = schedule.getFailureStrategy() == null ? FailureStrategy.CONTINUE : schedule.getFailureStrategy(); WarningType warningType = schedule.getWarningType() == null ? WarningType.NONE : schedule.getWarningType();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
Priority processInstancePriority = schedule.getProcessInstancePriority() == null ? Priority.MEDIUM : schedule.getProcessInstancePriority(); int warningGroupId = schedule.getWarningGroupId() == 0 ? 1 : schedule.getWarningGroupId(); String workerGroup = schedule.getWorkerGroup() == null ? "default" : schedule.getWorkerGroup(); long environmentCode = schedule.getEnvironmentCode() == null ? -1 : schedule.getEnvironmentCode(); ScheduleParam param = new ScheduleParam(); param.setStartTime(schedule.getStartTime()); param.setEndTime(schedule.getEndTime()); param.setCrontab(schedule.getCrontab()); param.setTimezoneId(schedule.getTimezoneId()); return schedulerService.updateScheduleByProcessDefinitionCode( loginUser, projectCode, processDefinitionCode, JSONUtils.toJsonString(param), warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode); } /** * release process definition and schedule * * @param loginUser login user * @param projectCode project code * @param code process definition code * @param releaseState releaseState * @return update result code */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
@Transactional(rollbackFor = RuntimeException.class) @Override public Map<String, Object> releaseWorkflowAndSchedule(User loginUser, long projectCode, long code, ReleaseState releaseState) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (null == releaseState) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, RELEASESTATE); return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (processDefinition == null) { putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, code); return result; } Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(code); if (scheduleObj == null) { putMsg(result, Status.SCHEDULE_CRON_NOT_EXISTS, "processDefinitionCode:" + code); return result; } switch (releaseState) { case ONLINE: List<ProcessTaskRelation> relationList = processService.findRelationByCode(projectCode, code); if (CollectionUtils.isEmpty(relationList)) { putMsg(result, Status.PROCESS_DAG_IS_EMPTY); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,825
[Bug] [API] The create time and update time of an imported process are still the original process's.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I use the function of importing process the create time and update time of the new process are still same to the original process. ![image](https://user-images.githubusercontent.com/4928204/148210293-7a3ba55f-5c35-48c1-8f72-0fbb1e769f6e.png) ### What you expected to happen I expect that the new process should have the correct time for the properties of 'create time' and 'update time'. ### How to reproduce 1.Choose a process and then export it. 2.Import the process json file and you will see that. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7825
https://github.com/apache/dolphinscheduler/pull/7828
0911fd711d84a3aa6febf26246a146ec4af3bfc9
a8d19f271a40a0e0f4fe28bddb28f9941d13c703
2022-01-05T11:26:21Z
java
2022-01-06T01:57:31Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} processDefinition.setReleaseState(releaseState); processDefinitionMapper.updateById(processDefinition); scheduleObj.setReleaseState(ReleaseState.ONLINE); scheduleMapper.updateById(scheduleObj); break; case OFFLINE: processDefinition.setReleaseState(releaseState); int updateProcess = processDefinitionMapper.updateById(processDefinition); if (updateProcess > 0) { logger.info("set schedule offline, project code: {}, schedule id: {}, process definition code: {}", projectCode, scheduleObj.getId(), code); scheduleObj.setReleaseState(ReleaseState.OFFLINE); int updateSchedule = scheduleMapper.updateById(scheduleObj); if (updateSchedule == 0) { putMsg(result, Status.OFFLINE_SCHEDULE_ERROR); throw new ServiceException(Status.OFFLINE_SCHEDULE_ERROR); } schedulerService.deleteSchedule(project.getId(), scheduleObj.getId()); } break; default: putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, RELEASESTATE); return result; } putMsg(result, Status.SUCCESS); return result; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,656
[Bug] [ci] CI is unstable and will random failure
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened CI is unstable and will fail @zhongjiajie ### What you expected to happen It may be a configuration problem ### How to reproduce Submit code to request detection when merging ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7656
https://github.com/apache/dolphinscheduler/pull/7847
ae09702b351c71babf2c93996e56a1358eb71d39
079adc9eca5271462f664cb517491ecd24d17953
2021-12-28T01:21:40Z
java
2022-01-06T09:29:06Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
/* * Licensed to Apache Software Foundation (ASF) under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Apache Software Foundation (ASF) licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.dolphinscheduler.e2e.pages.security; import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.FindBys; import org.openqa.selenium.support.PageFactory; import lombok.Getter; @Getter
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,656
[Bug] [ci] CI is unstable and will random failure
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened CI is unstable and will fail @zhongjiajie ### What you expected to happen It may be a configuration problem ### How to reproduce Submit code to request detection when merging ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7656
https://github.com/apache/dolphinscheduler/pull/7847
ae09702b351c71babf2c93996e56a1358eb71d39
079adc9eca5271462f664cb517491ecd24d17953
2021-12-28T01:21:40Z
java
2022-01-06T09:29:06Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
public final class TenantPage extends NavBarPage implements SecurityPage.Tab { @FindBy(id = "btnCreateTenant") private WebElement buttonCreateTenant; @FindBy(className = "items") private List<WebElement> tenantList; @FindBys({ @FindBy(className = "el-popconfirm"), @FindBy(className = "el-button--primary"), }) private WebElement buttonConfirm; private final CreateTenantForm createTenantForm; public TenantPage(RemoteWebDriver driver) { super(driver); createTenantForm = new CreateTenantForm(); } public TenantPage create(String tenant) { return create(tenant, ""); } public TenantPage create(String tenant, String description) { buttonCreateTenant().click(); createTenantForm().inputTenantCode().sendKeys(tenant); createTenantForm().inputDescription().sendKeys(description);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,656
[Bug] [ci] CI is unstable and will random failure
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened CI is unstable and will fail @zhongjiajie ### What you expected to happen It may be a configuration problem ### How to reproduce Submit code to request detection when merging ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7656
https://github.com/apache/dolphinscheduler/pull/7847
ae09702b351c71babf2c93996e56a1358eb71d39
079adc9eca5271462f664cb517491ecd24d17953
2021-12-28T01:21:40Z
java
2022-01-06T09:29:06Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
createTenantForm().buttonSubmit().click(); return this; } public TenantPage delete(String tenant) { tenantList() .stream() .filter(it -> it.getText().contains(tenant)) .findFirst() .ifPresent(it -> it.findElement(By.className("delete")).click()); buttonConfirm().click(); return this; } @Getter public class CreateTenantForm { CreateTenantForm() { PageFactory.initElements(driver, this); } @FindBy(id = "inputTenantCode") private WebElement inputTenantCode; @FindBy(id = "selectQueue") private WebElement selectQueue; @FindBy(id = "inputDescription") private WebElement inputDescription; @FindBy(id = "btnSubmit") private WebElement buttonSubmit; @FindBy(id = "btnCancel") private WebElement buttonCancel; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.controller; import static org.apache.dolphinscheduler.api.enums.Status.CHECK_PROCESS_DEFINITION_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.EXECUTE_PROCESS_INSTANCE_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.START_PROCESS_INSTANCE_ERROR; import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation; import org.apache.dolphinscheduler.api.enums.ExecuteType; import org.apache.dolphinscheduler.api.exceptions.ApiException; import org.apache.dolphinscheduler.api.service.ExecutorService; import org.apache.dolphinscheduler.api.utils.Result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.enums.TaskDependType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.entity.User; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import springfox.documentation.annotations.ApiIgnore; /** * executor controller */ @Api(tags = "EXECUTOR_TAG") @RestController
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
@RequestMapping("projects/{projectCode}/executors") public class ExecutorController extends BaseController { @Autowired private ExecutorService execService; /** * execute process instance * * @param loginUser login user * @param projectCode project code * @param processDefinitionCode process definition code * @param scheduleTime schedule time * @param failureStrategy failure strategy * @param startNodeList start nodes list * @param taskDependType task depend type * @param execType execute type * @param warningType warning type * @param warningGroupId warning group id * @param runMode run mode * @param processInstancePriority process instance priority * @param workerGroup worker group * @param timeout timeout * @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode * @return start process result code */ @ApiOperation(value = "startProcessInstance", notes = "RUN_PROCESS_INSTANCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100"), @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataType = "String"), @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"), @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
@ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataType = "TaskDependType"), @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType = "CommandType"), @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataType = "WarningType"), @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "runMode", value = "RUN_MODE", dataType = "RunMode"), @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", required = true, dataType = "Priority"), @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"), @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long", example = "-1"), @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataType = "Int", example = "100"), @ApiImplicitParam(name = "expectedParallelismNumber", value = "EXPECTED_PARALLELISM_NUMBER", dataType = "Int", example = "8") }) @PostMapping(value = "start-process-instance") @ResponseStatus(HttpStatus.OK) @ApiException(START_PROCESS_INSTANCE_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result startProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam(value = "processDefinitionCode") long processDefinitionCode, @RequestParam(value = "scheduleTime", required = false) String scheduleTime, @RequestParam(value = "failureStrategy", required = true) FailureStrategy failureStrategy, @RequestParam(value = "startNodeList", required = false) String startNodeList, @RequestParam(value = "taskDependType", required = false) TaskDependType taskDependType, @RequestParam(value = "execType", required = false) CommandType execType, @RequestParam(value = "warningType", required = true) WarningType warningType, @RequestParam(value = "warningGroupId", required = false) int warningGroupId, @RequestParam(value = "runMode", required = false) RunMode runMode, @RequestParam(value = "processInstancePriority", required = false) Priority processInstancePriority, @RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup, @RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode, @RequestParam(value = "timeout", required = false) Integer timeout,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
@RequestParam(value = "startParams", required = false) String startParams, @RequestParam(value = "expectedParallelismNumber", required = false) Integer expectedParallelismNumber, @RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun) { if (timeout == null) { timeout = Constants.MAX_TASK_TIMEOUT; } Map<String, String> startParamMap = null; if (startParams != null) { startParamMap = JSONUtils.toMap(startParams); } Map<String, Object> result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime, execType, failureStrategy, startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority, workerGroup, environmentCode,timeout, startParamMap, expectedParallelismNumber, dryRun); return returnDataList(result); } /** * do action to process instance:pause, stop, repeat, recover from pause, recover from stop * * @param loginUser login user * @param projectCode project code * @param processInstanceId process instance id * @param executeType execute type * @return execute result code */ @ApiOperation(value = "execute", notes = "EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataType = "ExecuteType") }) @PostMapping(value = "/execute") @ResponseStatus(HttpStatus.OK)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
@ApiException(EXECUTE_PROCESS_INSTANCE_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result execute(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam("processInstanceId") Integer processInstanceId, @RequestParam("executeType") ExecuteType executeType ) { Map<String, Object> result = execService.execute(loginUser, projectCode, processInstanceId, executeType); return returnDataList(result); } /** * check process definition and all the son process definitions is online. * * @param processDefinitionCode process definition code * @return check result code */ @ApiOperation(value = "startCheckProcessDefinition", notes = "START_CHECK_PROCESS_DEFINITION_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100") }) @PostMapping(value = "/start-check") @ResponseStatus(HttpStatus.OK) @ApiException(CHECK_PROCESS_DEFINITION_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result startCheckProcessDefinition(@RequestParam(value = "processDefinitionCode") long processDefinitionCode) { Map<String, Object> result = execService.startCheckByProcessDefinedCode(processDefinitionCode); return returnDataList(result); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.enums; import java.util.Locale; import java.util.Optional; import org.springframework.context.i18n.LocaleContextHolder;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
/** * status enum // todo #4855 One category one interval */ public enum Status { SUCCESS(0, "success", "成功"), INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"), REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"), TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"), USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"), USER_NAME_NULL(10004, "user name is null", "用户名不能为空"), HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"), TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"), OS_TENANT_CODE_EXIST(10009, "os tenant code {0} already exists", "操作系统租户[{0}]已存在"), USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"), ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"), ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"), USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"), LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"), DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"), DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"), TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"), PROJECT_NOT_FOUND(10018, "project {0} not found ", "项目[{0}]不存在"), PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"), TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"), TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"), SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"), SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"), SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"), MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"), SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"), QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup error", "查询告警组错误"), LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"), UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"), DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"), ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"), CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"), UPDATE_DATASOURCE_ERROR(10034, "update datasource error", "更新数据源错误"), QUERY_DATASOURCE_ERROR(10035, "query datasource error", "查询数据源错误"), CONNECT_DATASOURCE_FAILURE(10036, "connect datasource failure", "建立数据源连接失败"), CONNECTION_TEST_FAILURE(10037, "connection test failure", "测试数据源连接失败"), DELETE_DATA_SOURCE_FAILURE(10038, "delete data source failure", "删除数据源失败"), VERIFY_DATASOURCE_NAME_FAILURE(10039, "verify datasource name failure", "验证数据源名称失败"), UNAUTHORIZED_DATASOURCE(10040, "unauthorized datasource", "未经授权的数据源"), AUTHORIZED_DATA_SOURCE(10041, "authorized data source", "授权数据源失败"), LOGIN_SUCCESS(10042, "login success", "登录成功"), USER_LOGIN_FAILURE(10043, "user login failure", "用户登录失败"), LIST_WORKERS_ERROR(10044, "list workers error", "查询worker列表错误"), LIST_MASTERS_ERROR(10045, "list masters error", "查询master列表错误"), UPDATE_PROJECT_ERROR(10046, "update project error", "更新项目信息错误"), QUERY_PROJECT_DETAILS_BY_CODE_ERROR(10047, "query project details by code error", "查询项目详细信息错误"), CREATE_PROJECT_ERROR(10048, "create project error", "创建项目错误"), LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049, "login user query project list paging error", "分页查询项目列表错误"), DELETE_PROJECT_ERROR(10050, "delete project error", "删除项目错误"), QUERY_UNAUTHORIZED_PROJECT_ERROR(10051, "query unauthorized project error", "查询未授权项目错误"), QUERY_AUTHORIZED_PROJECT(10052, "query authorized project", "查询授权项目错误"), QUERY_QUEUE_LIST_ERROR(10053, "query queue list error", "查询队列列表错误"), CREATE_RESOURCE_ERROR(10054, "create resource error", "创建资源错误"), UPDATE_RESOURCE_ERROR(10055, "update resource error", "更新资源错误"), QUERY_RESOURCES_LIST_ERROR(10056, "query resources list error", "查询资源列表错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_RESOURCES_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"), DELETE_RESOURCE_ERROR(10058, "delete resource error", "删除资源错误"), VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059, "verify resource by name and type error", "资源名称或类型验证错误"), VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060, "view resource file online error", "查看资源文件错误"), CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061, "create resource file online error", "创建资源文件错误"), RESOURCE_FILE_IS_EMPTY(10062, "resource file is empty", "资源文件内容不能为空"), EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063, "edit resource file online error", "更新资源文件错误"), DOWNLOAD_RESOURCE_FILE_ERROR(10064, "download resource file error", "下载资源文件错误"), CREATE_UDF_FUNCTION_ERROR(10065, "create udf function error", "创建UDF函数错误"), VIEW_UDF_FUNCTION_ERROR(10066, "view udf function error", "查询UDF函数错误"), UPDATE_UDF_FUNCTION_ERROR(10067, "update udf function error", "更新UDF函数错误"), QUERY_UDF_FUNCTION_LIST_PAGING_ERROR(10068, "query udf function list paging error", "分页查询UDF函数列表错误"), QUERY_DATASOURCE_BY_TYPE_ERROR(10069, "query datasource by type error", "查询数据源信息错误"), VERIFY_UDF_FUNCTION_NAME_ERROR(10070, "verify udf function name error", "UDF函数名称验证错误"), DELETE_UDF_FUNCTION_ERROR(10071, "delete udf function error", "删除UDF函数错误"), AUTHORIZED_FILE_RESOURCE_ERROR(10072, "authorized file resource error", "授权资源文件错误"), AUTHORIZE_RESOURCE_TREE(10073, "authorize resource tree display error", "授权资源目录树错误"), UNAUTHORIZED_UDF_FUNCTION_ERROR(10074, "unauthorized udf function error", "查询未授权UDF函数错误"), AUTHORIZED_UDF_FUNCTION_ERROR(10075, "authorized udf function error", "授权UDF函数错误"), CREATE_SCHEDULE_ERROR(10076, "create schedule error", "创建调度配置错误"), UPDATE_SCHEDULE_ERROR(10077, "update schedule error", "更新调度配置错误"), PUBLISH_SCHEDULE_ONLINE_ERROR(10078, "publish schedule online error", "上线调度配置错误"), OFFLINE_SCHEDULE_ERROR(10079, "offline schedule error", "下线调度配置错误"), QUERY_SCHEDULE_LIST_PAGING_ERROR(10080, "query schedule list paging error", "分页查询调度配置列表错误"), QUERY_SCHEDULE_LIST_ERROR(10081, "query schedule list error", "查询调度配置列表错误"), QUERY_TASK_LIST_PAGING_ERROR(10082, "query task list paging error", "分页查询任务列表错误"), QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083, "query task record list paging error", "分页查询任务记录错误"), CREATE_TENANT_ERROR(10084, "create tenant error", "创建租户错误"), QUERY_TENANT_LIST_PAGING_ERROR(10085, "query tenant list paging error", "分页查询租户列表错误"), QUERY_TENANT_LIST_ERROR(10086, "query tenant list error", "查询租户列表错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
UPDATE_TENANT_ERROR(10087, "update tenant error", "更新租户错误"), DELETE_TENANT_BY_ID_ERROR(10088, "delete tenant by id error", "删除租户错误"), VERIFY_OS_TENANT_CODE_ERROR(10089, "verify os tenant code error", "操作系统租户验证错误"), CREATE_USER_ERROR(10090, "create user error", "创建用户错误"), QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"), UPDATE_USER_ERROR(10092, "update user error", "更新用户错误"), DELETE_USER_BY_ID_ERROR(10093, "delete user by id error", "删除用户错误"), GRANT_PROJECT_ERROR(10094, "grant project error", "授权项目错误"), GRANT_RESOURCE_ERROR(10095, "grant resource error", "授权资源错误"), GRANT_UDF_FUNCTION_ERROR(10096, "grant udf function error", "授权UDF函数错误"), GRANT_DATASOURCE_ERROR(10097, "grant datasource error", "授权数据源错误"), GET_USER_INFO_ERROR(10098, "get user info error", "获取用户信息错误"), USER_LIST_ERROR(10099, "user list error", "查询用户列表错误"), VERIFY_USERNAME_ERROR(10100, "verify username error", "用户名验证错误"), UNAUTHORIZED_USER_ERROR(10101, "unauthorized user error", "查询未授权用户错误"), AUTHORIZED_USER_ERROR(10102, "authorized user error", "查询授权用户错误"), QUERY_TASK_INSTANCE_LOG_ERROR(10103, "view task instance log error", "查询任务实例日志错误"), DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104, "download task instance log file error", "下载任务日志文件错误"), CREATE_PROCESS_DEFINITION_ERROR(10105, "create process definition error", "创建工作流错误"), VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106, "verify process definition name unique error", "工作流定义名称验证错误"), UPDATE_PROCESS_DEFINITION_ERROR(10107, "update process definition error", "更新工作流定义错误"), RELEASE_PROCESS_DEFINITION_ERROR(10108, "release process definition error", "上线工作流错误"), QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR(10109, "query detail of process definition error", "查询工作流详细信息错误"), QUERY_PROCESS_DEFINITION_LIST(10110, "query process definition list", "查询工作流列表错误"), ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR(10111, "encapsulation treeview structure error", "查询工作流树形图数据错误"), GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR(10112, "get tasks list by process definition id error", "查询工作流定义节点信息错误"), QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR(10113, "query process instance list paging error", "分页查询工作流实例列表错误"), QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR(10114, "query task list by process instance id error", "查询任务实例列表错误"), UPDATE_PROCESS_INSTANCE_ERROR(10115, "update process instance error", "更新工作流实例错误"), QUERY_PROCESS_INSTANCE_BY_ID_ERROR(10116, "query process instance by id error", "查询工作流实例错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_PROCESS_INSTANCE_BY_ID_ERROR(10117, "delete process instance by id error", "删除工作流实例错误"), QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR(10118, "query sub process instance detail info by task id error", "查询子流程任务实例错误"), QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR(10119, "query parent process instance detail info by sub process instance id error", "查询子流程该工作流实例错误"), QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR(10120, "query process instance all variables error", "查询工作流自定义变量信息错误"), ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR(10121, "encapsulation process instance gantt structure error", "查询工作流实例甘特图数据错误"), QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122, "query process definition list paging error", "分页查询工作流定义列表错误"), SIGN_OUT_ERROR(10123, "sign out error", "退出错误"), OS_TENANT_CODE_HAS_ALREADY_EXISTS(10124, "os tenant code has already exists", "操作系统租户已存在"), IP_IS_EMPTY(10125, "ip is empty", "IP地址不能为空"), SCHEDULE_CRON_REALEASE_NEED_NOT_CHANGE(10126, "schedule release is already {0}", "调度配置上线错误[{0}]"), CREATE_QUEUE_ERROR(10127, "create queue error", "创建队列错误"), QUEUE_NOT_EXIST(10128, "queue {0} not exists", "队列ID[{0}]不存在"), QUEUE_VALUE_EXIST(10129, "queue value {0} already exists", "队列值[{0}]已存在"), QUEUE_NAME_EXIST(10130, "queue name {0} already exists", "队列名称[{0}]已存在"), UPDATE_QUEUE_ERROR(10131, "update queue error", "更新队列信息错误"), NEED_NOT_UPDATE_QUEUE(10132, "no content changes, no updates are required", "数据未变更,不需要更新队列信息"), VERIFY_QUEUE_ERROR(10133, "verify queue error", "验证队列信息错误"), NAME_NULL(10134, "name must be not null", "名称不能为空"), NAME_EXIST(10135, "name {0} already exists", "名称[{0}]已存在"), SAVE_ERROR(10136, "save error", "保存错误"), DELETE_PROJECT_ERROR_DEFINES_NOT_NULL(10137, "please delete the process definitions in project first!", "请先删除全部工作流定义"), BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR(10117, "batch delete process instance by ids {0} error", "批量删除工作流实例错误: {0}"), PREVIEW_SCHEDULE_ERROR(10139, "preview schedule error", "预览调度配置错误"), PARSE_TO_CRON_EXPRESSION_ERROR(10140, "parse cron to cron expression error", "解析调度表达式错误"), SCHEDULE_START_TIME_END_TIME_SAME(10141, "The start time must not be the same as the end", "开始时间不能和结束时间一样"), DELETE_TENANT_BY_ID_FAIL(10142, "delete tenant by id fail, for there are {0} process instances in executing using it", "删除租户失败,有[{0}]个运行中的工作流实例正在使用"), DELETE_TENANT_BY_ID_FAIL_DEFINES(10143, "delete tenant by id fail, for there are {0} process definitions using it", "删除租户失败,有[{0}]个工作流定义正在使用"), DELETE_TENANT_BY_ID_FAIL_USERS(10144, "delete tenant by id fail, for there are {0} users using it", "删除租户失败,有[{0}]个用户正在使用"), DELETE_WORKER_GROUP_BY_ID_FAIL(10145, "delete worker group by id fail, for there are {0} process instances in executing using it", "删除Worker分组失败,有[{0}]个运行中的工作流实例正在使用"), QUERY_WORKER_GROUP_FAIL(10146, "query worker group fail ", "查询worker分组失败"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_WORKER_GROUP_FAIL(10147, "delete worker group fail ", "删除worker分组失败"), USER_DISABLED(10148, "The current user is disabled", "当前用户已停用"), COPY_PROCESS_DEFINITION_ERROR(10149, "copy process definition from {0} to {1} error : {2}", "从{0}复制工作流到{1}错误 : {2}"), MOVE_PROCESS_DEFINITION_ERROR(10150, "move process definition from {0} to {1} error : {2}", "从{0}移动工作流到{1}错误 : {2}"), SWITCH_PROCESS_DEFINITION_VERSION_ERROR(10151, "Switch process definition version error", "切换工作流版本出错"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR(10152 , "Switch process definition version error: not exists process definition, [process definition id {0}]", "切换工作流版本出错:工作流不存在,[工作流id {0}]"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR(10153 , "Switch process definition version error: not exists process definition version, [process definition id {0}] [version number {1}]", "切换工作流版本出错:工作流版本信息不存在,[工作流id {0}] [版本号 {1}]"), QUERY_PROCESS_DEFINITION_VERSIONS_ERROR(10154, "query process definition versions error", "查询工作流历史版本信息出错"), DELETE_PROCESS_DEFINITION_VERSION_ERROR(10156, "delete process definition version error", "删除工作流历史版本出错"), QUERY_USER_CREATED_PROJECT_ERROR(10157, "query user created project error error", "查询用户创建的项目错误"), PROCESS_DEFINITION_CODES_IS_EMPTY(10158, "process definition codes is empty", "工作流CODES不能为空"), BATCH_COPY_PROCESS_DEFINITION_ERROR(10159, "batch copy process definition error", "复制工作流错误"), BATCH_MOVE_PROCESS_DEFINITION_ERROR(10160, "batch move process definition error", "移动工作流错误"), QUERY_WORKFLOW_LINEAGE_ERROR(10161, "query workflow lineage error", "查询血缘失败"), QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR(10162, "query authorized and user created project error error", "查询授权的和用户创建的项目错误"), DELETE_PROCESS_DEFINITION_BY_CODE_FAIL(10163, "delete process definition by code fail, for there are {0} process instances in executing using it", "删除工作流定义失败,有[{0}]个运行中的工作流实例正在使用"), CHECK_OS_TENANT_CODE_ERROR(10164, "Please enter the English os tenant code", "请输入英文操作系统租户"), FORCE_TASK_SUCCESS_ERROR(10165, "force task success error", "强制成功任务实例错误"), TASK_INSTANCE_STATE_OPERATION_ERROR(10166, "the status of task instance {0} is {1},Cannot perform force success operation", "任务实例[{0}]的状态是[{1}],无法执行强制成功操作"), DATASOURCE_TYPE_NOT_EXIST(10167, "data source type not exist", "数据源类型不存在"), PROCESS_DEFINITION_NAME_EXIST(10168, "process definition name {0} already exists", "工作流定义名称[{0}]已存在"), DATASOURCE_DB_TYPE_ILLEGAL(10169, "datasource type illegal", "数据源类型参数不合法"), DATASOURCE_PORT_ILLEGAL(10170, "datasource port illegal", "数据源端口参数不合法"), DATASOURCE_OTHER_PARAMS_ILLEGAL(10171, "datasource other params illegal", "数据源其他参数不合法"), DATASOURCE_NAME_ILLEGAL(10172, "datasource name illegal", "数据源名称不合法"), DATASOURCE_HOST_ILLEGAL(10173, "datasource host illegal", "数据源HOST不合法"), DELETE_WORKER_GROUP_NOT_EXIST(10174, "delete worker group not exist ", "删除worker分组不存在"), CREATE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10175, "create worker group forbidden in docker ", "创建worker分组在docker中禁止"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10176, "delete worker group forbidden in docker ", "删除worker分组在docker中禁止"), WORKER_ADDRESS_INVALID(10177, "worker address {0} invalid", "worker地址[{0}]无效"), QUERY_WORKER_ADDRESS_LIST_FAIL(10178, "query worker address list fail ", "查询worker地址列表失败"), TRANSFORM_PROJECT_OWNERSHIP(10179, "Please transform project ownership [{0}]", "请先转移项目所有权[{0}]"), QUERY_ALERT_GROUP_ERROR(10180, "query alert group error", "查询告警组错误"), CURRENT_LOGIN_USER_TENANT_NOT_EXIST(10181, "the tenant of the currently login user is not specified", "未指定当前登录用户的租户"), REVOKE_PROJECT_ERROR(10182, "revoke project error", "撤销项目授权错误"), QUERY_AUTHORIZED_USER(10183, "query authorized user error", "查询拥有项目权限的用户错误"), PROJECT_NOT_EXIST(10190, "This project was not found. Please refresh page.", "该项目不存在,请刷新页面"), UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"), UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"), RESOURCE_NOT_EXIST(20004, "resource not exist", "资源不存在"), RESOURCE_EXIST(20005, "resource already exists", "资源已存在"), RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing", "资源文件后缀不支持查看"), RESOURCE_SIZE_EXCEED_LIMIT(20007, "upload resource file size exceeds limit", "上传资源文件大小超过限制"), RESOURCE_SUFFIX_FORBID_CHANGE(20008, "resource suffix not allowed to be modified", "资源文件后缀不支持修改"), UDF_RESOURCE_SUFFIX_NOT_JAR(20009, "UDF resource suffix name must be jar", "UDF资源文件后缀名只支持[jar]"), HDFS_COPY_FAIL(20010, "hdfs copy {0} -> {1} fail", "hdfs复制失败:[{0}] -> [{1}]"), RESOURCE_FILE_EXIST(20011, "resource file {0} already exists in hdfs,please delete it or change name!", "资源文件[{0}]在hdfs中已存在,请删除或修改资源名"), RESOURCE_FILE_NOT_EXIST(20012, "resource file {0} not exists in hdfs!", "资源文件[{0}]在hdfs中不存在"), UDF_RESOURCE_IS_BOUND(20013, "udf resource file is bound by UDF functions:{0}", "udf函数绑定了资源文件[{0}]"), RESOURCE_IS_USED(20014, "resource file is used by process definition", "资源文件被上线的流程定义使用了"), PARENT_RESOURCE_NOT_EXIST(20015, "parent resource not exist", "父资源文件不存在"), RESOURCE_NOT_EXIST_OR_NO_PERMISSION(20016, "resource not exist or no permission,please view the task node and remove error resource", "请检查任务节点并移除无权限或者已删除的资源"), RESOURCE_IS_AUTHORIZED(20017, "resource is authorized to user {0},suffix not allowed to be modified", "资源文件已授权其他用户[{0}],后缀不允许修改"), USER_NO_OPERATION_PERM(30001, "user has no operation privilege", "当前用户没有操作权限"), USER_NO_OPERATION_PROJECT_PERM(30002, "user {0} is not has project {1} permission", "当前用户[{0}]没有[{1}]项目的操作权限"), PROCESS_INSTANCE_NOT_EXIST(50001, "process instance {0} does not exist", "工作流实例[{0}]不存在"), PROCESS_INSTANCE_EXIST(50002, "process instance {0} already exists", "工作流实例[{0}]已存在"), PROCESS_DEFINE_NOT_EXIST(50003, "process definition {0} does not exist", "工作流定义[{0}]不存在"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_DEFINE_NOT_RELEASE(50004, "process definition {0} not on line", "工作流定义[{0}]不是上线状态"), PROCESS_INSTANCE_ALREADY_CHANGED(50005, "the status of process instance {0} is already {1}", "工作流实例[{0}]的状态已经是[{1}]"), PROCESS_INSTANCE_STATE_OPERATION_ERROR(50006, "the status of process instance {0} is {1},Cannot perform {2} operation", "工作流实例[{0}]的状态是[{1}],无法执行[{2}]操作"), SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"), PROCESS_DEFINE_NOT_ALLOWED_EDIT(50008, "process definition {0} does not allow edit", "工作流定义[{0}]不允许修改"), PROCESS_INSTANCE_EXECUTING_COMMAND(50009, "process instance {0} is executing the command, please wait ...", "工作流实例[{0}]正在执行命令,请稍等..."), PROCESS_INSTANCE_NOT_SUB_PROCESS_INSTANCE(50010, "process instance {0} is not sub process instance", "工作流实例[{0}]不是子工作流实例"), TASK_INSTANCE_STATE_COUNT_ERROR(50011, "task instance state count error", "查询各状态任务实例数错误"), COUNT_PROCESS_INSTANCE_STATE_ERROR(50012, "count process instance state error", "查询各状态流程实例数错误"), COUNT_PROCESS_DEFINITION_USER_ERROR(50013, "count process definition user error", "查询各用户流程定义数错误"), START_PROCESS_INSTANCE_ERROR(50014, "start process instance error", "运行工作流实例错误"), EXECUTE_PROCESS_INSTANCE_ERROR(50015, "execute process instance error", "操作工作流实例错误"), CHECK_PROCESS_DEFINITION_ERROR(50016, "check process definition error", "工作流定义错误"), QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR(50017, "query recipients and copyers by process definition error", "查询收件人和抄送人错误"), DATA_IS_NOT_VALID(50017, "data {0} not valid", "数据[{0}]无效"), DATA_IS_NULL(50018, "data {0} is null", "数据[{0}]不能为空"), PROCESS_NODE_HAS_CYCLE(50019, "process node has cycle", "流程节点间存在循环依赖"), PROCESS_NODE_S_PARAMETER_INVALID(50020, "process node {0} parameter invalid", "流程节点[{0}]参数无效"), PROCESS_DEFINE_STATE_ONLINE(50021, "process definition [{0}] is already on line", "工作流定义[{0}]已上线"), DELETE_PROCESS_DEFINE_BY_CODE_ERROR(50022, "delete process definition by code error", "删除工作流定义错误"), SCHEDULE_CRON_STATE_ONLINE(50023, "the status of schedule {0} is already on line", "调度配置[{0}]已上线"), DELETE_SCHEDULE_CRON_BY_ID_ERROR(50024, "delete schedule by id error", "删除调度配置错误"), BATCH_DELETE_PROCESS_DEFINE_ERROR(50025, "batch delete process definition error", "批量删除工作流定义错误"), BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR(50026, "batch delete process definition by codes {0} error", "批量删除工作流定义[{0}]错误"), TENANT_NOT_SUITABLE(50027, "there is not any tenant suitable, please choose a tenant available.", "没有合适的租户,请选择可用的租户"), EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028, "export process definition by id error", "导出工作流定义错误"), BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028, "batch export process definition by ids error", "批量导出工作流定义错误"), IMPORT_PROCESS_DEFINE_ERROR(50029, "import process definition error", "导入工作流定义错误"), TASK_DEFINE_NOT_EXIST(50030, "task definition [{0}] does not exist", "任务定义[{0}]不存在"), CREATE_PROCESS_TASK_RELATION_ERROR(50032, "create process task relation error", "创建工作流任务关系错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_TASK_RELATION_NOT_EXIST(50033, "process task relation [{0}] does not exist", "工作流任务关系[{0}]不存在"), PROCESS_TASK_RELATION_EXIST(50034, "process task relation is already exist, processCode:[{0}]", "工作流任务关系已存在, processCode:[{0}]"), PROCESS_DAG_IS_EMPTY(50035, "process dag is empty", "工作流dag是空"), CHECK_PROCESS_TASK_RELATION_ERROR(50036, "check process task relation error", "工作流任务关系参数错误"), CREATE_TASK_DEFINITION_ERROR(50037, "create task definition error", "创建任务错误"), UPDATE_TASK_DEFINITION_ERROR(50038, "update task definition error", "更新任务定义错误"), QUERY_TASK_DEFINITION_VERSIONS_ERROR(50039, "query task definition versions error", "查询任务历史版本信息出错"), SWITCH_TASK_DEFINITION_VERSION_ERROR(50040, "Switch task definition version error", "切换任务版本出错"), DELETE_TASK_DEFINITION_VERSION_ERROR(50041, "delete task definition version error", "删除任务历史版本出错"), DELETE_TASK_DEFINE_BY_CODE_ERROR(50042, "delete task definition by code error", "删除任务定义错误"), QUERY_DETAIL_OF_TASK_DEFINITION_ERROR(50043, "query detail of task definition error", "查询任务详细信息错误"), QUERY_TASK_DEFINITION_LIST_PAGING_ERROR(50044, "query task definition list paging error", "分页查询任务定义列表错误"), TASK_DEFINITION_NAME_EXISTED(50045, "task definition name [{0}] already exists", "任务定义名称[{0}]已经存在"), RELEASE_TASK_DEFINITION_ERROR(50046, "release task definition error", "上线任务错误"), MOVE_PROCESS_TASK_RELATION_ERROR(50047, "move process task relation error", "移动任务到其他工作流错误"), DELETE_TASK_PROCESS_RELATION_ERROR(50048, "delete process task relation error", "删除工作流任务关系错误"), QUERY_TASK_PROCESS_RELATION_ERROR(50049, "query process task relation error", "查询工作流任务关系错误"), TASK_DEFINE_STATE_ONLINE(50050, "task definition [{0}] is already on line", "任务定义[{0}]已上线"), TASK_HAS_DOWNSTREAM(50051, "Task exists downstream [{0}] dependence", "任务存在下游[{0}]依赖"), TASK_HAS_UPSTREAM(50052, "Task [{0}] exists upstream dependence", "任务[{0}]存在上游依赖"), MAIN_TABLE_USING_VERSION(50053, "the version that the master table is using", "主表正在使用该版本"), PROJECT_PROCESS_NOT_MATCH(50054, "the project and the process is not match", "项目和工作流不匹配"), DELETE_EDGE_ERROR(50055, "delete edge error", "删除工作流任务连接线错误"), NOT_SUPPORT_UPDATE_TASK_DEFINITION(50056, "task state does not support modification", "当前任务不支持修改"), NOT_SUPPORT_COPY_TASK_TYPE(50057, "task type [{0}] does not support copy", "不支持复制的任务类型[{0}]"), HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"), /** * for monitor */ QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
CREATE_ACCESS_TOKEN_ERROR(70010, "create access token error", "创建访问token错误"), GENERATE_TOKEN_ERROR(70011, "generate token error", "生成token错误"), QUERY_ACCESSTOKEN_LIST_PAGING_ERROR(70012, "query access token list paging error", "分页查询访问token列表错误"), UPDATE_ACCESS_TOKEN_ERROR(70013, "update access token error", "更新访问token错误"), DELETE_ACCESS_TOKEN_ERROR(70014, "delete access token error", "删除访问token错误"), ACCESS_TOKEN_NOT_EXIST(70015, "access token not exist", "访问token不存在"), QUERY_ACCESSTOKEN_BY_USER_ERROR(70016, "query access token by user error", "查询访问指定用户的token错误"), COMMAND_STATE_COUNT_ERROR(80001, "task instance state count error", "查询各状态任务实例数错误"), NEGTIVE_SIZE_NUMBER_ERROR(80002, "query size number error", "查询size错误"), START_TIME_BIGGER_THAN_END_TIME_ERROR(80003, "start time bigger than end time error", "开始时间在结束时间之后错误"), QUEUE_COUNT_ERROR(90001, "queue count error", "查询队列数据错误"), KERBEROS_STARTUP_STATE(100001, "get kerberos startup state error", "获取kerberos启动状态错误"), //plugin PLUGIN_NOT_A_UI_COMPONENT(110001, "query plugin error, this plugin has no UI component", "查询插件错误,此插件无UI组件"), QUERY_PLUGINS_RESULT_IS_NULL(110002, "query plugins result is null", "查询插件为空"), QUERY_PLUGINS_ERROR(110003, "query plugins error", "查询插件错误"), QUERY_PLUGIN_DETAIL_RESULT_IS_NULL(110004, "query plugin detail result is null", "查询插件详情结果为空"), UPDATE_ALERT_PLUGIN_INSTANCE_ERROR(110005, "update alert plugin instance error", "更新告警组和告警组插件实例错误"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR(110006, "delete alert plugin instance error", "删除告警组和告警组插件实例错误"), GET_ALERT_PLUGIN_INSTANCE_ERROR(110007, "get alert plugin instance error", "获取告警组和告警组插件实例错误"), CREATE_ALERT_PLUGIN_INSTANCE_ERROR(110008, "create alert plugin instance error", "创建告警组和告警组插件实例错误"), QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR(110009, "query all alert plugin instance error", "查询所有告警实例失败"), PLUGIN_INSTANCE_ALREADY_EXIT(110010, "plugin instance already exit", "该告警插件实例已存在"), LIST_PAGING_ALERT_PLUGIN_INSTANCE_ERROR(110011, "query plugin instance page error", "分页查询告警实例失败"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR_HAS_ALERT_GROUP_ASSOCIATED(110012, "failed to delete the alert instance, there is an alarm group associated with this alert instance", "删除告警实例失败,存在与此告警实例关联的警报组"), PROCESS_DEFINITION_VERSION_IS_USED(110013,"this process definition version is used","此工作流定义版本被使用"), CREATE_ENVIRONMENT_ERROR(120001, "create environment error", "创建环境失败"), ENVIRONMENT_NAME_EXISTS(120002,"this enviroment name [{0}] already exists","环境名称[{0}]已经存在"), ENVIRONMENT_NAME_IS_NULL(120003,"this enviroment name shouldn't be empty.","环境名称不能为空"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
ENVIRONMENT_CONFIG_IS_NULL(120004,"this enviroment config shouldn't be empty.","环境配置信息不能为空"), UPDATE_ENVIRONMENT_ERROR(120005, "update environment [{0}] info error", "更新环境[{0}]信息失败"), DELETE_ENVIRONMENT_ERROR(120006, "delete environment error", "删除环境信息失败"), DELETE_ENVIRONMENT_RELATED_TASK_EXISTS(120007, "this environment has been used in tasks,so you can't delete it.", "该环境已经被任务使用,所以不能删除该环境信息"), QUERY_ENVIRONMENT_BY_NAME_ERROR(1200008, "not found environment [{0}] ", "查询环境名称[{0}]信息不存在"), QUERY_ENVIRONMENT_BY_CODE_ERROR(1200009, "not found environment [{0}] ", "查询环境编码[{0}]不存在"), QUERY_ENVIRONMENT_ERROR(1200010, "login user query environment error", "分页查询环境列表错误"), VERIFY_ENVIRONMENT_ERROR(1200011, "verify environment error", "验证环境信息错误"), TASK_GROUP_NAME_EXSIT(130001,"this task group name is repeated in a project","该任务组名称在一个项目中已经使用"), TASK_GROUP_SIZE_ERROR(130002,"task group size error","任务组大小应该为大于1的整数"), TASK_GROUP_STATUS_ERROR(130003,"task group status error","任务组已经被关闭"), TASK_GROUP_FULL(130004,"task group is full","任务组已经满了"), TASK_GROUP_USED_SIZE_ERROR(130005,"the used size number of task group is dirty","任务组使用的容量发生了变化"), TASK_GROUP_QUEUE_RELEASE_ERROR(130006,"relase task group queue failed","任务组资源释放时出现了错误"), TASK_GROUP_QUEUE_AWAKE_ERROR(130007,"awake waiting task failed","任务组使唤醒等待任务时发生了错误"), CREATE_TASK_GROUP_ERROR(130008,"create task group error","创建任务组错误"), UPDATE_TASK_GROUP_ERROR(130009,"update task group list error","更新任务组错误"), QUERY_TASK_GROUP_LIST_ERROR(130010,"query task group list error","查询任务组列表错误"), CLOSE_TASK_GROUP_ERROR(130011,"close task group error","关闭任务组错误"), START_TASK_GROUP_ERROR(130012,"start task group error","启动任务组错误"), QUERY_TASK_GROUP_QUEUE_LIST_ERROR(130013,"query task group queue list error","查询任务组队列列表错误"), TASK_GROUP_CACHE_START_FAILED(130014,"cache s ENVIRONMENT_WORKER_GROUPS_IS_INVALID(130015, "environment worker groups is invalid format", "环境关联的工作组参数解析错误"), UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR(130016,"You can't modify the worker group, because the worker group [{0}] and this environment [{1}] already be used in the task [{2}]", "您不能修改工作组选项,因为该工作组 [{0}] 和 该环境 [{1}] 已经被用在任务 [{2}] 中"), TASK_GROUP_QUEUE_ALREADY_START(130017, "task group queue already start", "节点已经获取任务组资源") ; private final int code; private final String enMsg; private final String zhMsg;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,769
[Feature][API] Add batch start process api
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Add batch start process api. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7769
https://github.com/apache/dolphinscheduler/pull/7771
46c39cdff98cc0ae3222a42e3e1f9c0288e0a40a
f2541248eb85f7977f75a3be3c7419688d20d713
2022-01-02T04:23:51Z
java
2022-01-07T04:26:06Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
Status(int code, String enMsg, String zhMsg) { this.code = code; this.enMsg = enMsg; this.zhMsg = zhMsg; } public int getCode() { n this.code; } public String getMsg() { if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) { n this.zhMsg; } else { n this.enMsg; } } /** * Retrieve Status enum entity by status code. * @param code * @n */ public static Optional<Status> findStatusBy(int code) { for (Status status : Status.values()) { if (code == status.getCode()) { n Optional.of(status); } } n Optional.empty(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server; import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.ExecutorService; import org.apache.dolphinscheduler.api.service.ProcessDefinitionService; import org.apache.dolphinscheduler.api.service.ProjectService; import org.apache.dolphinscheduler.api.service.QueueService; import org.apache.dolphinscheduler.api.service.ResourcesService; import org.apache.dolphinscheduler.api.service.SchedulerService; import org.apache.dolphinscheduler.api.service.TaskDefinitionService; import org.apache.dolphinscheduler.api.service.TenantService; import org.apache.dolphinscheduler.api.service.UsersService; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ProcessExecutionTypeEnum; import org.apache.dolphinscheduler.common.enums.ProgramType; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.enums.TaskDependType; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.utils.CodeGenerateUtils;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
import org.apache.dolphinscheduler.dao.entity.DataSource; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Queue; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskDefinition; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper; import org.apache.dolphinscheduler.spi.enums.ResourceType; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; import py4j.GatewayServer; import org.apache.commons.collections.CollectionUtils; @SpringBootApplication
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
@ComponentScan(value = "org.apache.dolphinscheduler") public class PythonGatewayServer extends SpringBootServletInitializer { private static final Logger logger = LoggerFactory.getLogger(PythonGatewayServer.class); private static final WarningType DEFAULT_WARNING_TYPE = WarningType.NONE; private static final int DEFAULT_WARNING_GROUP_ID = 0; private static final FailureStrategy DEFAULT_FAILURE_STRATEGY = FailureStrategy.CONTINUE; private static final Priority DEFAULT_PRIORITY = Priority.MEDIUM; private static final Long DEFAULT_ENVIRONMENT_CODE = -1L; private static final TaskDependType DEFAULT_TASK_DEPEND_TYPE = TaskDependType.TASK_POST; private static final RunMode DEFAULT_RUN_MODE = RunMode.RUN_MODE_SERIAL; private static final int DEFAULT_DRY_RUN = 0; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private ProjectService projectService; @Autowired private TenantService tenantService; @Autowired private ExecutorService executorService; @Autowired private ProcessDefinitionService processDefinitionService; @Autowired private TaskDefinitionService taskDefinitionService; @Autowired private UsersService usersService; @Autowired private QueueService queueService; @Autowired private ResourcesService resourceService;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
@Autowired private ProjectMapper projectMapper; @Autowired private TaskDefinitionMapper taskDefinitionMapper; @Autowired private SchedulerService schedulerService; @Autowired private ScheduleMapper scheduleMapper; @Autowired private DataSourceMapper dataSourceMapper; private final User dummyAdminUser = new User() { { setId(Integer.MAX_VALUE); setUserName("dummyUser"); setUserType(UserType.ADMIN_USER); } }; private final Queue queuePythonGateway = new Queue() { { setId(Integer.MAX_VALUE); setQueueName("queuePythonGateway"); } }; public String ping() { return "PONG"; } public Map<String, Object> genTaskCodeList(Integer genNum) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
return taskDefinitionService.genTaskCodeList(genNum); } public Map<String, Long> getCodeAndVersion(String projectName, String taskName) throws CodeGenerateUtils.CodeGenerateException { Project project = projectMapper.queryByName(projectName); Map<String, Long> result = new HashMap<>(); if (project == null) { result.put("code", CodeGenerateUtils.getInstance().genCode()); result.put("version", 0L); return result; } TaskDefinition taskDefinition = taskDefinitionMapper.queryByName(project.getCode(), taskName); if (taskDefinition == null) { result.put("code", CodeGenerateUtils.getInstance().genCode()); result.put("version", 0L); } else { result.put("code", taskDefinition.getCode()); result.put("version", (long) taskDefinition.getVersion()); } return result; } /** * create or update process definition. * If process definition do not exists in Project=`projectCode` would create a new one * If process definition already exists in Project=`projectCode` would update it * * @param userName user name who create or update process definition * @param projectName project name which process definition belongs to * @param name process definition name * @param description description
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
* @param globalParams global params * @param schedule schedule for process definition, will not set schedule if null, * and if would always fresh exists schedule if not null * @param locations locations json object about all tasks * @param timeout timeout for process definition working, if running time longer than timeout, * task will mark as fail * @param workerGroup run task in which worker group * @param tenantCode tenantCode * @param taskRelationJson relation json for nodes * @param taskDefinitionJson taskDefinitionJson * @return create result code */ public Long createOrUpdateProcessDefinition(String userName, String projectName, String name, String description, String globalParams, String schedule, String locations, int timeout, String workerGroup, String tenantCode, String taskRelationJson, String taskDefinitionJson, ProcessExecutionTypeEnum executionType) { User user = usersService.queryUser(userName); Project project = (Project) projectService.queryByName(user, projectName).get(Constants.DATA_LIST); long projectCode = project.getCode(); ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, name); long processDefinitionCode;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
if (processDefinition != null) { processDefinitionCode = processDefinition.getCode(); processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE); Map<String, Object> result = processDefinitionService.updateProcessDefinition(user, projectCode, name, processDefinitionCode, description, globalParams, locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, executionType); } else { Map<String, Object> result = processDefinitionService.createProcessDefinition(user, projectCode, name, description, globalParams, locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, executionType); processDefinition = (ProcessDefinition) result.get(Constants.DATA_LIST); processDefinitionCode = processDefinition.getCode(); } if (schedule != null) { createOrUpdateSchedule(user, projectCode, processDefinitionCode, schedule, workerGroup); } processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.ONLINE); return processDefinitionCode; } /** * get process definition * @param user user who create or update schedule * @param projectCode project which process definition belongs to * @param processDefinitionName process definition name */ private ProcessDefinition getProcessDefinition(User user, long projectCode, String processDefinitionName) { Map<String, Object> verifyProcessDefinitionExists = processDefinitionService.verifyProcessDefinitionName(user, projectCode, processDefinitionName); Status verifyStatus = (Status) verifyProcessDefinitionExists.get(Constants.STATUS); ProcessDefinition processDefinition = null;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
if (verifyStatus == Status.PROCESS_DEFINITION_NAME_EXIST) { processDefinition = processDefinitionMapper.queryByDefineName(projectCode, processDefinitionName); } else if (verifyStatus != Status.SUCCESS) { String msg = "Verify process definition exists status is invalid, neither SUCCESS or PROCESS_DEFINITION_NAME_EXIST."; logger.error(msg); throw new RuntimeException(msg); } return processDefinition; } /** * create or update process definition schedule. * It would always use latest schedule define in workflow-as-code, and set schedule online when * it's not null * * @param user user who create or update schedule * @param projectCode project which process definition belongs to * @param processDefinitionCode process definition code * @param schedule schedule expression * @param workerGroup work group */ private void createOrUpdateSchedule(User user, long projectCode, long processDefinitionCode, String schedule, String workerGroup) { Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(processDefinitionCode); int scheduleId; if (scheduleObj == null) { processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.ONLINE);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
Map<String, Object> result = schedulerService.insertSchedule(user, projectCode, processDefinitionCode, schedule, DEFAULT_WARNING_TYPE, DEFAULT_WARNING_GROUP_ID, DEFAULT_FAILURE_STRATEGY, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE); scheduleId = (int) result.get("scheduleId"); } else { scheduleId = scheduleObj.getId(); processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE); schedulerService.updateSchedule(user, projectCode, scheduleId, schedule, DEFAULT_WARNING_TYPE, DEFAULT_WARNING_GROUP_ID, DEFAULT_FAILURE_STRATEGY, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE); } schedulerService.setScheduleState(user, projectCode, scheduleId, ReleaseState.ONLINE); } public void execProcessInstance(String userName, String projectName, String processDefinitionName, String cronTime, String workerGroup, Integer timeout ) { User user = usersService.queryUser(userName); Project project = projectMapper.queryByName(projectName); ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(project.getCode(), processDefinitionName); processDefinitionService.releaseProcessDefinition(user, project.getCode(), processDefinition.getCode(), ReleaseState.ONLINE); executorService.execProcessInstance(user, project.getCode(), processDefinition.getCode(), cronTime, null, DEFAULT_FAILURE_STRATEGY, null,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
DEFAULT_TASK_DEPEND_TYPE, DEFAULT_WARNING_TYPE, DEFAULT_WARNING_GROUP_ID, DEFAULT_RUN_MODE, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE, timeout, null, null, DEFAULT_DRY_RUN ); } public Map<String, Object> createProject(String userName, String name, String desc) { User user = usersService.queryUser(userName); return projectService.createProject(user, name, desc); } public Map<String, Object> createQueue(String name, String queueName) { Result<Object> verifyQueueExists = queueService.verifyQueue(name, queueName); if (verifyQueueExists.getCode() == 0) { return queueService.createQueue(dummyAdminUser, name, queueName); } else { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); result.put(Constants.MSG, Status.SUCCESS.getMsg()); return result; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
public Map<String, Object> createTenant(String tenantCode, String desc, String queueName) throws Exception { if (tenantService.checkTenantExists(tenantCode)) { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); result.put(Constants.MSG, Status.SUCCESS.getMsg()); return result; } else { Result<Object> verifyQueueExists = queueService.verifyQueue(queueName, queueName); if (verifyQueueExists.getCode() == 0) { queueService.createQueue(dummyAdminUser, queueName, queueName); } Map<String, Object> result = queueService.queryQueueName(queueName); List<Queue> queueList = (List<Queue>) result.get(Constants.DATA_LIST); Queue queue = queueList.get(0); return tenantService.createTenant(dummyAdminUser, tenantCode, queue.getId(), desc); } } public void createUser(String userName, String userPassword, String email, String phone, String tenantCode, String queue, int state) { User user = usersService.queryUser(userName); if (Objects.isNull(user)) { Map<String, Object> tenantResult = tenantService.queryByTenantCode(tenantCode); Tenant tenant = (Tenant) tenantResult.get(Constants.DATA_LIST);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
usersService.createUser(userName, userPassword, email, tenant.getId(), phone, queue, state); } } /** * Get datasource by given datasource name. It return map contain datasource id, type, name. * Useful in Python API create sql task which need datasource information. * * @param datasourceName user who create or update schedule */ public Map<String, Object> getDatasourceInfo(String datasourceName) { Map<String, Object> result = new HashMap<>(); List<DataSource> dataSourceList = dataSourceMapper.queryDataSourceByName(datasourceName); if (dataSourceList.size() > 1) { String msg = String.format("Get more than one datasource by name %s", datasourceName); logger.error(msg); throw new IllegalArgumentException(msg); } else if (dataSourceList.size() == 0) { String msg = String.format("Can not find any datasource by name %s", datasourceName); logger.error(msg); throw new IllegalArgumentException(msg); } else { DataSource dataSource = dataSourceList.get(0); result.put("id", dataSource.getId()); result.put("type", dataSource.getType().name()); result.put("name", dataSource.getName()); } return result; } /** * Get processDefinition by given processDefinitionName name. It return map contain processDefinition id, name, code.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
* Useful in Python API create subProcess task which need processDefinition information. * * @param userName user who create or update schedule * @param projectName project name which process definition belongs to * @param processDefinitionName process definition name */ public Map<String, Object> getProcessDefinitionInfo(String userName, String projectName, String processDefinitionName) { Map<String, Object> result = new HashMap<>(); User user = usersService.queryUser(userName); Project project = (Project) projectService.queryByName(user, projectName).get(Constants.DATA_LIST); long projectCode = project.getCode(); ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, processDefinitionName); if (processDefinition != null) { processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinition.getCode(), ReleaseState.ONLINE); result.put("id", processDefinition.getId()); result.put("name", processDefinition.getName()); result.put("code", processDefinition.getCode()); } else { String msg = String.format("Can not find valid process definition by name %s", processDefinitionName); logger.error(msg); throw new IllegalArgumentException(msg); } return result; } /** * Get project, process definition, task code. * Useful in Python API create dependent task which need processDefinition information. *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
* @param projectName project name which process definition belongs to * @param processDefinitionName process definition name * @param taskName task name */ public Map<String, Object> getDependentInfo(String projectName, String processDefinitionName, String taskName) { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName); if (project == null) { String msg = String.format("Can not find valid project by name %s", projectName); logger.error(msg); throw new IllegalArgumentException(msg); } long projectCode = project.getCode(); result.put("projectCode", projectCode); ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(projectCode, processDefinitionName); if (processDefinition == null) { String msg = String.format("Can not find valid process definition by name %s", processDefinitionName); logger.error(msg); throw new IllegalArgumentException(msg); } result.put("processDefinitionCode", processDefinition.getCode()); if (taskName != null) { TaskDefinition taskDefinition = taskDefinitionMapper.queryByName(projectCode, taskName); result.put("taskDefinitionCode", taskDefinition.getCode()); } return result; } /** * Get resource by given program type and full name. It return map contain resource id, name. * Useful in Python API create flink task which need processDefinition information.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,616
[Bug] [python] Class database raise error NPE when database name not exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When database source name not exists, would raise NPE without detail info, it not user friendly. ### What you expected to happen should remind user that datasouece not exists ### How to reproduce run `python ./example/task_datax_example.py` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7616
https://github.com/apache/dolphinscheduler/pull/7631
0b38d0e8269ef127e9ce11dff09a07b828961ebb
65322155a3b27d8f3def00e1d1ce7c11ad68c6c7
2021-12-24T11:42:32Z
java
2022-01-07T13:29:37Z
dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
* * @param programType program type one of SCALA, JAVA and PYTHON * @param fullName full name of the resource */ public Map<String, Object> getResourcesFileInfo(String programType, String fullName) { Map<String, Object> result = new HashMap<>(); Map<String, Object> resources = resourceService.queryResourceByProgramType(dummyAdminUser, ResourceType.FILE, ProgramType.valueOf(programType)); List<ResourceComponent> resourcesComponent = (List<ResourceComponent>) resources.get(Constants.DATA_LIST); List<ResourceComponent> namedResources = resourcesComponent.stream().filter(s -> fullName.equals(s.getFullName())).collect(Collectors.toList()); if (CollectionUtils.isEmpty(namedResources)) { String msg = String.format("Can not find valid resource by program type %s and name %s", programType, fullName); logger.error(msg); throw new IllegalArgumentException(msg); } result.put("id", namedResources.get(0).getId()); result.put("name", namedResources.get(0).getName()); return result; } @PostConstruct public void run() { GatewayServer server = new GatewayServer(this); GatewayServer.turnLoggingOn(); server.start(); } public static void main(String[] args) { SpringApplication.run(PythonGatewayServer.class, args); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.enums; import java.util.Locale; import java.util.Optional; import org.springframework.context.i18n.LocaleContextHolder; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
* status enum // todo #4855 One category one interval */ public enum Status { SUCCESS(0, "success", "成功"), INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"), REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"), TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"), USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"), USER_NAME_NULL(10004, "user name is null", "用户名不能为空"), HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"), TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"), OS_TENANT_CODE_EXIST(10009, "os tenant code {0} already exists", "操作系统租户[{0}]已存在"), USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"), ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"), ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"), USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"), LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"), DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"), DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"), TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"), PROJECT_NOT_FOUND(10018, "project {0} not found ", "项目[{0}]不存在"), PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"), TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"), TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"), SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"), SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"), SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"), MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"), SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"), CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup error", "查询告警组错误"), LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"), UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"), DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"), ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"), CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"), UPDATE_DATASOURCE_ERROR(10034, "update datasource error", "更新数据源错误"), QUERY_DATASOURCE_ERROR(10035, "query datasource error", "查询数据源错误"), CONNECT_DATASOURCE_FAILURE(10036, "connect datasource failure", "建立数据源连接失败"), CONNECTION_TEST_FAILURE(10037, "connection test failure", "测试数据源连接失败"), DELETE_DATA_SOURCE_FAILURE(10038, "delete data source failure", "删除数据源失败"), VERIFY_DATASOURCE_NAME_FAILURE(10039, "verify datasource name failure", "验证数据源名称失败"), UNAUTHORIZED_DATASOURCE(10040, "unauthorized datasource", "未经授权的数据源"), AUTHORIZED_DATA_SOURCE(10041, "authorized data source", "授权数据源失败"), LOGIN_SUCCESS(10042, "login success", "登录成功"), USER_LOGIN_FAILURE(10043, "user login failure", "用户登录失败"), LIST_WORKERS_ERROR(10044, "list workers error", "查询worker列表错误"), LIST_MASTERS_ERROR(10045, "list masters error", "查询master列表错误"), UPDATE_PROJECT_ERROR(10046, "update project error", "更新项目信息错误"), QUERY_PROJECT_DETAILS_BY_CODE_ERROR(10047, "query project details by code error", "查询项目详细信息错误"), CREATE_PROJECT_ERROR(10048, "create project error", "创建项目错误"), LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049, "login user query project list paging error", "分页查询项目列表错误"), DELETE_PROJECT_ERROR(10050, "delete project error", "删除项目错误"), QUERY_UNAUTHORIZED_PROJECT_ERROR(10051, "query unauthorized project error", "查询未授权项目错误"), QUERY_AUTHORIZED_PROJECT(10052, "query authorized project", "查询授权项目错误"), QUERY_QUEUE_LIST_ERROR(10053, "query queue list error", "查询队列列表错误"), CREATE_RESOURCE_ERROR(10054, "create resource error", "创建资源错误"), UPDATE_RESOURCE_ERROR(10055, "update resource error", "更新资源错误"), QUERY_RESOURCES_LIST_ERROR(10056, "query resources list error", "查询资源列表错误"), QUERY_RESOURCES_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_RESOURCE_ERROR(10058, "delete resource error", "删除资源错误"), VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059, "verify resource by name and type error", "资源名称或类型验证错误"), VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060, "view resource file online error", "查看资源文件错误"), CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061, "create resource file online error", "创建资源文件错误"), RESOURCE_FILE_IS_EMPTY(10062, "resource file is empty", "资源文件内容不能为空"), EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063, "edit resource file online error", "更新资源文件错误"), DOWNLOAD_RESOURCE_FILE_ERROR(10064, "download resource file error", "下载资源文件错误"), CREATE_UDF_FUNCTION_ERROR(10065, "create udf function error", "创建UDF函数错误"), VIEW_UDF_FUNCTION_ERROR(10066, "view udf function error", "查询UDF函数错误"), UPDATE_UDF_FUNCTION_ERROR(10067, "update udf function error", "更新UDF函数错误"), QUERY_UDF_FUNCTION_LIST_PAGING_ERROR(10068, "query udf function list paging error", "分页查询UDF函数列表错误"), QUERY_DATASOURCE_BY_TYPE_ERROR(10069, "query datasource by type error", "查询数据源信息错误"), VERIFY_UDF_FUNCTION_NAME_ERROR(10070, "verify udf function name error", "UDF函数名称验证错误"), DELETE_UDF_FUNCTION_ERROR(10071, "delete udf function error", "删除UDF函数错误"), AUTHORIZED_FILE_RESOURCE_ERROR(10072, "authorized file resource error", "授权资源文件错误"), AUTHORIZE_RESOURCE_TREE(10073, "authorize resource tree display error", "授权资源目录树错误"), UNAUTHORIZED_UDF_FUNCTION_ERROR(10074, "unauthorized udf function error", "查询未授权UDF函数错误"), AUTHORIZED_UDF_FUNCTION_ERROR(10075, "authorized udf function error", "授权UDF函数错误"), CREATE_SCHEDULE_ERROR(10076, "create schedule error", "创建调度配置错误"), UPDATE_SCHEDULE_ERROR(10077, "update schedule error", "更新调度配置错误"), PUBLISH_SCHEDULE_ONLINE_ERROR(10078, "publish schedule online error", "上线调度配置错误"), OFFLINE_SCHEDULE_ERROR(10079, "offline schedule error", "下线调度配置错误"), QUERY_SCHEDULE_LIST_PAGING_ERROR(10080, "query schedule list paging error", "分页查询调度配置列表错误"), QUERY_SCHEDULE_LIST_ERROR(10081, "query schedule list error", "查询调度配置列表错误"), QUERY_TASK_LIST_PAGING_ERROR(10082, "query task list paging error", "分页查询任务列表错误"), QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083, "query task record list paging error", "分页查询任务记录错误"), CREATE_TENANT_ERROR(10084, "create tenant error", "创建租户错误"), QUERY_TENANT_LIST_PAGING_ERROR(10085, "query tenant list paging error", "分页查询租户列表错误"), QUERY_TENANT_LIST_ERROR(10086, "query tenant list error", "查询租户列表错误"), UPDATE_TENANT_ERROR(10087, "update tenant error", "更新租户错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_TENANT_BY_ID_ERROR(10088, "delete tenant by id error", "删除租户错误"), VERIFY_OS_TENANT_CODE_ERROR(10089, "verify os tenant code error", "操作系统租户验证错误"), CREATE_USER_ERROR(10090, "create user error", "创建用户错误"), QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"), UPDATE_USER_ERROR(10092, "update user error", "更新用户错误"), DELETE_USER_BY_ID_ERROR(10093, "delete user by id error", "删除用户错误"), GRANT_PROJECT_ERROR(10094, "grant project error", "授权项目错误"), GRANT_RESOURCE_ERROR(10095, "grant resource error", "授权资源错误"), GRANT_UDF_FUNCTION_ERROR(10096, "grant udf function error", "授权UDF函数错误"), GRANT_DATASOURCE_ERROR(10097, "grant datasource error", "授权数据源错误"), GET_USER_INFO_ERROR(10098, "get user info error", "获取用户信息错误"), USER_LIST_ERROR(10099, "user list error", "查询用户列表错误"), VERIFY_USERNAME_ERROR(10100, "verify username error", "用户名验证错误"), UNAUTHORIZED_USER_ERROR(10101, "unauthorized user error", "查询未授权用户错误"), AUTHORIZED_USER_ERROR(10102, "authorized user error", "查询授权用户错误"), QUERY_TASK_INSTANCE_LOG_ERROR(10103, "view task instance log error", "查询任务实例日志错误"), DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104, "download task instance log file error", "下载任务日志文件错误"), CREATE_PROCESS_DEFINITION_ERROR(10105, "create process definition error", "创建工作流错误"), VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106, "verify process definition name unique error", "工作流定义名称验证错误"), UPDATE_PROCESS_DEFINITION_ERROR(10107, "update process definition error", "更新工作流定义错误"), RELEASE_PROCESS_DEFINITION_ERROR(10108, "release process definition error", "上线工作流错误"), QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR(10109, "query detail of process definition error", "查询工作流详细信息错误"), QUERY_PROCESS_DEFINITION_LIST(10110, "query process definition list", "查询工作流列表错误"), ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR(10111, "encapsulation treeview structure error", "查询工作流树形图数据错误"), GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR(10112, "get tasks list by process definition id error", "查询工作流定义节点信息错误"), QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR(10113, "query process instance list paging error", "分页查询工作流实例列表错误"), QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR(10114, "query task list by process instance id error", "查询任务实例列表错误"), UPDATE_PROCESS_INSTANCE_ERROR(10115, "update process instance error", "更新工作流实例错误"), QUERY_PROCESS_INSTANCE_BY_ID_ERROR(10116, "query process instance by id error", "查询工作流实例错误"), DELETE_PROCESS_INSTANCE_BY_ID_ERROR(10117, "delete process instance by id error", "删除工作流实例错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR(10118, "query sub process instance detail info by task id error", "查询子流程任务实例错误"), QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR(10119, "query parent process instance detail info by sub process instance id error", "查询子流程该工作流实例错误"), QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR(10120, "query process instance all variables error", "查询工作流自定义变量信息错误"), ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR(10121, "encapsulation process instance gantt structure error", "查询工作流实例甘特图数据错误"), QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122, "query process definition list paging error", "分页查询工作流定义列表错误"), SIGN_OUT_ERROR(10123, "sign out error", "退出错误"), OS_TENANT_CODE_HAS_ALREADY_EXISTS(10124, "os tenant code has already exists", "操作系统租户已存在"), IP_IS_EMPTY(10125, "ip is empty", "IP地址不能为空"), SCHEDULE_CRON_REALEASE_NEED_NOT_CHANGE(10126, "schedule release is already {0}", "调度配置上线错误[{0}]"), CREATE_QUEUE_ERROR(10127, "create queue error", "创建队列错误"), QUEUE_NOT_EXIST(10128, "queue {0} not exists", "队列ID[{0}]不存在"), QUEUE_VALUE_EXIST(10129, "queue value {0} already exists", "队列值[{0}]已存在"), QUEUE_NAME_EXIST(10130, "queue name {0} already exists", "队列名称[{0}]已存在"), UPDATE_QUEUE_ERROR(10131, "update queue error", "更新队列信息错误"), NEED_NOT_UPDATE_QUEUE(10132, "no content changes, no updates are required", "数据未变更,不需要更新队列信息"), VERIFY_QUEUE_ERROR(10133, "verify queue error", "验证队列信息错误"), NAME_NULL(10134, "name must be not null", "名称不能为空"), NAME_EXIST(10135, "name {0} already exists", "名称[{0}]已存在"), SAVE_ERROR(10136, "save error", "保存错误"), DELETE_PROJECT_ERROR_DEFINES_NOT_NULL(10137, "please delete the process definitions in project first!", "请先删除全部工作流定义"), BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR(10117, "batch delete process instance by ids {0} error", "批量删除工作流实例错误: {0}"), PREVIEW_SCHEDULE_ERROR(10139, "preview schedule error", "预览调度配置错误"), PARSE_TO_CRON_EXPRESSION_ERROR(10140, "parse cron to cron expression error", "解析调度表达式错误"), SCHEDULE_START_TIME_END_TIME_SAME(10141, "The start time must not be the same as the end", "开始时间不能和结束时间一样"), DELETE_TENANT_BY_ID_FAIL(10142, "delete tenant by id fail, for there are {0} process instances in executing using it", "删除租户失败,有[{0}]个运行中的工作流实例正在使用"), DELETE_TENANT_BY_ID_FAIL_DEFINES(10143, "delete tenant by id fail, for there are {0} process definitions using it", "删除租户失败,有[{0}]个工作流定义正在使用"), DELETE_TENANT_BY_ID_FAIL_USERS(10144, "delete tenant by id fail, for there are {0} users using it", "删除租户失败,有[{0}]个用户正在使用"), DELETE_WORKER_GROUP_BY_ID_FAIL(10145, "delete worker group by id fail, for there are {0} process instances in executing using it", "删除Worker分组失败,有[{0}]个运行中的工作流实例正在使用"), QUERY_WORKER_GROUP_FAIL(10146, "query worker group fail ", "查询worker分组失败"), DELETE_WORKER_GROUP_FAIL(10147, "delete worker group fail ", "删除worker分组失败"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
USER_DISABLED(10148, "The current user is disabled", "当前用户已停用"), COPY_PROCESS_DEFINITION_ERROR(10149, "copy process definition from {0} to {1} error : {2}", "从{0}复制工作流到{1}错误 : {2}"), MOVE_PROCESS_DEFINITION_ERROR(10150, "move process definition from {0} to {1} error : {2}", "从{0}移动工作流到{1}错误 : {2}"), SWITCH_PROCESS_DEFINITION_VERSION_ERROR(10151, "Switch process definition version error", "切换工作流版本出错"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR(10152 , "Switch process definition version error: not exists process definition, [process definition id {0}]", "切换工作流版本出错:工作流不存在,[工作流id {0}]"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR(10153 , "Switch process definition version error: not exists process definition version, [process definition id {0}] [version number {1}]", "切换工作流版本出错:工作流版本信息不存在,[工作流id {0}] [版本号 {1}]"), QUERY_PROCESS_DEFINITION_VERSIONS_ERROR(10154, "query process definition versions error", "查询工作流历史版本信息出错"), DELETE_PROCESS_DEFINITION_VERSION_ERROR(10156, "delete process definition version error", "删除工作流历史版本出错"), QUERY_USER_CREATED_PROJECT_ERROR(10157, "query user created project error error", "查询用户创建的项目错误"), PROCESS_DEFINITION_CODES_IS_EMPTY(10158, "process definition codes is empty", "工作流CODES不能为空"), BATCH_COPY_PROCESS_DEFINITION_ERROR(10159, "batch copy process definition error", "复制工作流错误"), BATCH_MOVE_PROCESS_DEFINITION_ERROR(10160, "batch move process definition error", "移动工作流错误"), QUERY_WORKFLOW_LINEAGE_ERROR(10161, "query workflow lineage error", "查询血缘失败"), QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR(10162, "query authorized and user created project error error", "查询授权的和用户创建的项目错误"), DELETE_PROCESS_DEFINITION_BY_CODE_FAIL(10163, "delete process definition by code fail, for there are {0} process instances in executing using it", "删除工作流定义失败,有[{0}]个运行中的工作流实例正在使用"), CHECK_OS_TENANT_CODE_ERROR(10164, "Please enter the English os tenant code", "请输入英文操作系统租户"), FORCE_TASK_SUCCESS_ERROR(10165, "force task success error", "强制成功任务实例错误"), TASK_INSTANCE_STATE_OPERATION_ERROR(10166, "the status of task instance {0} is {1},Cannot perform force success operation", "任务实例[{0}]的状态是[{1}],无法执行强制成功操作"), DATASOURCE_TYPE_NOT_EXIST(10167, "data source type not exist", "数据源类型不存在"), PROCESS_DEFINITION_NAME_EXIST(10168, "process definition name {0} already exists", "工作流定义名称[{0}]已存在"), DATASOURCE_DB_TYPE_ILLEGAL(10169, "datasource type illegal", "数据源类型参数不合法"), DATASOURCE_PORT_ILLEGAL(10170, "datasource port illegal", "数据源端口参数不合法"), DATASOURCE_OTHER_PARAMS_ILLEGAL(10171, "datasource other params illegal", "数据源其他参数不合法"), DATASOURCE_NAME_ILLEGAL(10172, "datasource name illegal", "数据源名称不合法"), DATASOURCE_HOST_ILLEGAL(10173, "datasource host illegal", "数据源HOST不合法"), DELETE_WORKER_GROUP_NOT_EXIST(10174, "delete worker group not exist ", "删除worker分组不存在"), CREATE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10175, "create worker group forbidden in docker ", "创建worker分组在docker中禁止"), DELETE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10176, "delete worker group forbidden in docker ", "删除worker分组在docker中禁止"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
WORKER_ADDRESS_INVALID(10177, "worker address {0} invalid", "worker地址[{0}]无效"), QUERY_WORKER_ADDRESS_LIST_FAIL(10178, "query worker address list fail ", "查询worker地址列表失败"), TRANSFORM_PROJECT_OWNERSHIP(10179, "Please transform project ownership [{0}]", "请先转移项目所有权[{0}]"), QUERY_ALERT_GROUP_ERROR(10180, "query alert group error", "查询告警组错误"), CURRENT_LOGIN_USER_TENANT_NOT_EXIST(10181, "the tenant of the currently login user is not specified", "未指定当前登录用户的租户"), REVOKE_PROJECT_ERROR(10182, "revoke project error", "撤销项目授权错误"), QUERY_AUTHORIZED_USER(10183, "query authorized user error", "查询拥有项目权限的用户错误"), PROJECT_NOT_EXIST(10190, "This project was not found. Please refresh page.", "该项目不存在,请刷新页面"), UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"), UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"), RESOURCE_NOT_EXIST(20004, "resource not exist", "资源不存在"), RESOURCE_EXIST(20005, "resource already exists", "资源已存在"), RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing", "资源文件后缀不支持查看"), RESOURCE_SIZE_EXCEED_LIMIT(20007, "upload resource file size exceeds limit", "上传资源文件大小超过限制"), RESOURCE_SUFFIX_FORBID_CHANGE(20008, "resource suffix not allowed to be modified", "资源文件后缀不支持修改"), UDF_RESOURCE_SUFFIX_NOT_JAR(20009, "UDF resource suffix name must be jar", "UDF资源文件后缀名只支持[jar]"), HDFS_COPY_FAIL(20010, "hdfs copy {0} -> {1} fail", "hdfs复制失败:[{0}] -> [{1}]"), RESOURCE_FILE_EXIST(20011, "resource file {0} already exists in hdfs,please delete it or change name!", "资源文件[{0}]在hdfs中已存在,请删除或修改资源名"), RESOURCE_FILE_NOT_EXIST(20012, "resource file {0} not exists in hdfs!", "资源文件[{0}]在hdfs中不存在"), UDF_RESOURCE_IS_BOUND(20013, "udf resource file is bound by UDF functions:{0}", "udf函数绑定了资源文件[{0}]"), RESOURCE_IS_USED(20014, "resource file is used by process definition", "资源文件被上线的流程定义使用了"), PARENT_RESOURCE_NOT_EXIST(20015, "parent resource not exist", "父资源文件不存在"), RESOURCE_NOT_EXIST_OR_NO_PERMISSION(20016, "resource not exist or no permission,please view the task node and remove error resource", "请检查任务节点并移除无权限或者已删除的资源"), RESOURCE_IS_AUTHORIZED(20017, "resource is authorized to user {0},suffix not allowed to be modified", "资源文件已授权其他用户[{0}],后缀不允许修改"), USER_NO_OPERATION_PERM(30001, "user has no operation privilege", "当前用户没有操作权限"), USER_NO_OPERATION_PROJECT_PERM(30002, "user {0} is not has project {1} permission", "当前用户[{0}]没有[{1}]项目的操作权限"), PROCESS_INSTANCE_NOT_EXIST(50001, "process instance {0} does not exist", "工作流实例[{0}]不存在"), PROCESS_INSTANCE_EXIST(50002, "process instance {0} already exists", "工作流实例[{0}]已存在"), PROCESS_DEFINE_NOT_EXIST(50003, "process definition {0} does not exist", "工作流定义[{0}]不存在"), PROCESS_DEFINE_NOT_RELEASE(50004, "process definition {0} not on line", "工作流定义[{0}]不是上线状态"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_INSTANCE_ALREADY_CHANGED(50005, "the status of process instance {0} is already {1}", "工作流实例[{0}]的状态已经是[{1}]"), PROCESS_INSTANCE_STATE_OPERATION_ERROR(50006, "the status of process instance {0} is {1},Cannot perform {2} operation", "工作流实例[{0}]的状态是[{1}],无法执行[{2}]操作"), SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"), PROCESS_DEFINE_NOT_ALLOWED_EDIT(50008, "process definition {0} does not allow edit", "工作流定义[{0}]不允许修改"), PROCESS_INSTANCE_EXECUTING_COMMAND(50009, "process instance {0} is executing the command, please wait ...", "工作流实例[{0}]正在执行命令,请稍等..."), PROCESS_INSTANCE_NOT_SUB_PROCESS_INSTANCE(50010, "process instance {0} is not sub process instance", "工作流实例[{0}]不是子工作流实例"), TASK_INSTANCE_STATE_COUNT_ERROR(50011, "task instance state count error", "查询各状态任务实例数错误"), COUNT_PROCESS_INSTANCE_STATE_ERROR(50012, "count process instance state error", "查询各状态流程实例数错误"), COUNT_PROCESS_DEFINITION_USER_ERROR(50013, "count process definition user error", "查询各用户流程定义数错误"), START_PROCESS_INSTANCE_ERROR(50014, "start process instance error", "运行工作流实例错误"), BATCH_START_PROCESS_INSTANCE_ERROR(50014, "batch start process instance error: {0}", "批量运行工作流实例错误: {0}"), EXECUTE_PROCESS_INSTANCE_ERROR(50015, "execute process instance error", "操作工作流实例错误"), CHECK_PROCESS_DEFINITION_ERROR(50016, "check process definition error", "工作流定义错误"), QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR(50017, "query recipients and copyers by process definition error", "查询收件人和抄送人错误"), DATA_IS_NOT_VALID(50017, "data {0} not valid", "数据[{0}]无效"), DATA_IS_NULL(50018, "data {0} is null", "数据[{0}]不能为空"), PROCESS_NODE_HAS_CYCLE(50019, "process node has cycle", "流程节点间存在循环依赖"), PROCESS_NODE_S_PARAMETER_INVALID(50020, "process node {0} parameter invalid", "流程节点[{0}]参数无效"), PROCESS_DEFINE_STATE_ONLINE(50021, "process definition [{0}] is already on line", "工作流定义[{0}]已上线"), DELETE_PROCESS_DEFINE_BY_CODE_ERROR(50022, "delete process definition by code error", "删除工作流定义错误"), SCHEDULE_CRON_STATE_ONLINE(50023, "the status of schedule {0} is already on line", "调度配置[{0}]已上线"), DELETE_SCHEDULE_CRON_BY_ID_ERROR(50024, "delete schedule by id error", "删除调度配置错误"), BATCH_DELETE_PROCESS_DEFINE_ERROR(50025, "batch delete process definition error", "批量删除工作流定义错误"), BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR(50026, "batch delete process definition by codes {0} error", "批量删除工作流定义[{0}]错误"), TENANT_NOT_SUITABLE(50027, "there is not any tenant suitable, please choose a tenant available.", "没有合适的租户,请选择可用的租户"), EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028, "export process definition by id error", "导出工作流定义错误"), BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028, "batch export process definition by ids error", "批量导出工作流定义错误"), IMPORT_PROCESS_DEFINE_ERROR(50029, "import process definition error", "导入工作流定义错误"), TASK_DEFINE_NOT_EXIST(50030, "task definition [{0}] does not exist", "任务定义[{0}]不存在"), CREATE_PROCESS_TASK_RELATION_ERROR(50032, "create process task relation error", "创建工作流任务关系错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_TASK_RELATION_NOT_EXIST(50033, "process task relation [{0}] does not exist", "工作流任务关系[{0}]不存在"), PROCESS_TASK_RELATION_EXIST(50034, "process task relation is already exist, processCode:[{0}]", "工作流任务关系已存在, processCode:[{0}]"), PROCESS_DAG_IS_EMPTY(50035, "process dag is empty", "工作流dag是空"), CHECK_PROCESS_TASK_RELATION_ERROR(50036, "check process task relation error", "工作流任务关系参数错误"), CREATE_TASK_DEFINITION_ERROR(50037, "create task definition error", "创建任务错误"), UPDATE_TASK_DEFINITION_ERROR(50038, "update task definition error", "更新任务定义错误"), QUERY_TASK_DEFINITION_VERSIONS_ERROR(50039, "query task definition versions error", "查询任务历史版本信息出错"), SWITCH_TASK_DEFINITION_VERSION_ERROR(50040, "Switch task definition version error", "切换任务版本出错"), DELETE_TASK_DEFINITION_VERSION_ERROR(50041, "delete task definition version error", "删除任务历史版本出错"), DELETE_TASK_DEFINE_BY_CODE_ERROR(50042, "delete task definition by code error", "删除任务定义错误"), QUERY_DETAIL_OF_TASK_DEFINITION_ERROR(50043, "query detail of task definition error", "查询任务详细信息错误"), QUERY_TASK_DEFINITION_LIST_PAGING_ERROR(50044, "query task definition list paging error", "分页查询任务定义列表错误"), TASK_DEFINITION_NAME_EXISTED(50045, "task definition name [{0}] already exists", "任务定义名称[{0}]已经存在"), RELEASE_TASK_DEFINITION_ERROR(50046, "release task definition error", "上线任务错误"), MOVE_PROCESS_TASK_RELATION_ERROR(50047, "move process task relation error", "移动任务到其他工作流错误"), DELETE_TASK_PROCESS_RELATION_ERROR(50048, "delete process task relation error", "删除工作流任务关系错误"), QUERY_TASK_PROCESS_RELATION_ERROR(50049, "query process task relation error", "查询工作流任务关系错误"), TASK_DEFINE_STATE_ONLINE(50050, "task definition [{0}] is already on line", "任务定义[{0}]已上线"), TASK_HAS_DOWNSTREAM(50051, "Task exists downstream [{0}] dependence", "任务存在下游[{0}]依赖"), TASK_HAS_UPSTREAM(50052, "Task [{0}] exists upstream dependence", "任务[{0}]存在上游依赖"), MAIN_TABLE_USING_VERSION(50053, "the version that the master table is using", "主表正在使用该版本"), PROJECT_PROCESS_NOT_MATCH(50054, "the project and the process is not match", "项目和工作流不匹配"), DELETE_EDGE_ERROR(50055, "delete edge error", "删除工作流任务连接线错误"), NOT_SUPPORT_UPDATE_TASK_DEFINITION(50056, "task state does not support modification", "当前任务不支持修改"), NOT_SUPPORT_COPY_TASK_TYPE(50057, "task type [{0}] does not support copy", "不支持复制的任务类型[{0}]"), HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"), /** * for monitor */ QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
CREATE_ACCESS_TOKEN_ERROR(70010, "create access token error", "创建访问token错误"), GENERATE_TOKEN_ERROR(70011, "generate token error", "生成token错误"), QUERY_ACCESSTOKEN_LIST_PAGING_ERROR(70012, "query access token list paging error", "分页查询访问token列表错误"), UPDATE_ACCESS_TOKEN_ERROR(70013, "update access token error", "更新访问token错误"), DELETE_ACCESS_TOKEN_ERROR(70014, "delete access token error", "删除访问token错误"), ACCESS_TOKEN_NOT_EXIST(70015, "access token not exist", "访问token不存在"), QUERY_ACCESSTOKEN_BY_USER_ERROR(70016, "query access token by user error", "查询访问指定用户的token错误"), COMMAND_STATE_COUNT_ERROR(80001, "task instance state count error", "查询各状态任务实例数错误"), NEGTIVE_SIZE_NUMBER_ERROR(80002, "query size number error", "查询size错误"), START_TIME_BIGGER_THAN_END_TIME_ERROR(80003, "start time bigger than end time error", "开始时间在结束时间之后错误"), QUEUE_COUNT_ERROR(90001, "queue count error", "查询队列数据错误"), KERBEROS_STARTUP_STATE(100001, "get kerberos startup state error", "获取kerberos启动状态错误"), //plugin PLUGIN_NOT_A_UI_COMPONENT(110001, "query plugin error, this plugin has no UI component", "查询插件错误,此插件无UI组件"), QUERY_PLUGINS_RESULT_IS_NULL(110002, "query plugins result is null", "查询插件为空"), QUERY_PLUGINS_ERROR(110003, "query plugins error", "查询插件错误"), QUERY_PLUGIN_DETAIL_RESULT_IS_NULL(110004, "query plugin detail result is null", "查询插件详情结果为空"), UPDATE_ALERT_PLUGIN_INSTANCE_ERROR(110005, "update alert plugin instance error", "更新告警组和告警组插件实例错误"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR(110006, "delete alert plugin instance error", "删除告警组和告警组插件实例错误"), GET_ALERT_PLUGIN_INSTANCE_ERROR(110007, "get alert plugin instance error", "获取告警组和告警组插件实例错误"), CREATE_ALERT_PLUGIN_INSTANCE_ERROR(110008, "create alert plugin instance error", "创建告警组和告警组插件实例错误"), QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR(110009, "query all alert plugin instance error", "查询所有告警实例失败"), PLUGIN_INSTANCE_ALREADY_EXIT(110010, "plugin instance already exit", "该告警插件实例已存在"), LIST_PAGING_ALERT_PLUGIN_INSTANCE_ERROR(110011, "query plugin instance page error", "分页查询告警实例失败"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR_HAS_ALERT_GROUP_ASSOCIATED(110012, "failed to delete the alert instance, there is an alarm group associated with this alert instance", "删除告警实例失败,存在与此告警实例关联的警报组"), PROCESS_DEFINITION_VERSION_IS_USED(110013,"this process definition version is used","此工作流定义版本被使用"), CREATE_ENVIRONMENT_ERROR(120001, "create environment error", "创建环境失败"), ENVIRONMENT_NAME_EXISTS(120002,"this enviroment name [{0}] already exists","环境名称[{0}]已经存在"), ENVIRONMENT_NAME_IS_NULL(120003,"this enviroment name shouldn't be empty.","环境名称不能为空"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
ENVIRONMENT_CONFIG_IS_NULL(120004,"this enviroment config shouldn't be empty.","环境配置信息不能为空"), UPDATE_ENVIRONMENT_ERROR(120005, "update environment [{0}] info error", "更新环境[{0}]信息失败"), DELETE_ENVIRONMENT_ERROR(120006, "delete environment error", "删除环境信息失败"), DELETE_ENVIRONMENT_RELATED_TASK_EXISTS(120007, "this environment has been used in tasks,so you can't delete it.", "该环境已经被任务使用,所以不能删除该环境信息"), QUERY_ENVIRONMENT_BY_NAME_ERROR(1200008, "not found environment [{0}] ", "查询环境名称[{0}]信息不存在"), QUERY_ENVIRONMENT_BY_CODE_ERROR(1200009, "not found environment [{0}] ", "查询环境编码[{0}]不存在"), QUERY_ENVIRONMENT_ERROR(1200010, "login user query environment error", "分页查询环境列表错误"), VERIFY_ENVIRONMENT_ERROR(1200011, "verify environment error", "验证环境信息错误"), TASK_GROUP_NAME_EXSIT(130001,"this task group name is repeated in a project","该任务组名称在一个项目中已经使用"), TASK_GROUP_SIZE_ERROR(130002,"task group size error","任务组大小应该为大于1的整数"), TASK_GROUP_STATUS_ERROR(130003,"task group status error","任务组已经被关闭"), TASK_GROUP_FULL(130004,"task group is full","任务组已经满了"), TASK_GROUP_USED_SIZE_ERROR(130005,"the used size number of task group is dirty","任务组使用的容量发生了变化"), TASK_GROUP_QUEUE_RELEASE_ERROR(130006,"relase task group queue failed","任务组资源释放时出现了错误"), TASK_GROUP_QUEUE_AWAKE_ERROR(130007,"awake waiting task failed","任务组使唤醒等待任务时发生了错误"), CREATE_TASK_GROUP_ERROR(130008,"create task group error","创建任务组错误"), UPDATE_TASK_GROUP_ERROR(130009,"update task group list error","更新任务组错误"), QUERY_TASK_GROUP_LIST_ERROR(130010,"query task group list error","查询任务组列表错误"), CLOSE_TASK_GROUP_ERROR(130011,"close task group error","关闭任务组错误"), START_TASK_GROUP_ERROR(130012,"start task group error","启动任务组错误"), QUERY_TASK_GROUP_QUEUE_LIST_ERROR(130013,"query task group queue list error","查询任务组队列列表错误"), TASK_GROUP_CACHE_START_FAILED(130014,"cache start failed","任务组相关的缓存启动失败"), ENVIRONMENT_WORKER_GROUPS_IS_INVALID(130015, "environment worker groups is invalid format", "环境关联的工作组参数解析错误"), UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR(130016,"You can't modify the worker group, because the worker group [{0}] and this environment [{1}] already be used in the task [{2}]", "您不能修改工作组选项,因为该工作组 [{0}] 和 该环境 [{1}] 已经被用在任务 [{2}] 中"), TASK_GROUP_QUEUE_ALREADY_START(130017, "task group queue already start", "节点已经获取任务组资源") ; private final int code; private final String enMsg; private final String zhMsg;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
Status(int code, String enMsg, String zhMsg) { this.code = code; this.enMsg = enMsg; this.zhMsg = zhMsg; } public int getCode() { return this.code; } public String getMsg() { if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) { return this.zhMsg; } else { return this.enMsg; } } /** * Retrieve Status enum entity by status code. * @param code * @return */ public static Optional<Status> findStatusBy(int code) { for (Status status : Status.values()) { if (code == status.getCode()) { return Optional.of(status); } } return Optional.emp } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service.impl; import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
import org.apache.dolphinscheduler.api.dto.resources.visitor.ResourceTreeVisitor; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.exceptions.ServiceException; import org.apache.dolphinscheduler.api.service.UsersService; import org.apache.dolphinscheduler.api.utils.CheckUtils; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.utils.EncryptionUtils; import org.apache.dolphinscheduler.common.utils.HadoopUtils; import org.apache.dolphinscheduler.common.utils.PropertyUtils; import org.apache.dolphinscheduler.dao.entity.AlertGroup; import org.apache.dolphinscheduler.dao.entity.DatasourceUser; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.ProjectUser; import org.apache.dolphinscheduler.dao.entity.Resource; import org.apache.dolphinscheduler.dao.entity.ResourcesUser; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.UDFUser; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.AccessTokenMapper; import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper; import org.apache.dolphinscheduler.dao.mapper.DataSourceUserMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectUserMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceUserMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
import org.apache.dolphinscheduler.dao.mapper.TenantMapper; import org.apache.dolphinscheduler.dao.mapper.UDFUserMapper; import org.apache.dolphinscheduler.dao.mapper.UserMapper; import org.apache.dolphinscheduler.dao.utils.ResourceProcessDefinitionUtils; import org.apache.dolphinscheduler.spi.enums.ResourceType; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import java.io.IOException; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** * users service impl */ @Service public class UsersServiceImpl extends BaseServiceImpl implements UsersService { private static final Logger logger = LoggerFactory.getLogger(UsersServiceImpl.class);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
@Autowired private AccessTokenMapper accessTokenMapper; @Autowired private UserMapper userMapper; @Autowired private TenantMapper tenantMapper; @Autowired private ProjectUserMapper projectUserMapper; @Autowired private ResourceUserMapper resourceUserMapper; @Autowired private ResourceMapper resourceMapper; @Autowired private DataSourceUserMapper datasourceUserMapper; @Autowired private UDFUserMapper udfUserMapper; @Autowired private AlertGroupMapper alertGroupMapper; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private ProjectMapper projectMapper; /** * create user, only system admin have permission * * @param loginUser login user * @param userName user name * @param userPassword user password * @param email email * @param tenantId tenant id
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
* @param phone phone * @param queue queue * @return create result code * @throws Exception exception */ @Override @Transactional(rollbackFor = Exception.class) public Map<String, Object> createUser(User loginUser, String userName, String userPassword, String email, int tenantId, String phone, String queue, int state) throws IOException { Map<String, Object> result = new HashMap<>(); String msg = this.checkUserParams(userName, userPassword, email, phone); if (!StringUtils.isEmpty(msg)) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, msg); return result; } if (!isAdmin(loginUser)) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } if (!checkTenantExists(tenantId)) { putMsg(result, Status.TENANT_NOT_EXIST); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
User user = createUser(userName, userPassword, email, tenantId, phone, queue, state); Tenant tenant = tenantMapper.queryById(tenantId); if (PropertyUtils.getResUploadStartupState()) { if (!HadoopUtils.getInstance().exists(HadoopUtils.getHdfsTenantDir(tenant.getTenantCode()))) { createTenantDirIfNotExists(tenant.getTenantCode()); } String userPath = HadoopUtils.getHdfsUserDir(tenant.getTenantCode(), user.getId()); HadoopUtils.getInstance().mkdir(userPath); } result.put(Constants.DATA_LIST, user); putMsg(result, Status.SUCCESS); return result; } @Override @Transactional(rollbackFor = RuntimeException.class) public User createUser(String userName, String userPassword, String email, int tenantId, String phone, String queue, int state) { User user = new User(); Date now = new Date(); user.setUserName(userName); user.setUserPassword(EncryptionUtils.getMd5(userPassword)); user.setEmail(email); user.setTenantId(tenantId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
user.setPhone(phone); user.setState(state); user.setUserType(UserType.GENERAL_USER); user.setCreateTime(now); user.setUpdateTime(now); if (StringUtils.isEmpty(queue)) { queue = ""; } user.setQueue(queue); userMapper.insert(user); return user; } /*** * create User for ldap login */ @Override @Transactional(rollbackFor = Exception.class) public User createUser(UserType userType, String userId, String email) { User user = new User(); Date now = new Date(); user.setUserName(userId); user.setEmail(email); user.setUserType(userType); user.setCreateTime(now); user.setUpdateTime(now); user.setQueue("");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
userMapper.insert(user); return user; } /** * get user by user name * * @param userName user name * @return exist user or null */ @Override public User getUserByUserName(String userName) { return userMapper.queryByUserNameAccurately(userName); } /** * query user by id * * @param id id * @return user info */ @Override public User queryUser(int id) { return userMapper.selectById(id); } @Override public List<User> queryUser(List<Integer> ids) { if (CollectionUtils.isEmpty(ids)) { return new ArrayList<>(); } return userMapper.selectByIds(ids); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
/** * query user * * @param name name * @return user info */ @Override public User queryUser(String name) { return userMapper.queryByUserNameAccurately(name); } /** * query user * * @param name name * @param password password * @return user info */ @Override public User queryUser(String name, String password) { String md5 = EncryptionUtils.getMd5(password); return userMapper.queryUserByNamePassword(name, md5); } /** * get user id by user name * * @param name user name * @return if name empty 0, user not exists -1, user exist user id */ @Override public int getUserIdByName(String name) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
int executorId = 0; if (StringUtils.isNotEmpty(name)) { User executor = queryUser(name); if (null != executor) { executorId = executor.getId(); } else { executorId = -1; } } return executorId; } /** * query user list * * @param loginUser login user * @param pageNo page number * @param searchVal search value * @param pageSize page size * @return user list page */ @Override public Result queryUserList(User loginUser, String searchVal, Integer pageNo, Integer pageSize) { Result result = new Result(); if (!isAdmin(loginUser)) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } Page<User> page = new Page<>(pageNo, pageSize); IPage<User> scheduleList = userMapper.queryUserPaging(page, searchVal);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
PageInfo<User> pageInfo = new PageInfo<>(pageNo, pageSize); pageInfo.setTotal((int) scheduleList.getTotal()); pageInfo.setTotalList(scheduleList.getRecords()); result.setData(pageInfo); putMsg(result, Status.SUCCESS); return result; } /** * updateProcessInstance user * * @param userId user id * @param userName user name * @param userPassword user password * @param email email * @param tenantId tenant id * @param phone phone * @param queue queue * @return update result code * @throws Exception exception */ @Override public Map<String, Object> updateUser(User loginUser, int userId, String userName, String userPassword, String email, int tenantId, String phone, String queue, int state) throws IOException { Map<String, Object> result = new HashMap<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
result.put(Constants.STATUS, false); if (check(result, !hasPerm(loginUser, userId), Status.USER_NO_OPERATION_PERM)) { return result; } User user = userMapper.selectById(userId); if (user == null) { putMsg(result, Status.USER_NOT_EXIST, userId); return result; } if (StringUtils.isNotEmpty(userName)) { if (!CheckUtils.checkUserName(userName)) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, userName); return result; } User tempUser = userMapper.queryByUserNameAccurately(userName); if (tempUser != null && tempUser.getId() != userId) { putMsg(result, Status.USER_NAME_EXIST); return result; } user.setUserName(userName); } if (StringUtils.isNotEmpty(userPassword)) { if (!CheckUtils.checkPassword(userPassword)) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, userPassword); return result; } user.setUserPassword(EncryptionUtils.getMd5(userPassword)); } if (StringUtils.isNotEmpty(email)) { if (!CheckUtils.checkEmail(email)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, email); return result; } user.setEmail(email); } if (StringUtils.isNotEmpty(phone) && !CheckUtils.checkPhone(phone)) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, phone); return result; } user.setPhone(phone); user.setQueue(queue); user.setState(state); Date now = new Date(); user.setUpdateTime(now); if (user.getTenantId() != tenantId) { Tenant oldTenant = tenantMapper.queryById(user.getTenantId()); Tenant newTenant = tenantMapper.queryById(tenantId); if (newTenant != null) { if (PropertyUtils.getResUploadStartupState() && oldTenant != null) { String newTenantCode = newTenant.getTenantCode(); String oldResourcePath = HadoopUtils.getHdfsResDir(oldTenant.getTenantCode()); String oldUdfsPath = HadoopUtils.getHdfsUdfDir(oldTenant.getTenantCode()); if (HadoopUtils.getInstance().exists(oldResourcePath)) { String newResourcePath = HadoopUtils.getHdfsResDir(newTenantCode); String newUdfsPath = HadoopUtils.getHdfsUdfDir(newTenantCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
List<Resource> fileResourcesList = resourceMapper.queryResourceList( null, userId, ResourceType.FILE.ordinal()); if (CollectionUtils.isNotEmpty(fileResourcesList)) { ResourceTreeVisitor resourceTreeVisitor = new ResourceTreeVisitor(fileResourcesList); ResourceComponent resourceComponent = resourceTreeVisitor.visit(); copyResourceFiles(resourceComponent, oldResourcePath, newResourcePath); } List<Resource> udfResourceList = resourceMapper.queryResourceList( null, userId, ResourceType.UDF.ordinal()); if (CollectionUtils.isNotEmpty(udfResourceList)) { ResourceTreeVisitor resourceTreeVisitor = new ResourceTreeVisitor(udfResourceList); ResourceComponent resourceComponent = resourceTreeVisitor.visit(); copyResourceFiles(resourceComponent, oldUdfsPath, newUdfsPath); } String oldUserPath = HadoopUtils.getHdfsUserDir(oldTenant.getTenantCode(), userId); HadoopUtils.getInstance().delete(oldUserPath, true); } else { createTenantDirIfNotExists(oldTenant.getTenantCode()); } if (HadoopUtils.getInstance().exists(HadoopUtils.getHdfsTenantDir(newTenant.getTenantCode()))) { String newUserPath = HadoopUtils.getHdfsUserDir(newTenant.getTenantCode(), user.getId()); HadoopUtils.getInstance().mkdir(newUserPath); } else { createTenantDirIfNotExists(newTenant.getTenantCode()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
} } user.setTenantId(tenantId); } userMapper.updateById(user); putMsg(result, Status.SUCCESS); return result; } /** * delete user * * @param loginUser login user * @param id user id * @return delete result code * @throws Exception exception when operate hdfs */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> deleteUserById(User loginUser, int id) throws IOException { Map<String, Object> result = new HashMap<>(); if (!isAdmin(loginUser)) { putMsg(result, Status.USER_NO_OPERATION_PERM, id); return result; } User tempUser = userMapper.selectById(id); if (tempUser == null) { putMsg(result, Status.USER_NOT_EXIST, id);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
return result; } List<Project> projects = projectMapper.queryProjectCreatedByUser(id); if (CollectionUtils.isNotEmpty(projects)) { String projectNames = projects.stream().map(Project::getName).collect(Collectors.joining(",")); putMsg(result, Status.TRANSFORM_PROJECT_OWNERSHIP, projectNames); return result; } User user = userMapper.queryTenantCodeByUserId(id); if (user != null) { if (PropertyUtils.getResUploadStartupState()) { String userPath = HadoopUtils.getHdfsUserDir(user.getTenantCode(), id); if (HadoopUtils.getInstance().exists(userPath)) { HadoopUtils.getInstance().delete(userPath, true); } } } accessTokenMapper.deleteAccessTokenByUserId(id); userMapper.deleteById(id); putMsg(result, Status.SUCCESS); return result; } /** * grant project * * @param loginUser login user * @param userId user id * @param projectIds project id array
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
* @return grant result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> grantProject(User loginUser, int userId, String projectIds) { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, false); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } User tempUser = userMapper.selectById(userId); if (tempUser == null) { putMsg(result, Status.USER_NOT_EXIST, userId); return result; } if (check(result, StringUtils.isEmpty(projectIds), Status.SUCCESS)) { projectUserMapper.deleteProjectRelation(0, userId); return result; } String[] projectIdArr = projectIds.split(","); for (String projectId : projectIdArr) { Date now = new Date(); ProjectUser projectUser = new ProjectUser(); projectUser.setUserId(userId); projectUser.setProjectId(Integer.parseInt(projectId)); projectUser.setPerm(7); projectUser.setCreateTime(now);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
projectUser.setUpdateTime(now); projectUserMapper.insert(projectUser); } putMsg(result, Status.SUCCESS); return result; } /** * grant project by code * * @param loginUser login user * @param userId user id * @param projectCode project code * @return grant result code */ @Override public Map<String, Object> grantProjectByCode(final User loginUser, final int userId, final long projectCode) { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, false); User tempUser = this.userMapper.selectById(userId); if (tempUser == null) { this.putMsg(result, Status.USER_NOT_EXIST, userId); return result; } Project project = this.projectMapper.queryByCode(projectCode); if (project == null) { this.putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
if (!this.hasPerm(loginUser, project.getUserId())) { this.putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } final Date today = new Date(); ProjectUser projectUser = new ProjectUser(); projectUser.setUserId(userId); projectUser.setProjectId(project.getId()); projectUser.setPerm(7); projectUser.setCreateTime(today); projectUser.setUpdateTime(today); this.projectUserMapper.insert(projectUser); this.putMsg(result, Status.SUCCESS); return result; } /** * revoke the project permission for specified user. * @param loginUser Login user * @param userId User id * @param projectCode Project Code * @return */ @Override public Map<String, Object> revokeProject(User loginUser, int userId, long projectCode) { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, false); if (this.check(result, !this.isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
return result; } User user = this.userMapper.selectById(userId); if (user == null) { this.putMsg(result, Status.USER_NOT_EXIST, userId); return result; } Project project = this.projectMapper.queryByCode(projectCode); if (project == null) { this.putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); return result; } this.projectUserMapper.deleteProjectRelation(project.getId(), user.getId()); this.putMsg(result, Status.SUCCESS); return result; } /** * grant resource * * @param loginUser login user * @param userId user id * @param resourceIds resource id array * @return grant result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> grantResources(User loginUser, int userId, String resourceIds) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
Map<String, Object> result = new HashMap<>(); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } User user = userMapper.selectById(userId); if (user == null) { putMsg(result, Status.USER_NOT_EXIST, userId); return result; } Set<Integer> needAuthorizeResIds = new HashSet<>(); if (StringUtils.isNotBlank(resourceIds)) { String[] resourceFullIdArr = resourceIds.split(","); for (String resourceFullId : resourceFullIdArr) { String[] resourceIdArr = resourceFullId.split("-"); for (int i = 0; i <= resourceIdArr.length - 1; i++) { int resourceIdValue = Integer.parseInt(resourceIdArr[i]); needAuthorizeResIds.add(resourceIdValue); } } } List<Integer> resIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(userId, Constants.AUTHORIZE_WRITABLE_PERM); List<Resource> oldAuthorizedRes = CollectionUtils.isEmpty(resIds) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds); Set<Integer> oldAuthorizedResIds = oldAuthorizedRes.stream().map(Resource::getId).collect(Collectors.toSet()); oldAuthorizedResIds.removeAll(needAuthorizeResIds); if (CollectionUtils.isNotEmpty(oldAuthorizedResIds)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
List<Map<String, Object>> list = processDefinitionMapper.listResourcesByUser(userId); Map<Integer, Set<Long>> resourceProcessMap = ResourceProcessDefinitionUtils.getResourceProcessDefinitionMap(list); Set<Integer> resourceIdSet = resourceProcessMap.keySet(); resourceIdSet.retainAll(oldAuthorizedResIds); if (CollectionUtils.isNotEmpty(resourceIdSet)) { logger.error("can't be deleted,because it is used of process definition"); for (Integer resId : resourceIdSet) { logger.error("resource id:{} is used of process definition {}", resId, resourceProcessMap.get(resId)); } putMsg(result, Status.RESOURCE_IS_USED); return result; } } resourceUserMapper.deleteResourceUser(userId, 0); if (check(result, StringUtils.isEmpty(resourceIds), Status.SUCCESS)) { return result; } for (int resourceIdValue : needAuthorizeResIds) { Resource resource = resourceMapper.selectById(resourceIdValue); if (resource == null) { putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } Date now = new Date(); ResourcesUser resourcesUser = new ResourcesUser(); resourcesUser.setUserId(userId); resourcesUser.setResourcesId(resourceIdValue); if (resource.isDirectory()) { resourcesUser.setPerm(Constants.AUTHORIZE_READABLE_PERM);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
} else { resourcesUser.setPerm(Constants.AUTHORIZE_WRITABLE_PERM); } resourcesUser.setCreateTime(now); resourcesUser.setUpdateTime(now); resourceUserMapper.insert(resourcesUser); } putMsg(result, Status.SUCCESS); return result; } /** * grant udf function * * @param loginUser login user * @param userId user id * @param udfIds udf id array * @return grant result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds) { Map<String, Object> result = new HashMap<>(); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } User user = userMapper.selectById(userId); if (user == null) { putMsg(result, Status.USER_NOT_EXIST, userId); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
} udfUserMapper.deleteByUserId(userId); if (check(result, StringUtils.isEmpty(udfIds), Status.SUCCESS)) { return result; } String[] resourcesIdArr = udfIds.split(","); for (String udfId : resourcesIdArr) { Date now = new Date(); UDFUser udfUser = new UDFUser(); udfUser.setUserId(userId); udfUser.setUdfId(Integer.parseInt(udfId)); udfUser.setPerm(7); udfUser.setCreateTime(now); udfUser.setUpdateTime(now); udfUserMapper.insert(udfUser); } putMsg(result, Status.SUCCESS); return result; } /** * grant datasource * * @param loginUser login user * @param userId user id * @param datasourceIds data source id array * @return grant result code */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, false); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } User user = userMapper.selectById(userId); if (user == null) { putMsg(result, Status.USER_NOT_EXIST, userId); return result; } datasourceUserMapper.deleteByUserId(userId); if (check(result, StringUtils.isEmpty(datasourceIds), Status.SUCCESS)) { return result; } String[] datasourceIdArr = datasourceIds.split(","); for (String datasourceId : datasourceIdArr) { Date now = new Date(); DatasourceUser datasourceUser = new DatasourceUser(); datasourceUser.setUserId(userId); datasourceUser.setDatasourceId(Integer.parseInt(datasourceId)); datasourceUser.setPerm(7); datasourceUser.setCreateTime(now); datasourceUser.setUpdateTime(now); datasourceUserMapper.insert(datasourceUser); } putMsg(result, Status.SUCCESS); return result; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
* query user info * * @param loginUser login user * @return user info */ @Override public Map<String, Object> getUserInfo(User loginUser) { Map<String, Object> result = new HashMap<>(); User user = null; if (loginUser.getUserType() == UserType.ADMIN_USER) { user = loginUser; } else { user = userMapper.queryDetailsById(loginUser.getId()); List<AlertGroup> alertGroups = alertGroupMapper.queryByUserId(loginUser.getId()); StringBuilder sb = new StringBuilder(); if (alertGroups != null && !alertGroups.isEmpty()) { for (int i = 0; i < alertGroups.size() - 1; i++) { sb.append(alertGroups.get(i).getGroupName() + ","); } sb.append(alertGroups.get(alertGroups.size() - 1)); user.setAlertGroup(sb.toString()); } } result.put(Constants.DATA_LIST, user); putMsg(result, Status.SUCCESS); return result; } /** * query user list *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
* @param loginUser login user * @return user list */ @Override public Map<String, Object> queryAllGeneralUsers(User loginUser) { Map<String, Object> result = new HashMap<>(); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } List<User> userList = userMapper.queryAllGeneralUser(); result.put(Constants.DATA_LIST, userList); putMsg(result, Status.SUCCESS); return result; } /** * query user list * * @param loginUser login user * @return user list */ @Override public Map<String, Object> queryUserList(User loginUser) { Map<String, Object> result = new HashMap<>(); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } List<User> userList = userMapper.selectList(null); result.put(Constants.DATA_LIST, userList);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
putMsg(result, Status.SUCCESS); return result; } /** * verify user name exists * * @param userName user name * @return true if user name not exists, otherwise return false */ @Override public Result<Object> verifyUserName(String userName) { Result<Object> result = new Result<>(); User user = userMapper.queryByUserNameAccurately(userName); if (user != null) { putMsg(result, Status.USER_NAME_EXIST); } else { putMsg(result, Status.SUCCESS); } return result; } /** * unauthorized user * * @param loginUser login user * @param alertgroupId alert group id * @return unauthorize result code */ @Override public Map<String, Object> unauthorizedUser(User loginUser, Integer alertgroupId) { Map<String, Object> result = new HashMap<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } List<User> userList = userMapper.selectList(null); List<User> resultUsers = new ArrayList<>(); Set<User> userSet = null; if (userList != null && !userList.isEmpty()) { userSet = new HashSet<>(userList); List<User> authedUserList = userMapper.queryUserListByAlertGroupId(alertgroupId); Set<User> authedUserSet = null; if (authedUserList != null && !authedUserList.isEmpty()) { authedUserSet = new HashSet<>(authedUserList); userSet.removeAll(authedUserSet); } resultUsers = new ArrayList<>(userSet); } result.put(Constants.DATA_LIST, resultUsers); putMsg(result, Status.SUCCESS); return result; } /** * authorized user * * @param loginUser login user * @param alertgroupId alert group id * @return authorized result code */ @Override public Map<String, Object> authorizedUser(User loginUser, Integer alertgroupId) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
Map<String, Object> result = new HashMap<>(); if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { return result; } List<User> userList = userMapper.queryUserListByAlertGroupId(alertgroupId); result.put(Constants.DATA_LIST, userList); putMsg(result, Status.SUCCESS); return result; } /** * @param tenantId tenant id * @return true if tenant exists, otherwise return false */ private boolean checkTenantExists(int tenantId) { return tenantMapper.queryById(tenantId) != null; } /** * @return if check failed return the field, otherwise return null */ private String checkUserParams(String userName, String password, String email, String phone) { String msg = null; if (!CheckUtils.checkUserName(userName)) { msg = userName; } else if (!CheckUtils.checkPassword(password)) { msg = password; } else if (!CheckUtils.checkEmail(email)) { msg = email; } else if (!CheckUtils.checkPhone(phone)) { msg = phone;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
} return msg; } /** * copy resource files * * @param resourceComponent resource component * @param srcBasePath src base path * @param dstBasePath dst base path * @throws IOException io exception */ private void copyResourceFiles(ResourceComponent resourceComponent, String srcBasePath, String dstBasePath) throws IOException { List<ResourceComponent> components = resourceComponent.getChildren(); if (CollectionUtils.isNotEmpty(components)) { for (ResourceComponent component : components) { if (!HadoopUtils.getInstance().exists(String.format("%s/%s", srcBasePath, component.getFullName()))) { logger.error("resource file: {} not exist,copy error", component.getFullName()); throw new ServiceException(Status.RESOURCE_NOT_EXIST); } if (!component.isDirctory()) { HadoopUtils.getInstance().copy(String.format("%s/%s", srcBasePath, component.getFullName()), String.format("%s/%s", dstBasePath, component.getFullName()), false, true); continue; } if (CollectionUtils.isEmpty(component.getChildren())) { if (!HadoopUtils.getInstance().exists(String.format("%s/%s", dstBasePath, component.getFullName()))) { HadoopUtils.getInstance().mkdir(String.format("%s/%s", dstBasePath, component.getFullName())); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
7,857
[Bug] [Edit User Info] Problems caused by modifying the administrator user information.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened - User state When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable. ![image](https://user-images.githubusercontent.com/19239641/148392144-5ccf129a-4aa3-4a55-a86c-a370bdbe3896.png) The same problem exists in the user management section. ![image](https://user-images.githubusercontent.com/19239641/148484579-20de2dc2-5a15-4666-bcb0-015f79bdd4f2.png) - Authorized operation of admin user The administrator should have all the permissions by default, and there is no need to perform authorization related operations. ![image](https://user-images.githubusercontent.com/19239641/148484192-34750689-0bf5-4bdc-bbe1-ef23b8b56b7b.png) ### What you expected to happen Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself. ### How to reproduce Log in with any identity to modify your personal status. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/7857
https://github.com/apache/dolphinscheduler/pull/7891
7151c545783ed811b652b1a06a16aa228e3f1121
24eb40c2b24f3361617ae59c9264fa52546033db
2022-01-06T13:41:11Z
java
2022-01-08T10:01:22Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
} else { copyResourceFiles(component, srcBasePath, dstBasePath); } } } } /** * registry user, default state is 0, default tenant_id is 1, no phone, no queue * * @param userName user name * @param userPassword user password * @param repeatPassword repeat password * @param email email * @return registry result code * @throws Exception exception */ @Override @Transactional(rollbackFor = RuntimeException.class) public Map<String, Object> registerUser(String userName, String userPassword, String repeatPassword, String email) { Map<String, Object> result = new HashMap<>(); String msg = this.checkUserParams(userName, userPassword, email, ""); if (!StringUtils.isEmpty(msg)) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, msg); return result; } if (!userPassword.equals(repeatPassword)) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "two passwords are not same"); return result; }