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
| 12,055 |
[Bug] [Master] Construct processInstance may NPE when master handling command
|
### 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
Construct processInstance may NPE when master handling command
### What you expected to happen
commond content changed
### How to reproduce
commond content changed
### 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/12055
|
https://github.com/apache/dolphinscheduler/pull/12056
|
b95db4413044e48f97a6e8cf15c5d7667ddf5619
|
6466cc7c41bc32596499b023ed483387cb32d02a
| 2022-09-20T02:50:48Z |
java
| 2022-09-27T01:13:48Z |
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
|
return false;
}
@Override
public void releaseAllTaskGroup(int processInstanceId) {
List<TaskInstance> taskInstances = this.taskInstanceMapper.loadAllInfosNoRelease(processInstanceId,
TaskGroupQueueStatus.ACQUIRE_SUCCESS.getCode());
for (TaskInstance info : taskInstances) {
releaseTaskGroup(info);
}
}
/**
* release the TGQ resource when the corresponding task is finished.
*
* @return the result code and msg
*/
@Override
public TaskInstance releaseTaskGroup(TaskInstance taskInstance) {
TaskGroup taskGroup;
TaskGroupQueue thisTaskGroupQueue;
logger.info("Begin to release task group: {}", taskInstance.getTaskGroupId());
try {
do {
taskGroup = taskGroupMapper.selectById(taskInstance.getTaskGroupId());
if (taskGroup == null) {
logger.error("The taskGroup is null, taskGroupId: {}", taskInstance.getTaskGroupId());
return null;
}
thisTaskGroupQueue = this.taskGroupQueueMapper.queryByTaskId(taskInstance.getId());
if (thisTaskGroupQueue.getStatus() == TaskGroupQueueStatus.RELEASE) {
logger.info("The taskGroupQueue's status is release, taskInstanceId: {}", taskInstance.getId());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 12,055 |
[Bug] [Master] Construct processInstance may NPE when master handling command
|
### 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
Construct processInstance may NPE when master handling command
### What you expected to happen
commond content changed
### How to reproduce
commond content changed
### 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/12055
|
https://github.com/apache/dolphinscheduler/pull/12056
|
b95db4413044e48f97a6e8cf15c5d7667ddf5619
|
6466cc7c41bc32596499b023ed483387cb32d02a
| 2022-09-20T02:50:48Z |
java
| 2022-09-27T01:13:48Z |
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
|
return null;
}
} while (thisTaskGroupQueue.getForceStart() == Flag.NO.getCode()
&& taskGroupMapper.releaseTaskGroupResource(taskGroup.getId(),
taskGroup.getUseSize(),
thisTaskGroupQueue.getId(),
TaskGroupQueueStatus.ACQUIRE_SUCCESS.getCode()) != 1);
} catch (Exception e) {
logger.error("release the task group error", e);
return null;
}
logger.info("Finished to release task group, taskGroupId: {}", taskInstance.getTaskGroupId());
logger.info("Begin to release task group queue, taskGroupId: {}", taskInstance.getTaskGroupId());
changeTaskGroupQueueStatus(taskInstance.getId(), TaskGroupQueueStatus.RELEASE);
TaskGroupQueue taskGroupQueue;
do {
taskGroupQueue = this.taskGroupQueueMapper.queryTheHighestPriorityTasks(taskGroup.getId(),
TaskGroupQueueStatus.WAIT_QUEUE.getCode(),
Flag.NO.getCode(),
Flag.NO.getCode());
if (taskGroupQueue == null) {
logger.info("The taskGroupQueue is null, taskGroup: {}", taskGroup.getId());
return null;
}
} while (this.taskGroupQueueMapper.updateInQueueCAS(Flag.NO.getCode(),
Flag.YES.getCode(),
taskGroupQueue.getId()) != 1);
logger.info("Finished to release task group queue: taskGroupId: {}", taskInstance.getTaskGroupId());
return this.taskInstanceMapper.selectById(taskGroupQueue.getTaskId());
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 12,055 |
[Bug] [Master] Construct processInstance may NPE when master handling command
|
### 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
Construct processInstance may NPE when master handling command
### What you expected to happen
commond content changed
### How to reproduce
commond content changed
### 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/12055
|
https://github.com/apache/dolphinscheduler/pull/12056
|
b95db4413044e48f97a6e8cf15c5d7667ddf5619
|
6466cc7c41bc32596499b023ed483387cb32d02a
| 2022-09-20T02:50:48Z |
java
| 2022-09-27T01:13:48Z |
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
|
/**
* release the TGQ resource when the corresponding task is finished.
*
* @param taskId task id
* @return the result code and msg
*/
@Override
public void changeTaskGroupQueueStatus(int taskId, TaskGroupQueueStatus status) {
TaskGroupQueue taskGroupQueue = taskGroupQueueMapper.queryByTaskId(taskId);
taskGroupQueue.setStatus(status);
taskGroupQueue.setUpdateTime(new Date(System.currentTimeMillis()));
taskGroupQueueMapper.updateById(taskGroupQueue);
}
/**
* insert into task group queue
*
* @param taskId task id
* @param taskName task name
* @param groupId group id
* @param processId process id
* @param priority priority
* @return inserted task group queue
*/
@Override
public TaskGroupQueue insertIntoTaskGroupQueue(Integer taskId,
String taskName, Integer groupId,
Integer processId, Integer priority, TaskGroupQueueStatus status) {
TaskGroupQueue taskGroupQueue = new TaskGroupQueue(taskId, taskName, groupId, processId, priority, status);
taskGroupQueue.setCreateTime(new Date());
taskGroupQueue.setUpdateTime(new Date());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 12,055 |
[Bug] [Master] Construct processInstance may NPE when master handling command
|
### 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
Construct processInstance may NPE when master handling command
### What you expected to happen
commond content changed
### How to reproduce
commond content changed
### 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/12055
|
https://github.com/apache/dolphinscheduler/pull/12056
|
b95db4413044e48f97a6e8cf15c5d7667ddf5619
|
6466cc7c41bc32596499b023ed483387cb32d02a
| 2022-09-20T02:50:48Z |
java
| 2022-09-27T01:13:48Z |
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
|
taskGroupQueueMapper.insert(taskGroupQueue);
return taskGroupQueue;
}
@Override
public int updateTaskGroupQueueStatus(Integer taskId, int status) {
return taskGroupQueueMapper.updateStatusByTaskId(taskId, status);
}
@Override
public int updateTaskGroupQueue(TaskGroupQueue taskGroupQueue) {
return taskGroupQueueMapper.updateById(taskGroupQueue);
}
@Override
public TaskGroupQueue loadTaskGroupQueue(int taskId) {
return this.taskGroupQueueMapper.queryByTaskId(taskId);
}
@Override
public void sendStartTask2Master(ProcessInstance processInstance, int taskId,
org.apache.dolphinscheduler.remote.command.CommandType taskType) {
TaskEventChangeCommand taskEventChangeCommand = new TaskEventChangeCommand(
processInstance.getId(), taskId);
Host host = new Host(processInstance.getHost());
stateEventCallbackService.sendResult(host, taskEventChangeCommand.convert2Command(taskType));
}
@Override
public ProcessInstance loadNextProcess4Serial(long code, int state, int id) {
return this.processInstanceMapper.loadNextProcess4Serial(code, state, id);
}
protected void deleteCommandWithCheck(int commandId) {
int delete = this.commandMapper.deleteById(commandId);
if (delete != 1) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 12,055 |
[Bug] [Master] Construct processInstance may NPE when master handling command
|
### 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
Construct processInstance may NPE when master handling command
### What you expected to happen
commond content changed
### How to reproduce
commond content changed
### 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/12055
|
https://github.com/apache/dolphinscheduler/pull/12056
|
b95db4413044e48f97a6e8cf15c5d7667ddf5619
|
6466cc7c41bc32596499b023ed483387cb32d02a
| 2022-09-20T02:50:48Z |
java
| 2022-09-27T01:13:48Z |
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
|
throw new ServiceException("delete command fail, id:" + commandId);
}
}
/**
* find k8s config yaml by clusterName
*
* @param clusterName clusterName
* @return datasource
*/
@Override
public String findConfigYamlByName(String clusterName) {
if (Strings.isNullOrEmpty(clusterName)) {
return null;
}
QueryWrapper<K8s> nodeWrapper = new QueryWrapper<>();
nodeWrapper.eq("k8s_name", clusterName);
K8s k8s = k8sMapper.selectOne(nodeWrapper);
return k8s.getK8sConfig();
}
@Override
public void forceProcessInstanceSuccessByTaskInstanceId(Integer taskInstanceId) {
TaskInstance task = taskInstanceMapper.selectById(taskInstanceId);
if (task == null) {
return;
}
ProcessInstance processInstance = findProcessInstanceDetailById(task.getProcessInstanceId()).orElse(null);
if (processInstance != null
&& (processInstance.getState().isFailure() || processInstance.getState().isStop())) {
List<TaskInstance> validTaskList =
findValidTaskListByProcessId(processInstance.getId(), processInstance.getTestFlag());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 12,055 |
[Bug] [Master] Construct processInstance may NPE when master handling command
|
### 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
Construct processInstance may NPE when master handling command
### What you expected to happen
commond content changed
### How to reproduce
commond content changed
### 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/12055
|
https://github.com/apache/dolphinscheduler/pull/12056
|
b95db4413044e48f97a6e8cf15c5d7667ddf5619
|
6466cc7c41bc32596499b023ed483387cb32d02a
| 2022-09-20T02:50:48Z |
java
| 2022-09-27T01:13:48Z |
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
|
List<Long> instanceTaskCodeList =
validTaskList.stream().map(TaskInstance::getTaskCode).collect(Collectors.toList());
List<ProcessTaskRelation> taskRelations = findRelationByCode(processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
List<TaskDefinitionLog> taskDefinitionLogs = genTaskDefineList(taskRelations);
List<Long> definiteTaskCodeList =
taskDefinitionLogs.stream().filter(definitionLog -> definitionLog.getFlag() == Flag.YES)
.map(TaskDefinitionLog::getCode).collect(Collectors.toList());
if (org.apache.dolphinscheduler.common.utils.CollectionUtils.equalLists(instanceTaskCodeList,
definiteTaskCodeList)) {
List<Integer> failTaskList = validTaskList.stream()
.filter(instance -> instance.getState().isFailure() || instance.getState().isKill())
.map(TaskInstance::getId).collect(Collectors.toList());
if (failTaskList.size() == 1 && failTaskList.contains(taskInstanceId)) {
processInstance.setStateWithDesc(WorkflowExecutionStatus.SUCCESS, "success by task force success");
processInstanceDao.updateProcessInstance(processInstance);
}
}
}
}
@Override
public Integer queryTestDataSourceId(Integer onlineDataSourceId) {
Integer testDataSourceId = dataSourceMapper.queryTestDataSourceId(onlineDataSourceId);
if (testDataSourceId != null)
return testDataSourceId;
return null;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.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.python;
import java.io.IOException;
import java.net.InetAddress;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.apache.commons.collections.CollectionUtils;
import org.apache.dolphinscheduler.api.configuration.PythonGatewayConfiguration;
import org.apache.dolphinscheduler.api.dto.EnvironmentDto;
import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.EnvironmentService;
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.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.AuthorizationType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
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;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
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;
import org.apache.dolphinscheduler.common.utils.PropertyUtils;
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.ProjectUser;
import org.apache.dolphinscheduler.dao.entity.Queue;
import org.apache.dolphinscheduler.dao.entity.Resource;
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.ProjectUserMapper;
import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import py4j.GatewayServer;
@Component
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public class PythonGateway {
private static final Logger logger = LoggerFactory.getLogger(PythonGateway.class);
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;
private static final int DEFAULT_TEST_FLAG = 0;
private static final ComplementDependentMode COMPLEMENT_DEPENDENT_MODE = ComplementDependentMode.OFF_MODE;
private static final int ADMIN_USER_ID = 1;
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
@Autowired
private ProjectService projectService;
@Autowired
private TenantService tenantService;
@Autowired
private EnvironmentService environmentService;
@Autowired
private ExecutorService executorService;
@Autowired
private ProcessDefinitionService processDefinitionService;
@Autowired
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
private TaskDefinitionService taskDefinitionService;
@Autowired
private UsersService usersService;
@Autowired
private ResourcesService resourceService;
@Autowired
private ProjectMapper projectMapper;
@Autowired
private TaskDefinitionMapper taskDefinitionMapper;
@Autowired
private SchedulerService schedulerService;
@Autowired
private ScheduleMapper scheduleMapper;
@Autowired
private DataSourceMapper dataSourceMapper;
@Autowired
private PythonGatewayConfiguration pythonGatewayConfiguration;
@Autowired
private ProjectUserMapper projectUserMapper;
private final User dummyAdminUser = new User() {
{
setId(ADMIN_USER_ID);
setUserName("dummyUser");
setUserType(UserType.ADMIN_USER);
}
};
private final Queue queuePythonGateway = new Queue() {
{
setId(Integer.MAX_VALUE);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
setQueueName("queuePythonGateway");
}
};
public String ping() {
return "PONG";
}
public Map<String, Object> genTaskCodeList(Integer genNum) {
return taskDefinitionService.genTaskCodeList(genNum);
}
public Map<String, Long> getCodeAndVersion(String projectName, String processDefinitionName, 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;
}
ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(project.getCode(), processDefinitionName);
if (processDefinition == null) {
result.put("code", CodeGenerateUtils.getInstance().genCode());
result.put("version", 0L);
return result;
}
TaskDefinition taskDefinition = taskDefinitionMapper.queryByName(project.getCode(), processDefinition.getCode(), taskName);
if (taskDefinition == null) {
result.put("code", CodeGenerateUtils.getInstance().genCode());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
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
* @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 warningType warning type
* @param warningGroupId warning group id
* @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
* @param otherParamsJson otherParamsJson handle other params
* @return create result code
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public Long createOrUpdateProcessDefinition(String userName,
String projectName,
String name,
String description,
String globalParams,
String schedule,
String warningType,
int warningGroupId,
int timeout,
String workerGroup,
String tenantCode,
int releaseState,
String taskRelationJson,
String taskDefinitionJson,
String otherParamsJson,
ProcessExecutionTypeEnum executionType) {
User user = usersService.queryUser(userName);
Project project = projectMapper.queryByName(projectName);
long projectCode = project.getCode();
ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, name);
long processDefinitionCode;
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,
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
} else {
Map<String, Object> result = processDefinitionService.createProcessDefinition(user, projectCode, name, description, globalParams,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
processDefinition = (ProcessDefinition) result.get(Constants.DATA_LIST);
processDefinitionCode = processDefinition.getCode();
}
if (schedule != null) {
createOrUpdateSchedule(user, projectCode, processDefinitionCode, schedule, workerGroup, warningType, warningGroupId);
}
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.getEnum(releaseState));
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, 0);
Status verifyStatus = (Status) verifyProcessDefinitionExists.get(Constants.STATUS);
ProcessDefinition processDefinition = null;
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;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
}
/**
* 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
* @param warningType warning type
* @param warningGroupId warning group id
*/
private void createOrUpdateSchedule(User user,
long projectCode,
long processDefinitionCode,
String schedule,
String workerGroup,
String warningType,
int warningGroupId) {
Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(processDefinitionCode);
int scheduleId;
if (scheduleObj == null) {
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.ONLINE);
Map<String, Object> result = schedulerService.insertSchedule(user, projectCode, processDefinitionCode, schedule, WarningType.valueOf(warningType),
warningGroupId, DEFAULT_FAILURE_STRATEGY, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE);
scheduleId = (int) result.get("scheduleId");
} else {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
scheduleId = scheduleObj.getId();
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE);
schedulerService.updateSchedule(user, projectCode, scheduleId, schedule, WarningType.valueOf(warningType),
warningGroupId, 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,
String warningType,
int warningGroupId,
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,
DEFAULT_TASK_DEPEND_TYPE,
WarningType.valueOf(warningType),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
warningGroupId,
DEFAULT_RUN_MODE,
DEFAULT_PRIORITY,
workerGroup,
DEFAULT_ENVIRONMENT_CODE,
timeout,
null,
null,
DEFAULT_DRY_RUN,
DEFAULT_TEST_FLAG,
COMPLEMENT_DEPENDENT_MODE
);
}
/*
Grant project's permission to user. Use when project's created user not current but
Python API use it to change process definition.
*/
private Integer grantProjectToUser(Project project, User user) {
Date now = new Date();
ProjectUser projectUser = new ProjectUser();
projectUser.setUserId(user.getId());
projectUser.setProjectId(project.getId());
projectUser.setPerm(Constants.AUTHORIZE_WRITABLE_PERM);
projectUser.setCreateTime(now);
projectUser.setUpdateTime(now);
return projectUserMapper.insert(projectUser);
}
/*
Grant or create project. Create a new project if project do not exists, and grant the project
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
permission to user if project exists but without permission to this user.
*/
public void createOrGrantProject(String userName, String name, String desc) {
User user = usersService.queryUser(userName);
Project project;
project = projectMapper.queryByName(name);
if (project == null) {
projectService.createProject(user, name, desc);
} else if (project.getUserId() != user.getId()) {
ProjectUser projectUser = projectUserMapper.queryProjectRelation(project.getId(), user.getId());
if (projectUser == null) {
grantProjectToUser(project, user);
}
}
}
public Project queryProjectByName(String userName, String projectName) {
User user = usersService.queryUser(userName);
return (Project) projectService.queryByName(user, projectName).get(Constants.DATA_LIST);
}
public void updateProject(String userName, Long projectCode, String projectName, String desc) {
User user = usersService.queryUser(userName);
projectService.update(user, projectCode, projectName, desc, userName);
}
public void deleteProject(String userName, Long projectCode) {
User user = usersService.queryUser(userName);
projectService.deleteProject(user, projectCode);
}
public Tenant createTenant(String tenantCode, String desc, String queueName) {
return tenantService.createTenantIfNotExists(tenantCode, desc, queueName, queueName);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public Tenant queryTenantByCode(String tenantCode) {
return (Tenant) tenantService.queryByTenantCode(tenantCode).get(Constants.DATA_LIST);
}
public void updateTenant(String userName, int id, String tenantCode, int queueId, String desc) throws Exception {
User user = usersService.queryUser(userName);
tenantService.updateTenant(user, id, tenantCode, queueId, desc);
}
public void deleteTenantById(String userName, Integer tenantId) throws Exception {
User user = usersService.queryUser(userName);
tenantService.deleteTenantById(user, tenantId);
}
public User createUser(String userName,
String userPassword,
String email,
String phone,
String tenantCode,
String queue,
int state) throws IOException {
return usersService.createUserIfNotExists(userName, userPassword, email, phone, tenantCode, queue, state);
}
public User queryUser(int id) {
User user = usersService.queryUser(id);
if (user == null) {
throw new RuntimeException("User not found");
}
return user;
}
public User updateUser(String userName, String userPassword, String email, String phone, String tenantCode, String queue, int state) throws Exception {
return usersService.createUserIfNotExists(userName, userPassword, email, phone, tenantCode, queue, state);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public User deleteUser(String userName, int id) throws Exception {
User user = usersService.queryUser(userName);
usersService.deleteUserById(user, id);
return usersService.queryUser(userName);
}
/**
* 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 == null || dataSourceList.isEmpty()) {
String msg = String.format("Can not find any datasource by name %s", datasourceName);
logger.error(msg);
throw new IllegalArgumentException(msg);
} else 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 {
DataSource dataSource = dataSourceList.get(0);
result.put("id", dataSource.getId());
result.put("type", dataSource.getType().name());
result.put("name", dataSource.getName());
}
return result;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
/**
* Get processDefinition by given processDefinitionName name. It return map contain processDefinition id, name, code.
* 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.
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
* Useful in Python API create dependent task which need processDefinition information.
*
* @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, processDefinition.getCode(), taskName);
result.put("taskDefinitionCode", taskDefinition.getCode());
}
return result;
}
/**
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
* Get resource by given program type and full name. It return map contain resource id, name.
* Useful in Python API create flink or spark task which need processDefinition information.
*
* @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<>();
Result<Object> resources = resourceService.queryResourceByProgramType(dummyAdminUser, ResourceType.FILE, ProgramType.valueOf(programType));
List<ResourceComponent> resourcesComponent = (List<ResourceComponent>) resources.getData();
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;
}
/**
* Get environment info by given environment name. It return environment code.
* Useful in Python API create task which need environment information.
*
* @param environmentName name of the environment
*/
public Long getEnvironmentInfo(String environmentName) {
Map<String, Object> result = environmentService.queryEnvironmentByName(environmentName);
if (result.get("data") == null) {
String msg = String.format("Can not find valid environment by name %s", environmentName);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
logger.error(msg);
throw new IllegalArgumentException(msg);
}
EnvironmentDto environmentDto = EnvironmentDto.class.cast(result.get("data"));
return environmentDto.getCode();
}
/**
* Get resource by given resource type and full name. It return map contain resource id, name.
* Useful in Python API create task which need processDefinition information.
*
* @param userName user who query resource
* @param fullName full name of the resource
*/
public Resource queryResourcesFileInfo(String userName, String fullName) {
return resourceService.queryResourcesFileInfo(userName, fullName);
}
/**
* create or update resource.
* If the folder is not already created, it will be
*
* @param userName user who create or update resource
* @param fullName The fullname of resource.Includes path and suffix.
* @param description description of resource
* @param resourceContent content of resource
* @return id of resource
*/
public Integer createOrUpdateResource(
String userName, String fullName, String description, String resourceContent) {
return resourceService.createOrUpdateResource(userName, fullName, description, resourceContent);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 10,949 |
[Feature][python] Should vaildate version in both python api and java gateway equal or not
|
### 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
Some users use a different version of python gateway service and pydolphinscheduler, and it will cause errors. we should better check the version of them before submit the actual code
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a 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/10949
|
https://github.com/apache/dolphinscheduler/pull/11626
|
6466cc7c41bc32596499b023ed483387cb32d02a
|
7ed52c3ecb6b4165256b244cd595e502007b2923
| 2022-07-13T13:28:38Z |
java
| 2022-09-27T13:28:20Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
@PostConstruct
public void init() {
if (pythonGatewayConfiguration.getEnabled()) {
this.start();
}
}
private void start() {
GatewayServer server;
try {
InetAddress gatewayHost = InetAddress.getByName(pythonGatewayConfiguration.getGatewayServerAddress());
InetAddress pythonHost = InetAddress.getByName(pythonGatewayConfiguration.getPythonAddress());
server = new GatewayServer(
this,
pythonGatewayConfiguration.getGatewayServerPort(),
pythonGatewayConfiguration.getPythonPort(),
gatewayHost,
pythonHost,
pythonGatewayConfiguration.getConnectTimeout(),
pythonGatewayConfiguration.getReadTimeout(),
null
);
GatewayServer.turnLoggingOn();
logger.info("PythonGatewayService started on: " + gatewayHost.toString());
server.start();
} catch (UnknownHostException e) {
logger.error("exception occurred while constructing PythonGatewayService().", e);
}
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
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.BATCH_EXECUTE_PROCESS_INSTANCE_ERROR;
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.QUERY_EXECUTING_WORKFLOW_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.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
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 org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
import springfox.documentation.annotations.ApiIgnore;
import org.apache.commons.lang3.StringUtils;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
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;
/**
* executor controller
*/
@Api(tags = "EXECUTOR_TAG")
@RestController
@RequestMapping("projects/{projectCode}/executors")
public class ExecutorController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(ProcessInstanceController.class);
@Autowired
private ExecutorService execService;
/**
* execute process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param scheduleTime schedule time when CommandType is COMPLEMENT_DATA there are two ways to transfer parameters 1.date range, for example:{"complementStartDate":"2022-01-01 12:12:12","complementEndDate":"2022-01-6 12:12:12"} 2.manual input, for example:{"complementScheduleDateList":"2022-01-01 00:00:00,2022-01-02 12:12:12,2022-01-03 12:12:12"}
* @param failureStrategy failure strategy
* @param startNodeList start nodes list
* @param taskDependType task depend type
* @param execType execute type
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
* @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
* @param testFlag testFlag
* @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", example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
@ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
@ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
@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", 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"),
@ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataType = "Int", example = "0"),
@ApiImplicitParam(name = "testFlag", value = "TEST_FLAG", dataType = "Int", example = "0"),
@ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataType = "complementDependentMode")
})
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
@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") String scheduleTime,
@RequestParam(value = "failureStrategy") 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") WarningType warningType,
@RequestParam(value = "warningGroupId", required = false, defaultValue = "0") Integer 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,
@RequestParam(value = "startParams", required = false) String startParams,
@RequestParam(value = "expectedParallelismNumber", required = false) Integer expectedParallelismNumber,
@RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun,
@RequestParam(value = "testFlag", defaultValue = "0") int testFlag,
@RequestParam(value = "complementDependentMode", required = false) ComplementDependentMode complementDependentMode) {
if (timeout == null) {
timeout = Constants.MAX_TASK_TIMEOUT;
}
Map<String, String> startParamMap = null;
if (startParams != null) {
startParamMap = JSONUtils.toMap(startParams);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
}
if (complementDependentMode == null) {
complementDependentMode = ComplementDependentMode.OFF_MODE;
}
Map<String, Object> result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode,
scheduleTime, execType, failureStrategy,
startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority,
workerGroup, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun, testFlag, complementDependentMode);
return returnDataList(result);
}
/**
* batch execute process instance
* If any processDefinitionCode cannot be found, the failure information is returned and the status is set to
* failed. The successful task will run normally and will not stop
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCodes process definition codes
* @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
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
* @param testFlag testFlag
* @return start process result code
*/
@ApiOperation(value = "batchStartProcessInstance", notes = "BATCH_RUN_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "processDefinitionCodes", value = "PROCESS_DEFINITION_CODES", required = true, dataType = "String", example = "1,2,3"),
@ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataType = "String", example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
@ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
@ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
@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"),
@ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataType = "Int", example = "0"),
@ApiImplicitParam(name = "testFlag", value = "TEST_FLAG", dataType = "Int", example = "0"),
@ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataType = "complementDependentMode")
})
@PostMapping(value = "batch-start-process-instance")
@ResponseStatus(HttpStatus.OK)
@ApiException(START_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result batchStartProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefinitionCodes") String processDefinitionCodes,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
@RequestParam(value = "scheduleTime") String scheduleTime,
@RequestParam(value = "failureStrategy") 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") 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,
@RequestParam(value = "startParams", required = false) String startParams,
@RequestParam(value = "expectedParallelismNumber", required = false) Integer expectedParallelismNumber,
@RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun,
@RequestParam(value = "testFlag", defaultValue = "0") int testFlag,
@RequestParam(value = "complementDependentMode", required = false) ComplementDependentMode complementDependentMode) {
if (timeout == null) {
logger.debug("Parameter timeout set to {} due to null.", Constants.MAX_TASK_TIMEOUT);
timeout = Constants.MAX_TASK_TIMEOUT;
}
Map<String, String> startParamMap = null;
if (startParams != null) {
startParamMap = JSONUtils.toMap(startParams);
}
if (complementDependentMode == null) {
logger.debug("Parameter complementDependentMode set to {} due to null.", ComplementDependentMode.OFF_MODE);
complementDependentMode = ComplementDependentMode.OFF_MODE;
}
Map<String, Object> result = new HashMap<>();
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
List<String> processDefinitionCodeArray = Arrays.asList(processDefinitionCodes.split(Constants.COMMA));
List<String> startFailedProcessDefinitionCodeList = new ArrayList<>();
processDefinitionCodeArray = processDefinitionCodeArray.stream().distinct().collect(Collectors.toList());
for (String strProcessDefinitionCode : processDefinitionCodeArray) {
long processDefinitionCode = Long.parseLong(strProcessDefinitionCode);
result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime,
execType, failureStrategy,
startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority,
workerGroup, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun, testFlag,
complementDependentMode);
if (!Status.SUCCESS.equals(result.get(Constants.STATUS))) {
logger.error("Process definition start failed, projectCode:{}, processDefinitionCode:{}.", projectCode, processDefinitionCode);
startFailedProcessDefinitionCodeList.add(String.valueOf(processDefinitionCode));
} else
logger.info("Start process definition complete, projectCode:{}, processDefinitionCode:{}.", projectCode, processDefinitionCode);
}
if (!startFailedProcessDefinitionCodeList.isEmpty()) {
putMsg(result, Status.BATCH_START_PROCESS_INSTANCE_ERROR,
String.join(Constants.COMMA, startFailedProcessDefinitionCodeList));
}
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
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
*/
@ApiOperation(value = "execute", notes = "EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100"),
@ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataTypeClass = ExecuteType.class)
})
@PostMapping(value = "/execute")
@ResponseStatus(HttpStatus.OK)
@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
) {
logger.info("Start to execute process instance, projectCode:{}, processInstanceId:{}.", projectCode, processInstanceId);
Map<String, Object> result = execService.execute(loginUser, projectCode, processInstanceId, executeType);
return returnDataList(result);
}
/**
* batch execute and do action to process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processInstanceIds process instance ids, delimiter by "," if more than one id
* @param executeType execute type
* @return execute result code
*/
@ApiOperation(value = "batchExecute", notes = "BATCH_EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
@ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = int.class),
@ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataTypeClass = String.class),
@ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataTypeClass = ExecuteType.class)
})
@PostMapping(value = "/batch-execute")
@ResponseStatus(HttpStatus.OK)
@ApiException(BATCH_EXECUTE_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result batchExecute(@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable long projectCode,
@RequestParam("processInstanceIds") String processInstanceIds,
@RequestParam("executeType") ExecuteType executeType) {
Map<String, Object> result = new HashMap<>();
List<String> executeFailedIdList = new ArrayList<>();
if (!StringUtils.isEmpty(processInstanceIds)) {
String[] processInstanceIdArray = processInstanceIds.split(Constants.COMMA);
for (String strProcessInstanceId : processInstanceIdArray) {
int processInstanceId = Integer.parseInt(strProcessInstanceId);
try {
Map<String, Object> singleResult =
execService.execute(loginUser, projectCode, processInstanceId, executeType);
if (!Status.SUCCESS.equals(singleResult.get(Constants.STATUS))) {
logger.error("Start to execute process instance error, projectCode:{}, processInstanceId:{}.", projectCode, processInstanceId);
executeFailedIdList.add((String) singleResult.get(Constants.MSG));
} else
logger.info("Start to execute process instance complete, projectCode:{}, processInstanceId:{}.", projectCode, processInstanceId);
} catch (Exception e) {
executeFailedIdList
.add(MessageFormat.format(Status.PROCESS_INSTANCE_ERROR.getMsg(), strProcessInstanceId));
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
}
}
if (!executeFailedIdList.isEmpty()) {
putMsg(result, Status.BATCH_EXECUTE_PROCESS_INSTANCE_ERROR, String.join("\n", executeFailedIdList));
} else {
putMsg(result, Status.SUCCESS);
}
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, dataTypeClass = long.class, 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);
}
/**
* query execute data of processInstance from master
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
@ApiOperation(value = "queryExecutingWorkflow", notes = "QUERY_WORKFLOW_EXECUTE_DATA")
@ApiImplicitParams({
@ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/query-executing-workflow")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_EXECUTING_WORKFLOW_ERROR)
@AccessLogAnnotation
public Result queryExecutingWorkflow(@RequestParam("id") Integer processInstanceId) {
WorkflowExecuteDto workflowExecuteDto =
execService.queryExecutingWorkflowByProcessInstanceId(processInstanceId);
return Result.success(workflowExecuteDto);
}
/**
* execute task instance
*
* @param loginUser login user
* @param projectCode project code
* @param code taskDefinitionCode
* @param version taskDefinitionVersion
* @param warningGroupId warning group id
* @param workerGroup worker group
* @return start task result code
*/
@ApiOperation(value = "startTaskInstance", notes = "RUN_TASK_INSTANCE_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "version", value = "VERSION", dataTypeClass = int.class, example = "1"),
@ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataTypeClass = FailureStrategy.class),
@ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataTypeClass = CommandType.class),
@ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataTypeClass = WarningType.class),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
|
@ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataTypeClass = int.class, example = "100"),
@ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataTypeClass = String.class, example = "default"),
@ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class, example = "-1"),
@ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataTypeClass = int.class, example = "100"),
@ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataTypeClass = int.class, example = "0"),
})
@PostMapping(value = "/task-instance/{code}/start")
@ResponseStatus(HttpStatus.OK)
@ApiException(START_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result startStreamTaskInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@ApiParam(name = "code", value = "TASK_CODE", required = true) @PathVariable long code,
@RequestParam(value = "version", required = true) int version,
@RequestParam(value = "warningGroupId", required = false, defaultValue = "0") Integer warningGroupId,
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
@RequestParam(value = "startParams", required = false) String startParams,
@RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun) {
Map<String, String> startParamMap = null;
if (startParams != null) {
startParamMap = JSONUtils.toMap(startParams);
}
logger.info("Start to execute stream task instance, projectCode:{}, taskDefinitionCode:{}, taskVersion:{}.", projectCode, code, version);
Map<String, Object> result = execService.execStreamTaskInstance(loginUser, projectCode, code, version,
warningGroupId, workerGroup, environmentCode, startParamMap, dryRun);
return returnDataList(result);
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.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.python;
import java.io.IOException;
import java.net.InetAddress;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.apache.commons.collections.CollectionUtils;
import org.apache.dolphinscheduler.api.configuration.PythonGatewayConfiguration;
import org.apache.dolphinscheduler.api.dto.EnvironmentDto;
import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.EnvironmentService;
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.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.AuthorizationType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
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;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
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;
import org.apache.dolphinscheduler.common.utils.PropertyUtils;
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.ProjectUser;
import org.apache.dolphinscheduler.dao.entity.Queue;
import org.apache.dolphinscheduler.dao.entity.Resource;
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.ProjectUserMapper;
import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import py4j.GatewayServer;
@Component
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public class PythonGateway {
private static final Logger logger = LoggerFactory.getLogger(PythonGateway.class);
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;
private static final int DEFAULT_TEST_FLAG = 0;
private static final ComplementDependentMode COMPLEMENT_DEPENDENT_MODE = ComplementDependentMode.OFF_MODE;
private static final int ADMIN_USER_ID = 1;
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
@Autowired
private ProjectService projectService;
@Autowired
private TenantService tenantService;
@Autowired
private EnvironmentService environmentService;
@Autowired
private ExecutorService executorService;
@Autowired
private ProcessDefinitionService processDefinitionService;
@Autowired
private TaskDefinitionService taskDefinitionService;
@Autowired
private UsersService usersService;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
@Autowired
private ResourcesService resourceService;
@Autowired
private ProjectMapper projectMapper;
@Autowired
private TaskDefinitionMapper taskDefinitionMapper;
@Autowired
private SchedulerService schedulerService;
@Autowired
private ScheduleMapper scheduleMapper;
@Autowired
private DataSourceMapper dataSourceMapper;
@Autowired
private PythonGatewayConfiguration pythonGatewayConfiguration;
@Autowired
private ProjectUserMapper projectUserMapper;
private final User dummyAdminUser = new User() {
{
setId(ADMIN_USER_ID);
setUserName("dummyUser");
setUserType(UserType.ADMIN_USER);
}
};
private final Queue queuePythonGateway = new Queue() {
{
setId(Integer.MAX_VALUE);
setQueueName("queuePythonGateway");
}
};
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public String ping() {
return "PONG";
}
public Map<String, Object> genTaskCodeList(Integer genNum) {
return taskDefinitionService.genTaskCodeList(genNum);
}
public Map<String, Long> getCodeAndVersion(String projectName, String processDefinitionName, 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;
}
ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(project.getCode(), processDefinitionName);
if (processDefinition == null) {
result.put("code", CodeGenerateUtils.getInstance().genCode());
result.put("version", 0L);
return result;
}
TaskDefinition taskDefinition = taskDefinitionMapper.queryByName(project.getCode(), processDefinition.getCode(), taskName);
if (taskDefinition == null) {
result.put("code", CodeGenerateUtils.getInstance().genCode());
result.put("version", 0L);
} else {
result.put("code", taskDefinition.getCode());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
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
* @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 warningType warning type
* @param warningGroupId warning group id
* @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
* @param otherParamsJson otherParamsJson handle other params
* @return create result code
*/
public Long createOrUpdateProcessDefinition(String userName,
String projectName,
String name,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
String description,
String globalParams,
String schedule,
String warningType,
int warningGroupId,
int timeout,
String workerGroup,
String tenantCode,
int releaseState,
String taskRelationJson,
String taskDefinitionJson,
String otherParamsJson,
ProcessExecutionTypeEnum executionType) {
User user = usersService.queryUser(userName);
Project project = projectMapper.queryByName(projectName);
long projectCode = project.getCode();
ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, name);
long processDefinitionCode;
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,
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
} else {
Map<String, Object> result = processDefinitionService.createProcessDefinition(user, projectCode, name, description, globalParams,
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
processDefinition = (ProcessDefinition) result.get(Constants.DATA_LIST);
processDefinitionCode = processDefinition.getCode();
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
}
if (schedule != null) {
createOrUpdateSchedule(user, projectCode, processDefinitionCode, schedule, workerGroup, warningType, warningGroupId);
}
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.getEnum(releaseState));
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, 0);
Status verifyStatus = (Status) verifyProcessDefinitionExists.get(Constants.STATUS);
ProcessDefinition processDefinition = null;
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.
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
* 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
* @param warningType warning type
* @param warningGroupId warning group id
*/
private void createOrUpdateSchedule(User user,
long projectCode,
long processDefinitionCode,
String schedule,
String workerGroup,
String warningType,
int warningGroupId) {
Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(processDefinitionCode);
int scheduleId;
if (scheduleObj == null) {
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.ONLINE);
Map<String, Object> result = schedulerService.insertSchedule(user, projectCode, processDefinitionCode, schedule, WarningType.valueOf(warningType),
warningGroupId, 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, WarningType.valueOf(warningType),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
warningGroupId, 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,
String warningType,
int warningGroupId,
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,
DEFAULT_TASK_DEPEND_TYPE,
WarningType.valueOf(warningType),
warningGroupId,
DEFAULT_RUN_MODE,
DEFAULT_PRIORITY,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
workerGroup,
DEFAULT_ENVIRONMENT_CODE,
timeout,
null,
null,
DEFAULT_DRY_RUN,
DEFAULT_TEST_FLAG,
COMPLEMENT_DEPENDENT_MODE
);
}
/*
Grant project's permission to user. Use when project's created user not current but
Python API use it to change process definition.
*/
private Integer grantProjectToUser(Project project, User user) {
Date now = new Date();
ProjectUser projectUser = new ProjectUser();
projectUser.setUserId(user.getId());
projectUser.setProjectId(project.getId());
projectUser.setPerm(Constants.AUTHORIZE_WRITABLE_PERM);
projectUser.setCreateTime(now);
projectUser.setUpdateTime(now);
return projectUserMapper.insert(projectUser);
}
/*
Grant or create project. Create a new project if project do not exists, and grant the project
permission to user if project exists but without permission to this user.
*/
public void createOrGrantProject(String userName, String name, String desc) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
User user = usersService.queryUser(userName);
Project project;
project = projectMapper.queryByName(name);
if (project == null) {
projectService.createProject(user, name, desc);
} else if (project.getUserId() != user.getId()) {
ProjectUser projectUser = projectUserMapper.queryProjectRelation(project.getId(), user.getId());
if (projectUser == null) {
grantProjectToUser(project, user);
}
}
}
public Project queryProjectByName(String userName, String projectName) {
User user = usersService.queryUser(userName);
return (Project) projectService.queryByName(user, projectName).get(Constants.DATA_LIST);
}
public void updateProject(String userName, Long projectCode, String projectName, String desc) {
User user = usersService.queryUser(userName);
projectService.update(user, projectCode, projectName, desc, userName);
}
public void deleteProject(String userName, Long projectCode) {
User user = usersService.queryUser(userName);
projectService.deleteProject(user, projectCode);
}
public Tenant createTenant(String tenantCode, String desc, String queueName) {
return tenantService.createTenantIfNotExists(tenantCode, desc, queueName, queueName);
}
public Tenant queryTenantByCode(String tenantCode) {
return (Tenant) tenantService.queryByTenantCode(tenantCode).get(Constants.DATA_LIST);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
public void updateTenant(String userName, int id, String tenantCode, int queueId, String desc) throws Exception {
User user = usersService.queryUser(userName);
tenantService.updateTenant(user, id, tenantCode, queueId, desc);
}
public void deleteTenantById(String userName, Integer tenantId) throws Exception {
User user = usersService.queryUser(userName);
tenantService.deleteTenantById(user, tenantId);
}
public User createUser(String userName,
String userPassword,
String email,
String phone,
String tenantCode,
String queue,
int state) throws IOException {
return usersService.createUserIfNotExists(userName, userPassword, email, phone, tenantCode, queue, state);
}
public User queryUser(int id) {
User user = usersService.queryUser(id);
if (user == null) {
throw new RuntimeException("User not found");
}
return user;
}
public User updateUser(String userName, String userPassword, String email, String phone, String tenantCode, String queue, int state) throws Exception {
return usersService.createUserIfNotExists(userName, userPassword, email, phone, tenantCode, queue, state);
}
public User deleteUser(String userName, int id) throws Exception {
User user = usersService.queryUser(userName);
usersService.deleteUserById(user, id);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
return usersService.queryUser(userName);
}
/**
* 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 == null || dataSourceList.isEmpty()) {
String msg = String.format("Can not find any datasource by name %s", datasourceName);
logger.error(msg);
throw new IllegalArgumentException(msg);
} else 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 {
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.
* Useful in Python API create subProcess task which need processDefinition information.
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
*
* @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.
*
* @param projectName project name which process definition belongs to
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
* @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, processDefinition.getCode(), 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 or spark task which need processDefinition information.
*
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.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<>();
Result<Object> resources = resourceService.queryResourceByProgramType(dummyAdminUser, ResourceType.FILE, ProgramType.valueOf(programType));
List<ResourceComponent> resourcesComponent = (List<ResourceComponent>) resources.getData();
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;
}
/**
* Get environment info by given environment name. It return environment code.
* Useful in Python API create task which need environment information.
*
* @param environmentName name of the environment
*/
public Long getEnvironmentInfo(String environmentName) {
Map<String, Object> result = environmentService.queryEnvironmentByName(environmentName);
if (result.get("data") == null) {
String msg = String.format("Can not find valid environment by name %s", environmentName);
logger.error(msg);
throw new IllegalArgumentException(msg);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
EnvironmentDto environmentDto = EnvironmentDto.class.cast(result.get("data"));
return environmentDto.getCode();
}
/**
* Get resource by given resource type and full name. It return map contain resource id, name.
* Useful in Python API create task which need processDefinition information.
*
* @param userName user who query resource
* @param fullName full name of the resource
*/
public Resource queryResourcesFileInfo(String userName, String fullName) {
return resourceService.queryResourcesFileInfo(userName, fullName);
}
public String getGatewayVersion() {
return PythonGateway.class.getPackage().getImplementationVersion();
}
/**
* create or update resource.
* If the folder is not already created, it will be
*
* @param userName user who create or update resource
* @param fullName The fullname of resource.Includes path and suffix.
* @param description description of resource
* @param resourceContent content of resource
* @return id of resource
*/
public Integer createOrUpdateResource(
String userName, String fullName, String description, String resourceContent) {
return resourceService.createOrUpdateResource(userName, fullName, description, resourceContent);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
|
@PostConstruct
public void init() {
if (pythonGatewayConfiguration.getEnabled()) {
this.start();
}
}
private void start() {
GatewayServer server;
try {
InetAddress gatewayHost = InetAddress.getByName(pythonGatewayConfiguration.getGatewayServerAddress());
InetAddress pythonHost = InetAddress.getByName(pythonGatewayConfiguration.getPythonAddress());
server = new GatewayServer(
this,
pythonGatewayConfiguration.getGatewayServerPort(),
pythonGatewayConfiguration.getPythonPort(),
gatewayHost,
pythonHost,
pythonGatewayConfiguration.getConnectTimeout(),
pythonGatewayConfiguration.getReadTimeout(),
null
);
GatewayServer.turnLoggingOn();
logger.info("PythonGatewayService started on: " + gatewayHost.toString());
server.start();
} catch (UnknownHostException e) {
logger.error("exception occurred while constructing PythonGatewayService().", e);
}
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.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
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.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.api.service;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
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.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
import java.util.Map;
/**
* executor service
*/
public interface ExecutorService {
/**
* execute process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param cronTime cron time
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
|
* @param commandType command type
* @param failureStrategy failure strategy
* @param startNodeList start nodelist
* @param taskDependType node dependency type
* @param warningType warning type
* @param warningGroupId notify group id
* @param processInstancePriority process instance priority
* @param workerGroup worker group name
* @param environmentCode environment code
* @param runMode run mode
* @param timeout timeout
* @param startParams the global param values which pass to new process instance
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
* @return execute process instance code
*/
Map<String, Object> execProcessInstance(User loginUser, long projectCode,
long processDefinitionCode, String cronTime, CommandType commandType,
FailureStrategy failureStrategy, String startNodeList,
TaskDependType taskDependType, WarningType warningType, int warningGroupId,
RunMode runMode,
Priority processInstancePriority, String workerGroup, Long environmentCode,
Integer timeout,
Map<String, String> startParams, Integer expectedParallelismNumber,
int dryRun, int testFlag,
ComplementDependentMode complementDependentMode);
/**
* check whether the process definition can be executed
*
* @param projectCode project code
* @param processDefinition process definition
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
|
* @param processDefineCode process definition code
* @param version process definition version
*/
void checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition, long processDefineCode,
Integer version);
/**
* 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
*/
Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId, ExecuteType executeType);
/**
* check if sub processes are offline before starting process definition
*
* @param processDefinitionCode process definition code
* @return check result code
*/
Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode);
/**
* check if the current process has subprocesses and all subprocesses are valid
* @param processDefinition
* @return check result
*/
boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition);
/**
* force start Task Instance
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
|
* @param loginUser
* @param queueId
* @return
*/
Map<String, Object> forceStartTaskInstance(User loginUser, int queueId);
/**
* query executing workflow data in Master memory
* @param processInstanceId
* @return
*/
WorkflowExecuteDto queryExecutingWorkflowByProcessInstanceId(Integer processInstanceId);
/**
* execute stream task instance
*
* @param loginUser login user
* @param projectCode project code
* @param warningGroupId notify group id
* @param workerGroup worker group name
* @param environmentCode environment code
* @param startParams the global param values which pass to new process instance
* @return execute process instance code
*/
Map<String, Object> execStreamTaskInstance(User loginUser, long projectCode,
long taskDefinitionCode, int taskDefinitionVersion,
int warningGroupId,
String workerGroup, Long environmentCode,
Map<String, String> startParams,
int dryRun);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.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 static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_START;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS;
import static org.apache.dolphinscheduler.common.Constants.COMMA;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import static org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT;
import static org.apache.dolphinscheduler.common.Constants.SCHEDULE_TIME_MAX_LENGTH;
import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ServiceException;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.service.MonitorService;
import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
import org.apache.dolphinscheduler.common.enums.CycleEnum;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.Priority;
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.TaskGroupQueueStatus;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
import org.apache.dolphinscheduler.common.model.Server;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.Command;
import org.apache.dolphinscheduler.dao.entity.DependentProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.dao.entity.TaskDefinition;
import org.apache.dolphinscheduler.dao.entity.TaskGroupQueue;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper;
import org.apache.dolphinscheduler.dao.repository.ProcessInstanceDao;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
import org.apache.dolphinscheduler.remote.command.TaskExecuteStartCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataRequestCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataResponseCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowStateEventChangeCommand;
import org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
import org.apache.dolphinscheduler.remote.processor.StateEventCallbackService;
import org.apache.dolphinscheduler.remote.utils.Host;
import org.apache.dolphinscheduler.service.cron.CronUtils;
import org.apache.dolphinscheduler.service.exceptions.CronParseException;
import org.apache.dolphinscheduler.service.process.ProcessService;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import java.time.ZonedDateTime;
import java.util.ArrayList;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import java.util.Arrays;
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 com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.Lists;
/**
* executor service impl
*/
@Service
public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorService {
private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceImpl.class);
@Autowired
private ProjectMapper projectMapper;
@Autowired
private ProjectService projectService;
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
@Autowired
private MonitorService monitorService;
@Autowired
private ProcessInstanceMapper processInstanceMapper;
@Autowired
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
private ProcessService processService;
@Autowired
private ProcessInstanceDao processInstanceDao;
@Autowired
private StateEventCallbackService stateEventCallbackService;
@Autowired
private TaskDefinitionMapper taskDefinitionMapper;
@Autowired
private ProcessTaskRelationMapper processTaskRelationMapper;
@Autowired
private TaskGroupQueueMapper taskGroupQueueMapper;
/**
* execute process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param cronTime cron time
* @param commandType command type
* @param failureStrategy failure strategy
* @param startNodeList start nodelist
* @param taskDependType node dependency type
* @param warningType warning type
* @param warningGroupId notify group id
* @param processInstancePriority process instance priority
* @param workerGroup worker group name
* @param environmentCode environment code
* @param runMode run mode
* @param timeout timeout
* @param startParams the global param values which pass to new process instance
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
* @param testFlag testFlag
* @return execute process instance code
*/
@Override
public Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode,
String cronTime, CommandType commandType,
FailureStrategy failureStrategy, String startNodeList,
TaskDependType taskDependType, WarningType warningType,
int warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup,
Long environmentCode, Integer timeout,
Map<String, String> startParams, Integer expectedParallelismNumber,
int dryRun, int testFlag,
ComplementDependentMode complementDependentMode) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) {
logger.warn("Parameter timeout is invalid, timeout:{}.", timeout);
putMsg(result, Status.TASK_TIMEOUT_PARAMS_ERROR);
return result;
}
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
this.checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode,
processDefinition.getVersion());
if (!checkTenantSuitable(processDefinition)) {
logger.error(
"There is not any valid tenant for the process definition, processDefinitionCode:{}, processDefinitionName:{}.",
processDefinition.getCode(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
return result;
}
if (!checkScheduleTimeNum(commandType, cronTime)) {
putMsg(result, Status.SCHEDULE_TIME_NUMBER);
return result;
}
if (!checkMasterExists(result)) {
return result;
}
/**
* create command
*/
int create =
this.createCommand(commandType, processDefinition.getCode(), taskDependType, failureStrategy,
startNodeList,
cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority,
workerGroup,
environmentCode, startParams, expectedParallelismNumber, dryRun, testFlag,
complementDependentMode);
if (create > 0) {
processDefinition.setWarningGroupId(warningGroupId);
processDefinitionMapper.updateById(processDefinition);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.info("Create command complete, processDefinitionCode:{}, commandCount:{}.",
processDefinition.getCode(), create);
putMsg(result, Status.SUCCESS);
} else {
logger.error("Start process instance failed because create command error, processDefinitionCode:{}.",
processDefinition.getCode());
putMsg(result, Status.START_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* check whether master exists
*
* @param result result
* @return master exists return true , otherwise return false
*/
private boolean checkMasterExists(Map<String, Object> result) {
List<Server> masterServers = monitorService.getServerListFromRegistry(true);
if (masterServers.isEmpty()) {
logger.error("Master does not exist.");
putMsg(result, Status.MASTER_NOT_EXISTS);
return false;
}
return true;
}
/**
* @param complementData
* @param cronTime
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @return CommandType is COMPLEMENT_DATA and cronTime's number is not greater than 100 return true , otherwise return false
*/
private boolean checkScheduleTimeNum(CommandType complementData, String cronTime) {
if (!CommandType.COMPLEMENT_DATA.equals(complementData)) {
return true;
}
if (cronTime == null) {
return true;
}
Map<String, String> cronMap = JSONUtils.toMap(cronTime);
if (cronMap.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
String[] stringDates = cronMap.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).split(COMMA);
if (stringDates.length > SCHEDULE_TIME_MAX_LENGTH) {
logger.warn("Parameter cornTime is bigger than {}.", SCHEDULE_TIME_MAX_LENGTH);
return false;
}
}
return true;
}
/**
* check whether the process definition can be executed
*
* @param projectCode project code
* @param processDefinition process definition
* @param processDefineCode process definition code
* @param version process instance version
*/
@Override
public void checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition,
long processDefineCode, Integer version) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (processDefinition == null || projectCode != processDefinition.getProjectCode()) {
throw new ServiceException(Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode));
}
if (processDefinition.getReleaseState() != ReleaseState.ONLINE) {
throw new ServiceException(Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version);
}
if (!checkSubProcessDefinitionValid(processDefinition)) {
throw new ServiceException(Status.SUB_PROCESS_DEFINE_NOT_RELEASE);
}
}
/**
* check whether the current process has subprocesses and validate all subprocesses
*
* @param processDefinition
* @return check result
*/
@Override
public boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition) {
List<ProcessTaskRelation> processTaskRelations =
processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode());
if (processTaskRelations.isEmpty()) {
return true;
}
Set<Long> relationCodes =
processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet());
List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryByCodeList(relationCodes);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
Set<Long> processDefinitionCodeSet = new HashSet<>();
taskDefinitions.stream()
.filter(task -> TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach(
taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(
JSONUtils.getNodeString(taskDefinition.getTaskParams(),
Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));
if (processDefinitionCodeSet.isEmpty()) {
return true;
}
List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryByCodes(processDefinitionCodeSet);
return processDefinitions.stream()
.filter(definition -> definition.getReleaseState().equals(ReleaseState.OFFLINE))
.collect(Collectors.toSet())
.isEmpty();
}
/**
* do action to process instance:pause, stop, repeat, recover from pause, recover from stop,rerun failed task
*
* @param loginUser login user
* @param projectCode project code
* @param processInstanceId process instance id
* @param executeType execute type
* @return execute result code
*/
@Override
public Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
ExecuteType executeType) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,
ApiFuncIdentificationConstant.map.get(executeType));
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkMasterExists(result)) {
return result;
}
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId)
.orElseThrow(() -> new ServiceException(Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId));
ProcessDefinition processDefinition =
processService.findProcessDefinition(processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
processDefinition.setReleaseState(ReleaseState.ONLINE);
if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) {
this.checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
}
result = checkExecuteType(processInstance, executeType);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkTenantSuitable(processDefinition)) {
logger.error(
"There is not any valid tenant for the process definition, processDefinitionId:{}, processDefinitionCode:{}, ",
processDefinition.getId(), processDefinition.getName());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
putMsg(result, Status.TENANT_NOT_SUITABLE);
}
// g
Map<String, Object> commandMap =
JSONUtils.parseObject(processInstance.getCommandParam(), new TypeReference<Map<String, Object>>() {
});
String startParams = null;
if (MapUtils.isNotEmpty(commandMap) && executeType == ExecuteType.REPEAT_RUNNING) {
Object startParamsJson = commandMap.get(Constants.CMD_PARAM_START_PARAMS);
if (startParamsJson != null) {
startParams = startParamsJson.toString();
}
}
switch (executeType) {
case REPEAT_RUNNING:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.REPEAT_RUNNING, startParams,
processInstance.getTestFlag());
break;
case RECOVER_SUSPENDED_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.RECOVER_SUSPENDED_PROCESS, startParams,
processInstance.getTestFlag());
break;
case START_FAILURE_TASK_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.START_FAILURE_TASK_PROCESS, startParams,
processInstance.getTestFlag());
break;
case STOP:
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (processInstance.getState() == WorkflowExecutionStatus.READY_STOP) {
logger.warn("Process instance status is already {}, processInstanceName:{}.",
WorkflowExecutionStatus.READY_STOP.getDesc(), processInstance.getName());
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
result =
updateProcessInstancePrepare(processInstance, CommandType.STOP,
WorkflowExecutionStatus.READY_STOP);
}
break;
case PAUSE:
if (processInstance.getState() == WorkflowExecutionStatus.READY_PAUSE) {
logger.warn("Process instance status is already {}, processInstanceName:{}.",
WorkflowExecutionStatus.READY_STOP.getDesc(), processInstance.getName());
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE,
WorkflowExecutionStatus.READY_PAUSE);
}
break;
default:
logger.warn("Unknown execute type for process instance, processInstanceId:{}.",
processInstance.getId());
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type");
break;
}
return result;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
@Override
public Map<String, Object> forceStartTaskInstance(User loginUser, int queueId) {
Map<String, Object> result = new HashMap<>();
TaskGroupQueue taskGroupQueue = taskGroupQueueMapper.selectById(queueId);
// c
ProcessInstance processInstance = processInstanceMapper.selectById(taskGroupQueue.getProcessId());
if (processInstance == null) {
logger.error("Process instance does not exist, projectCode:{}, processInstanceId:{}.",
taskGroupQueue.getProjectCode(), taskGroupQueue.getProcessId());
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, taskGroupQueue.getProcessId());
return result;
}
if (!checkMasterExists(result)) {
return result;
}
return forceStart(processInstance, taskGroupQueue);
}
/**
* check tenant suitable
*
* @param processDefinition process definition
* @return true if tenant suitable, otherwise return false
*/
private boolean checkTenantSuitable(ProcessDefinition processDefinition) {
Tenant tenant =
processService.getTenantForProcess(processDefinition.getTenantId(), processDefinition.getUserId());
return tenant != null;
}
/**
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* Check the state of process instance and the type of operation match
*
* @param processInstance process instance
* @param executeType execute type
* @return check result code
*/
private Map<String, Object> checkExecuteType(ProcessInstance processInstance, ExecuteType executeType) {
Map<String, Object> result = new HashMap<>();
WorkflowExecutionStatus executionStatus = processInstance.getState();
boolean checkResult = false;
switch (executeType) {
case PAUSE:
if (executionStatus.isRunning()) {
checkResult = true;
}
break;
case STOP:
if (executionStatus.canStop()) {
checkResult = true;
}
break;
case REPEAT_RUNNING:
if (executionStatus.isFinished()) {
checkResult = true;
}
break;
case START_FAILURE_TASK_PROCESS:
if (executionStatus.isFailure()) {
checkResult = true;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
break;
case RECOVER_SUSPENDED_PROCESS:
if (executionStatus.isPause() || executionStatus.isStop()) {
checkResult = true;
}
break;
default:
break;
}
if (!checkResult) {
putMsg(result, Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstance.getName(),
executionStatus.toString(), executeType.toString());
} else {
putMsg(result, Status.SUCCESS);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @param commandType command type
* @param executionStatus execute status
* @return update result
*/
private Map<String, Object> updateProcessInstancePrepare(ProcessInstance processInstance, CommandType commandType,
WorkflowExecutionStatus executionStatus) {
Map<String, Object> result = new HashMap<>();
processInstance.setCommandType(commandType);
processInstance.addHistoryCmd(commandType);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
processInstance.setStateWithDesc(executionStatus, commandType.getDescp() + "by ui");
int update = processInstanceDao.updateProcessInstance(processInstance);
// d
if (update > 0) {
logger.info("Process instance state is updated to {} in database, processInstanceName:{}.",
executionStatus.getDesc(), processInstance.getName());
// d
// s
WorkflowStateEventChangeCommand workflowStateEventChangeCommand = new WorkflowStateEventChangeCommand(
processInstance.getId(), 0, processInstance.getState(), processInstance.getId(), 0);
Host host = new Host(processInstance.getHost());
stateEventCallbackService.sendResult(host, workflowStateEventChangeCommand.convert2Command());
putMsg(result, Status.SUCCESS);
} else {
logger.error("Process instance state update error, processInstanceName:{}.", processInstance.getName());
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @return update result
*/
private Map<String, Object> forceStart(ProcessInstance processInstance, TaskGroupQueue taskGroupQueue) {
Map<String, Object> result = new HashMap<>();
if (taskGroupQueue.getStatus() != TaskGroupQueueStatus.WAIT_QUEUE) {
logger.warn("Task group queue already starts, taskGroupQueueId:{}.", taskGroupQueue.getId());
putMsg(result, Status.TASK_GROUP_QUEUE_ALREADY_START);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return result;
}
taskGroupQueue.setForceStart(Flag.YES.getCode());
processService.updateTaskGroupQueue(taskGroupQueue);
logger.info("Sending force start command to master.");
processService.sendStartTask2Master(processInstance, taskGroupQueue.getTaskId(),
org.apache.dolphinscheduler.remote.command.CommandType.TASK_FORCE_STATE_EVENT_REQUEST);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* insert command, used in the implementation of the page, rerun, recovery (pause / failure) execution
*
* @param loginUser login user
* @param instanceId instance id
* @param processDefinitionCode process definition code
* @param processVersion
* @param commandType command type
* @return insert result code
*/
private Map<String, Object> insertCommand(User loginUser, Integer instanceId, long processDefinitionCode,
int processVersion, CommandType commandType, String startParams,
int testFlag) {
Map<String, Object> result = new HashMap<>();
// T
Map<String, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, instanceId);
if (!StringUtils.isEmpty(startParams)) {
cmdParam.put(CMD_PARAM_START_PARAMS, startParams);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
Command command = new Command();
command.setCommandType(commandType);
command.setProcessDefinitionCode(processDefinitionCode);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(loginUser.getId());
command.setProcessDefinitionVersion(processVersion);
command.setProcessInstanceId(instanceId);
command.setTestFlag(testFlag);
if (!processService.verifyIsNeedCreateCommand(command)) {
logger.warn(
"Process instance is executing the command, processDefinitionCode:{}, processDefinitionVersion:{}, processInstanceId:{}.",
processDefinitionCode, processVersion, instanceId);
putMsg(result, Status.PROCESS_INSTANCE_EXECUTING_COMMAND, String.valueOf(processDefinitionCode));
return result;
}
logger.info("Creating command, commandInfo:{}.", command);
int create = processService.createCommand(command);
if (create > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}, processDefinitionVersion:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode(), processVersion);
putMsg(result, Status.SUCCESS);
} else {
logger.error(
"Execute process instance failed because create {} command error, processDefinitionCode:{}, processDefinitionVersion:{}, processInstanceId:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode(), processVersion,
instanceId);
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return result;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
/**
* check whether sub processes are offline before starting process definition
*
* @param processDefinitionCode process definition code
* @return check result code
*/
@Override
public Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode) {
Map<String, Object> result = new HashMap<>();
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
if (processDefinition == null) {
logger.error("Process definition is not be found, processDefinitionCode:{}.", processDefinitionCode);
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "processDefinitionCode");
return result;
}
List<Long> codes = new ArrayList<>();
processService.recurseFindSubProcess(processDefinition.getCode(), codes);
if (!codes.isEmpty()) {
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(codes);
if (processDefinitionList != null) {
for (ProcessDefinition processDefinitionTmp : processDefinitionList) {
/**
* if there is no online process, exit directly
*/
if (processDefinitionTmp.getReleaseState() != ReleaseState.ONLINE) {
logger.warn("Subprocess definition {} of process definition {} is not {}.",
processDefinitionTmp.getName(),
processDefinition.getName(), ReleaseState.ONLINE.getDescp());
putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, processDefinitionTmp.getName());
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
}
}
}
putMsg(result, Status.SUCCESS);
return result;
}
/**
* create command
*
* @param commandType commandType
* @param processDefineCode processDefineCode
* @param nodeDep nodeDep
* @param failureStrategy failureStrategy
* @param startNodeList startNodeList
* @param schedule schedule
* @param warningType warningType
* @param executorId executorId
* @param warningGroupId warningGroupId
* @param runMode runMode
* @param processInstancePriority processInstancePriority
* @param workerGroup workerGroup
* @param testFlag testFlag
* @param environmentCode environmentCode
* @return command id
*/
private int createCommand(CommandType commandType, long processDefineCode, TaskDependType nodeDep,
FailureStrategy failureStrategy, String startNodeList, String schedule,
WarningType warningType, int executorId, int warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup, Long environmentCode,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun,
int testFlag, ComplementDependentMode complementDependentMode) {
/**
* instantiate command schedule instance
*/
Command command = new Command();
Map<String, String> cmdParam = new HashMap<>();
if (commandType == null) {
command.setCommandType(CommandType.START_PROCESS);
} else {
command.setCommandType(commandType);
}
command.setProcessDefinitionCode(processDefineCode);
if (nodeDep != null) {
command.setTaskDependType(nodeDep);
}
if (failureStrategy != null) {
command.setFailureStrategy(failureStrategy);
}
if (!StringUtils.isEmpty(startNodeList)) {
cmdParam.put(CMD_PARAM_START_NODES, startNodeList);
}
if (warningType != null) {
command.setWarningType(warningType);
}
if (startParams != null && startParams.size() > 0) {
cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams));
}
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(executorId);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.setWarningGroupId(warningGroupId);
command.setProcessInstancePriority(processInstancePriority);
command.setWorkerGroup(workerGroup);
command.setEnvironmentCode(environmentCode);
command.setDryRun(dryRun);
command.setTestFlag(testFlag);
ProcessDefinition processDefinition = processService.findProcessDefinitionByCode(processDefineCode);
if (processDefinition != null) {
command.setProcessDefinitionVersion(processDefinition.getVersion());
}
command.setProcessInstanceId(0);
// det
if (commandType == CommandType.COMPLEMENT_DATA) {
if (schedule == null || StringUtils.isEmpty(schedule)) {
logger.error("Create {} type command error because parameter schedule is invalid.",
command.getCommandType().getDescp());
return 0;
}
if (!isValidateScheduleTime(schedule)) {
return 0;
}
try {
logger.info("Start to create {} command, processDefinitionCode:{}.",
command.getCommandType().getDescp(), processDefineCode);
return createComplementCommandList(schedule, runMode, command, expectedParallelismNumber,
complementDependentMode);
} catch (CronParseException cronParseException) {
// We
// cro
return 0;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
} else {
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
return processService.createCommand(command);
}
}
/**
* create complement command
* close left and close right
*
* @param scheduleTimeParam
* @param runMode
* @return
*/
protected int createComplementCommandList(String scheduleTimeParam, RunMode runMode, Command command,
Integer expectedParallelismNumber,
ComplementDependentMode complementDependentMode) throws CronParseException {
int createCount = 0;
String startDate = null;
String endDate = null;
String dateList = null;
int dependentProcessDefinitionCreateCount = 0;
runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode;
Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam());
Map<String, String> scheduleParam = JSONUtils.toMap(scheduleTimeParam);
if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
dateList = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST);
dateList = removeDuplicates(dateList);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE) && scheduleParam.containsKey(
CMDPARAM_COMPLEMENT_DATA_END_DATE)) {
startDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE);
endDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE);
}
switch (runMode) {
case RUN_MODE_SERIAL: {
logger.info("RunMode of {} command is serial run, processDefinitionCode:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
if (StringUtils.isNotEmpty(dateList)) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, dateList);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
createCount = processService.createCommand(command);
if (createCount > 0)
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
else
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
}
if (startDate != null && endDate != null) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startDate);
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endDate);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
createCount = processService.createCommand(command);
if (createCount > 0)
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
else
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
// dep
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info(
"Complement dependent mode is off mode or Scheduler is empty, so skip create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
} else {
logger.info(
"Complement dependent mode is all dependent and Scheduler is not empty, need create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command);
}
}
break;
}
case RUN_MODE_PARALLEL: {
logger.info("RunMode of {} command is parallel run, processDefinitionCode:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
if (startDate != null && endDate != null) {
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
List<ZonedDateTime> listDate = CronUtils.getSelfFireDateList(
DateUtils.stringToZoneDateTime(startDate),
DateUtils.stringToZoneDateTime(endDate),
schedules);
int listDateSize = listDate.size();
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("Complement command run in parallel mode, current expectedParallelismNumber:{}.",
createCount);
// Dis
// The
int itemsPerCommand = (listDateSize / createCount);
int remainingItems = (listDateSize % createCount);
int startDateIndex = 0;
int endDateIndex = 0;
for (int i = 1; i <= createCount; i++) {
int extra = (i <= remainingItems) ? 1 : 0;
int singleCommandItems = (itemsPerCommand + extra);
if (i == 1) {
endDateIndex += singleCommandItems - 1;
} else {
startDateIndex = endDateIndex + 1;
endDateIndex += singleCommandItems;
}
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE,
DateUtils.dateToString(listDate.get(startDateIndex)));
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE,
DateUtils.dateToString(listDate.get(endDateIndex)));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
if (processService.createCommand(command) > 0)
logger.info("Create {} command complete, processDefinitionCode:{}",
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
else
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info(
"Complement dependent mode is off mode or Scheduler is empty, so skip create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
} else {
logger.info(
"Complement dependent mode is all dependent and Scheduler is not empty, need create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
dependentProcessDefinitionCreateCount +=
createComplementDependentCommand(schedules, command);
}
}
}
}
if (StringUtils.isNotEmpty(dateList)) {
List<String> listDate = Arrays.asList(dateList.split(COMMA));
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("Complement command run in parallel mode, current expectedParallelismNumber:{}.",
createCount);
for (List<String> stringDate : Lists.partition(listDate, createCount)) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, String.join(COMMA, stringDate));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.info("Creating command, commandInfo:{}.", command);
if (processService.createCommand(command) > 0)
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
else
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
}
}
}
break;
}
default:
break;
}
logger.info("Create complement command count:{}, Create dependent complement command count:{}", createCount,
dependentProcessDefinitionCreateCount);
return createCount;
}
/**
* create complement dependent command
*/
public int createComplementDependentCommand(List<Schedule> schedules, Command command) {
int dependentProcessDefinitionCreateCount = 0;
Command dependentCommand;
try {
dependentCommand = (Command) BeanUtils.cloneBean(command);
} catch (Exception e) {
logger.error("Copy dependent command error.", e);
return dependentProcessDefinitionCreateCount;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
List<DependentProcessDefinition> dependentProcessDefinitionList =
getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(),
CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup());
dependentCommand.setTaskDependType(TaskDependType.TASK_POST);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
// If
// and
dependentCommand.setId(null);
dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode());
dependentCommand.setProcessDefinitionVersion(dependentProcessDefinition.getProcessDefinitionVersion());
dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup());
Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam());
cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode()));
dependentCommand.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating complement dependent command, commandInfo:{}.", command);
dependentProcessDefinitionCreateCount += processService.createCommand(dependentCommand);
}
return dependentProcessDefinitionCreateCount;
}
/**
* get complement dep list
*/
private List<DependentProcessDefinition> getComplementDependentDefinitionList(long processDefinitionCode,
CycleEnum processDefinitionCycle,
String workerGroup) {
List<DependentProcessDefinition> dependentProcessDefinitionList =
processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode);
return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle,
workerGroup, processDefinitionCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
/**
* Check whether the dependency cycle of the dependent node is consistent with the schedule cycle of
* the dep and if there is no worker group in the schedule, use the complement selection's
* worker group
*/
private List<DependentProcessDefinition> checkDependentProcessDefinitionValid(
List<DependentProcessDefinition> dependentProcessDefinitionList,
CycleEnum processDefinitionCycle,
String workerGroup,
long upstreamProcessDefinitionCode) {
List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>();
List<Long> processDefinitionCodeList =
dependentProcessDefinitionList.stream().map(DependentProcessDefinition::getProcessDefinitionCode)
.collect(Collectors.toList());
Map<Long, String> processDefinitionWorkerGroupMap =
processService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
if (dependentProcessDefinition.getDependentCycle(upstreamProcessDefinitionCode) == processDefinitionCycle) {
if (processDefinitionWorkerGroupMap
.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) {
dependentProcessDefinition.setWorkerGroup(workerGroup);
}
validDependentProcessDefinitionList.add(dependentProcessDefinition);
}
}
return validDependentProcessDefinitionList;
}
/**
* @param schedule
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @return check error return 0, otherwise 1
*/
private boolean isValidateScheduleTime(String schedule) {
Map<String, String> scheduleResult = JSONUtils.toMap(schedule);
if (scheduleResult == null) {
return false;
}
if (scheduleResult.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
if (scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST) == null) {
return false;
}
}
if (scheduleResult.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) {
String startDate = scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_START_DATE);
String endDate = scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_END_DATE);
if (startDate == null || endDate == null) {
return false;
}
try {
ZonedDateTime start = DateUtils.stringToZoneDateTime(startDate);
ZonedDateTime end = DateUtils.stringToZoneDateTime(endDate);
if (start == null || end == null) {
return false;
}
if (start.isAfter(end)) {
logger.error(
"Complement data parameter error, start time should be before end time, startDate:{}, endDate:{}.",
start, end);
return false;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
} catch (Exception ex) {
logger.warn("Parse schedule time error, startDate:{}, endDate:{}.", startDate, endDate);
return false;
}
}
return true;
}
/**
* @param scheduleTimeList
* @return remove duplicate date list
*/
private String removeDuplicates(String scheduleTimeList) {
if (StringUtils.isNotEmpty(scheduleTimeList)) {
Set<String> dateSet =
Arrays.stream(scheduleTimeList.split(COMMA)).map(String::trim).collect(Collectors.toSet());
return String.join(COMMA, dateSet);
}
return null;
}
/**
* query executing data of processInstance by master
* @param processInstanceId
* @return
*/
@Override
public WorkflowExecuteDto queryExecutingWorkflowByProcessInstanceId(Integer processInstanceId) {
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId).orElse(null);
if (processInstance == null) {
logger.error("Process instance does not exist, processInstanceId:{}.", processInstanceId);
return null;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,753 |
[Bug] [Alert Server] send alert error alert data id
|
### 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 want to test Email send when a task finish , I get a error :
[INFO] 2022-09-02 08:00:11.268 +0000 org.apache.dolphinscheduler.alert.AlertRequestProcessor:[52] - Received command : AlertSendRequestCommand{groupId=0, title='sql_hive query result sets', content='[{"_c0":36816}]', warnType=1}
[ERROR] 2022-09-02 08:00:11.270 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[148] - Alert GroupId 0 send error : not found alert instance
[ERROR] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[244] - send alert error alert data id :57,
java.lang.NullPointerException: User must not be null
at java.util.Objects.requireNonNull(Objects.java:228)
at org.apache.dolphinscheduler.plugin.alert.email.MailSender.<init>(MailSender.java:109)
at org.apache.dolphinscheduler.plugin.alert.email.EmailAlertChannel.process(EmailAlertChannel.java:41)
at org.apache.dolphinscheduler.alert.AlertSenderService.alertResultHandler(AlertSenderService.java:232)
at org.apache.dolphinscheduler.alert.AlertSenderService.send(AlertSenderService.java:105)
at org.apache.dolphinscheduler.alert.AlertSenderService.run(AlertSenderService.java:76)
[INFO] 2022-09-02 08:00:14.699 +0000 org.apache.dolphinscheduler.alert.AlertSenderService:[255] - Alert Plugin Email-Alert send error : User must not be null
### What you expected to happen
I should got a Email when a task finish
### How to reproduce
create a Email group , smtp then I create a test task , run It with a Email group ,then will get the same error
### Anything else
dolphin 3.0 pseudo-cluster install
### Version
3.0.0
### 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/11753
|
https://github.com/apache/dolphinscheduler/pull/11774
|
57fafe42567b434d5a8ef4673ca5d9796cc4dd05
|
e27c79974d93d0d4181a0f5dbe45159084e224d3
| 2022-09-02T08:19:12Z |
java
| 2022-09-29T07:34:40Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
Host host = new Host(processInstance.getHost());
WorkflowExecutingDataRequestCommand requestCommand = new WorkflowExecutingDataRequestCommand();
requestCommand.setProcessInstanceId(processInstanceId);
org.apache.dolphinscheduler.remote.command.Command command =
stateEventCallbackService.sendSync(host, requestCommand.convert2Command());
if (command == null) {
logger.error("Query executing process instance from master error, processInstanceId:{}.",
processInstanceId);
return null;
}
WorkflowExecutingDataResponseCommand responseCommand =
JSONUtils.parseObject(command.getBody(), WorkflowExecutingDataResponseCommand.class);
return responseCommand.getWorkflowExecuteDto();
}
@Override
public Map<String, Object> execStreamTaskInstance(User loginUser, long projectCode, long taskDefinitionCode,
int taskDefinitionVersion,
int warningGroupId, String workerGroup, Long environmentCode,
Map<String, String> startParams, int dryRun) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkMasterExists(result)) {
return result;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.