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 | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | nextEvent.setTaskInstanceId(nextTaskInstance.getId());
nextEvent.setType(StateEventType.WAIT_TASK_GROUP);
ths.stateEvents.add(nextEvent);
} else {
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(nextTaskInstance.getProcessInstanceId());
ths.processServce.sendStartTask2Master(processInstance, nextTaskInstance.getId(), org.apache.dolphnscheduler.remote.command.CommandType.TASK_WAKEUP_EVENT_REQUEST);
}
}
}
}
/**
* crate new task nstance to retry, dfferent objects from the orgnal
*
* @param taskInstance
*/
prvate vod retryTaskInstance(TaskInstance taskInstance) throws StateEventHandleExcepton {
f (!taskInstance.taskCanRetry()) {
return;
}
TaskInstance newTaskInstance = cloneRetryTaskInstance(taskInstance);
f (newTaskInstance == null) {
logger.error("retry fal, new taskInstance s null, task code:{}, task d:{}",
taskInstance.getTaskCode(),
taskInstance.getId());
return;
}
watToRetryTaskInstanceMap.put(newTaskInstance.getTaskCode(), newTaskInstance);
f (!taskInstance.retryTaskIntervalOverTme()) {
logger.nfo("falure task wll be submtted: process d: {}, task nstance code: {} state:{} retry tmes:{} / {}, nterval:{}", processInstance.getId(), newTaskInstance.getTaskCode(),
newTaskInstance.getState(), newTaskInstance.getRetryTmes(), newTaskInstance.getMaxRetryTmes(), newTaskInstance.getRetryInterval()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | stateWheelExecuteThread.addTask4TmeoutCheck(processInstance, newTaskInstance);
stateWheelExecuteThread.addTask4RetryCheck(processInstance, newTaskInstance);
} else {
addTaskToStandByLst(newTaskInstance);
submtStandByTask();
watToRetryTaskInstanceMap.remove(newTaskInstance.getTaskCode());
}
}
/**
* update process nstance
*/
publc vod refreshProcessInstance(nt processInstanceId) {
logger.nfo("process nstance update: {}", processInstanceId);
ProcessInstance newProcessInstance = processServce.fndProcessInstanceById(processInstanceId);
BeanUtls.copyPropertes(newProcessInstance, processInstance);
processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(),
processInstance.getProcessDefntonVerson());
processInstance.setProcessDefnton(processDefnton);
}
/**
* update task nstance
*/
publc vod refreshTaskInstance(nt taskInstanceId) {
logger.nfo("task nstance update: {} ", taskInstanceId);
TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId);
f (taskInstance == null) {
logger.error("can not fnd task nstance, d:{}", taskInstanceId);
return;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | processServce.packageTaskInstance(taskInstance, processInstance);
taskInstanceMap.put(taskInstance.getId(), taskInstance);
valdTaskMap.remove(taskInstance.getTaskCode());
f (Flag.YES == taskInstance.getFlag()) {
valdTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
}
}
/**
* check process nstance by state event
*/
publc vod checkProcessInstance(StateEvent stateEvent) throws StateEventHandleError {
f (ths.processInstance.getId() != stateEvent.getProcessInstanceId()) {
throw new StateEventHandleError("The event doesn't contans process nstance d");
}
}
/**
* check f task nstance exst by state event
*/
publc vod checkTaskInstanceByStateEvent(StateEvent stateEvent) throws StateEventHandleError {
f (stateEvent.getTaskInstanceId() == 0) {
throw new StateEventHandleError("The taskInstanceId s 0");
}
f (!taskInstanceMap.contansKey(stateEvent.getTaskInstanceId())) {
throw new StateEventHandleError("Cannot fnd the taskInstance from taskInstanceMap");
}
}
/**
* check f task nstance exst by d
*/
publc boolean checkTaskInstanceById(nt taskInstanceId) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | f (taskInstanceMap.sEmpty()) {
return false;
}
return taskInstanceMap.contansKey(taskInstanceId);
}
/**
* get task nstance from memory
*/
publc Optonal<TaskInstance> getTaskInstance(nt taskInstanceId) {
f (taskInstanceMap.contansKey(taskInstanceId)) {
return Optonal.ofNullable(taskInstanceMap.get(taskInstanceId));
}
return Optonal.empty();
}
publc Optonal<TaskInstance> getTaskInstance(long taskCode) {
f (taskInstanceMap.sEmpty()) {
return Optonal.empty();
}
for (TaskInstance taskInstance : taskInstanceMap.values()) {
f (taskInstance.getTaskCode() == taskCode) {
return Optonal.of(taskInstance);
}
}
return Optonal.empty();
}
publc Optonal<TaskInstance> getActveTaskInstanceByTaskCode(long taskCode) {
Integer taskInstanceId = valdTaskMap.get(taskCode);
f (taskInstanceId != null) {
return Optonal.ofNullable(taskInstanceMap.get(taskInstanceId));
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | return Optonal.empty();
}
publc Optonal<TaskInstance> getRetryTaskInstanceByTaskCode(long taskCode) {
f (watToRetryTaskInstanceMap.contansKey(taskCode)) {
return Optonal.ofNullable(watToRetryTaskInstanceMap.get(taskCode));
}
return Optonal.empty();
}
publc vod processBlock() {
ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId());
processAlertManager.sendProcessBlockngAlert(processInstance, projectUser);
logger.nfo("processInstance {} block alert send successful!", processInstance.getId());
}
publc boolean processComplementData() {
f (!needComplementProcess()) {
return false;
}
f (processInstance.getState() == ExecutonStatus.READY_STOP || !processInstance.getState().typeIsFnshed()) {
return false;
}
Date scheduleDate = processInstance.getScheduleTme();
f (scheduleDate == null) {
scheduleDate = complementLstDate.get(0);
} else f (processInstance.getState().typeIsFnshed()) {
endProcess();
f (complementLstDate.sEmpty()) {
logger.nfo("process complement end. process d:{}", processInstance.getId());
return true; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
nt ndex = complementLstDate.ndexOf(scheduleDate);
f (ndex >= complementLstDate.sze() - 1 || !processInstance.getState().typeIsSuccess()) {
logger.nfo("process complement end. process d:{}", processInstance.getId());
return true;
}
logger.nfo("process complement contnue. process d:{}, schedule tme:{} complementLstDate:{}", processInstance.getId(), processInstance.getScheduleTme(), complementLstDate);
scheduleDate = complementLstDate.get(ndex + 1);
}
nt create = ths.createComplementDataCommand(scheduleDate);
f (create > 0) {
logger.nfo("create complement data command successfully.");
}
return true;
}
prvate nt createComplementDataCommand(Date scheduleDate) {
Command command = new Command();
command.setScheduleTme(scheduleDate);
command.setCommandType(CommandType.COMPLEMENT_DATA);
command.setProcessDefntonCode(processInstance.getProcessDefntonCode());
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
f (cmdParam.contansKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) {
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
}
f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST,
cmdParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)
.substrng(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).ndexOf(COMMA) + 1)); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) {
cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtls.format(scheduleDate, YYYY_MM_DD_HH_MM_SS, null));
}
command.setCommandParam(JSONUtls.toJsonStrng(cmdParam));
command.setTaskDependType(processInstance.getTaskDependType());
command.setFalureStrategy(processInstance.getFalureStrategy());
command.setWarnngType(processInstance.getWarnngType());
command.setWarnngGroupId(processInstance.getWarnngGroupId());
command.setStartTme(new Date());
command.setExecutorId(processInstance.getExecutorId());
command.setUpdateTme(new Date());
command.setProcessInstanceProrty(processInstance.getProcessInstanceProrty());
command.setWorkerGroup(processInstance.getWorkerGroup());
command.setEnvronmentCode(processInstance.getEnvronmentCode());
command.setDryRun(processInstance.getDryRun());
command.setProcessInstanceId(0);
command.setProcessDefntonVerson(processInstance.getProcessDefntonVerson());
return processServce.createCommand(command);
}
prvate boolean needComplementProcess() {
f (processInstance.sComplementData() && Flag.NO == processInstance.getIsSubProcess()) {
return true;
}
return false;
}
/**
* ProcessInstance start entrypont.
*/
@Overrde |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | publc WorkflowSubmtStatue call() {
f (sStart()) {
logger.warn("[WorkflowInstance-{}] The workflow has already been started", processInstance.getId());
return WorkflowSubmtStatue.DUPLICATED_SUBMITTED;
}
try {
LoggerUtls.setWorkflowInstanceIdMDC(processInstance.getId());
f (workflowRunnableStatus == WorkflowRunnableStatus.CREATED) {
buldFlowDag();
workflowRunnableStatus = WorkflowRunnableStatus.INITIALIZE_DAG;
logger.nfo("workflowStatue changed to :{}", workflowRunnableStatus);
}
f (workflowRunnableStatus == WorkflowRunnableStatus.INITIALIZE_DAG) {
ntTaskQueue();
workflowRunnableStatus = WorkflowRunnableStatus.INITIALIZE_QUEUE;
logger.nfo("workflowStatue changed to :{}", workflowRunnableStatus);
}
f (workflowRunnableStatus == WorkflowRunnableStatus.INITIALIZE_QUEUE) {
submtPostNode(null);
workflowRunnableStatus = WorkflowRunnableStatus.STARTED;
logger.nfo("workflowStatue changed to :{}", workflowRunnableStatus);
}
return WorkflowSubmtStatue.SUCCESS;
} catch (Excepton e) {
logger.error("Start workflow error", e);
return WorkflowSubmtStatue.FAILED;
} fnally {
LoggerUtls.removeWorkflowInstanceIdMDC();
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
/**
* process end handle
*/
publc vod endProcess() {
ths.stateEvents.clear();
f (processDefnton.getExecutonType().typeIsSeralWat() || processDefnton.getExecutonType().typeIsSeralProrty()) {
checkSeralProcess(processDefnton);
}
f (processInstance.getState().typeIsWatngThread()) {
processServce.createRecoveryWatngThreadCommand(null, processInstance);
}
f (processAlertManager.sNeedToSendWarnng(processInstance)) {
ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId());
processAlertManager.sendAlertProcessInstance(processInstance, getValdTaskLst(), projectUser);
}
f (checkTaskQueue()) {
processServce.releaseAllTaskGroup(processInstance.getId());
}
}
publc vod checkSeralProcess(ProcessDefnton processDefnton) {
nt nextInstanceId = processInstance.getNextProcessInstanceId();
f (nextInstanceId == 0) {
ProcessInstance nextProcessInstance =
ths.processServce.loadNextProcess4Seral(processInstance.getProcessDefnton().getCode(), ExecutonStatus.SERIAL_WAIT.getCode(), processInstance.getId());
f (nextProcessInstance == null) {
return;
}
ProcessInstance nextReadyStopProcessInstance = |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | ths.processServce.loadNextProcess4Seral(processInstance.getProcessDefnton().getCode(), ExecutonStatus.READY_STOP.getCode(), processInstance.getId());
f (processDefnton.getExecutonType().typeIsSeralProrty() && nextReadyStopProcessInstance != null) {
return;
}
nextInstanceId = nextProcessInstance.getId();
}
ProcessInstance nextProcessInstance = ths.processServce.fndProcessInstanceById(nextInstanceId);
f (nextProcessInstance.getState().typeIsFnshed() || nextProcessInstance.getState().typeIsRunnng()) {
return;
}
Map<Strng, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, nextInstanceId);
Command command = new Command();
command.setCommandType(CommandType.RECOVER_SERIAL_WAIT);
command.setProcessInstanceId(nextProcessInstance.getId());
command.setProcessDefntonCode(processDefnton.getCode());
command.setProcessDefntonVerson(processDefnton.getVerson());
command.setCommandParam(JSONUtls.toJsonStrng(cmdParam));
processServce.createCommand(command);
}
/**
* Generate process dag
*
* @throws Excepton excepton
*/
prvate vod buldFlowDag() throws Excepton {
processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(), processInstance.getProcessDefntonVerson());
processInstance.setProcessDefnton(processDefnton);
Lst<TaskInstance> recoverNodeLst = getRecoverTaskInstanceLst(processInstance.getCommandParam());
Lst<ProcessTaskRelaton> processTaskRelatons = processServce.fndRelatonByCode(processDefnton.getCode(), processDefnton.getVerson()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | Lst<TaskDefntonLog> taskDefntonLogs = processServce.getTaskDefneLogLstByRelaton(processTaskRelatons);
Lst<TaskNode> taskNodeLst = processServce.transformTask(processTaskRelatons, taskDefntonLogs);
forbddenTaskMap.clear();
taskNodeLst.forEach(taskNode -> {
f (taskNode.sForbdden()) {
forbddenTaskMap.put(taskNode.getCode(), taskNode);
}
});
Lst<Strng> recoveryNodeCodeLst = getRecoveryNodeCodeLst(recoverNodeLst);
Lst<Strng> startNodeNameLst = parseStartNodeName(processInstance.getCommandParam());
ProcessDag processDag = generateFlowDag(taskNodeLst, startNodeNameLst, recoveryNodeCodeLst, processInstance.getTaskDependType());
f (processDag == null) {
logger.error("processDag s null");
return;
}
dag = DagHelper.buldDagGraph(processDag);
logger.nfo("Buld dag success, dag: {}", dag);
}
/**
* nt task queue
*/
prvate vod ntTaskQueue() throws StateEventHandleExcepton, CronParseExcepton {
taskFaledSubmt = false;
actveTaskProcessorMaps.clear();
dependFaledTaskMap.clear();
completeTaskMap.clear();
errorTaskMap.clear();
f (!sNewProcessInstance()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | logger.nfo("The workflowInstance s not a newly runnng nstance, runtmes: {}, recover flag: {}",
processInstance.getRunTmes(),
processInstance.getRecovery());
Lst<TaskInstance> valdTaskInstanceLst =
processServce.fndValdTaskLstByProcessId(processInstance.getId());
for (TaskInstance task : valdTaskInstanceLst) {
try {
LoggerUtls.setWorkflowAndTaskInstanceIDMDC(task.getProcessInstanceId(), task.getId());
logger.nfo(
"Check the taskInstance from a exst workflowInstance, exstTaskInstanceCode: {}, taskInstanceStatus: {}",
task.getTaskCode(),
task.getState());
f (valdTaskMap.contansKey(task.getTaskCode())) {
nt oldTaskInstanceId = valdTaskMap.get(task.getTaskCode());
TaskInstance oldTaskInstance = taskInstanceMap.get(oldTaskInstanceId);
f (!oldTaskInstance.getState().typeIsFnshed() && task.getState().typeIsFnshed()) {
task.setFlag(Flag.NO);
processServce.updateTaskInstance(task);
contnue;
}
logger.warn("have same taskCode taskInstance when nt task queue, taskCode:{}",
task.getTaskCode());
}
valdTaskMap.put(task.getTaskCode(), task.getId());
taskInstanceMap.put(task.getId(), task);
f (task.sTaskComplete()) {
completeTaskMap.put(task.getTaskCode(), task.getId());
contnue;
}
f (task.sCondtonsTask() || DagHelper.haveCondtonsAfterNode(Long.toStrng(task.getTaskCode()), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | dag)) {
contnue;
}
f (task.taskCanRetry()) {
f (task.getState() == ExecutonStatus.NEED_FAULT_TOLERANCE) {
TaskInstance tolerantTaskInstance = cloneTolerantTaskInstance(task);
addTaskToStandByLst(tolerantTaskInstance);
} else {
retryTaskInstance(task);
}
contnue;
}
f (task.getState().typeIsFalure()) {
errorTaskMap.put(task.getTaskCode(), task.getId());
}
} fnally {
LoggerUtls.removeWorkflowAndTaskInstanceIdMDC();
}
}
} else {
logger.nfo("The current workflowInstance s a newly runnng workflowInstance");
}
f (processInstance.sComplementData() && complementLstDate.sEmpty()) {
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
f (cmdParam != null) {
setGlobalParamIfCommanded(processDefnton, cmdParam);
Date start = null;
Date end = null; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_START_DATE) && cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_END_DATE)) {
start = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE));
end = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE));
}
Lst<Schedule> schedules = processServce.queryReleaseSchedulerLstByProcessDefntonCode(processInstance.getProcessDefntonCode());
f (complementLstDate.sEmpty() && needComplementProcess()) {
f (start != null && end != null) {
complementLstDate = CronUtls.getSelfFreDateLst(start, end, schedules);
}
f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
complementLstDate = CronUtls.getSelfScheduleDateLst(cmdParam);
}
logger.nfo(" process defnton code:{} complement data: {}", processInstance.getProcessDefntonCode(), complementLstDate);
f (!complementLstDate.sEmpty() && Flag.NO == processInstance.getIsSubProcess()) {
processInstance.setScheduleTme(complementLstDate.get(0));
Strng globalParams = curngParamsServce.curngGlobalParams(processInstance.getId(),
processDefnton.getGlobalParamMap(),
processDefnton.getGlobalParamLst(),
CommandType.COMPLEMENT_DATA,
processInstance.getScheduleTme(),
cmdParam.get(Constants.SCHEDULE_TIMEZONE));
processInstance.setGlobalParams(globalParams);
processServce.updateProcessInstance(processInstance);
}
}
}
}
logger.nfo("Intalze task queue, dependFaledTaskMap: {}, completeTaskMap: {}, errorTaskMap: {}",
dependFaledTaskMap,
completeTaskMap, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | errorTaskMap);
}
/**
* submt task to execute
*
* @param taskInstance task nstance
* @return TaskInstance
*/
prvate Optonal<TaskInstance> submtTaskExec(TaskInstance taskInstance) {
try {
processServce.packageTaskInstance(taskInstance, processInstance);
ITaskProcessor taskProcessor = TaskProcessorFactory.getTaskProcessor(taskInstance.getTaskType());
taskProcessor.nt(taskInstance, processInstance);
f (taskInstance.getState() == ExecutonStatus.RUNNING_EXECUTION && taskProcessor.getType().equalsIgnoreCase(Constants.COMMON_TASK_TYPE)) {
notfyProcessHostUpdate(taskInstance);
}
boolean submt = taskProcessor.acton(TaskActon.SUBMIT);
f (!submt) {
logger.error("process d:{} name:{} submt standby task d:{} name:{} faled!",
processInstance.getId(),
processInstance.getName(),
taskInstance.getId(),
taskInstance.getName());
return Optonal.empty();
}
f (valdTaskMap.contansKey(taskInstance.getTaskCode())) {
nt oldTaskInstanceId = valdTaskMap.get(taskInstance.getTaskCode());
f (taskInstance.getId() != oldTaskInstanceId) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | TaskInstance oldTaskInstance = taskInstanceMap.get(oldTaskInstanceId);
oldTaskInstance.setFlag(Flag.NO);
processServce.updateTaskInstance(oldTaskInstance);
valdTaskMap.remove(taskInstance.getTaskCode());
actveTaskProcessorMaps.remove(taskInstance.getTaskCode());
}
}
valdTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
taskInstanceMap.put(taskInstance.getId(), taskInstance);
actveTaskProcessorMaps.put(taskInstance.getTaskCode(), taskProcessor);
boolean dspatchSuccess = taskProcessor.acton(TaskActon.DISPATCH);
f (!dspatchSuccess) {
logger.error("process d:{} name:{} dspatch standby task d:{} name:{} faled!",
processInstance.getId(),
processInstance.getName(),
taskInstance.getId(),
taskInstance.getName());
return Optonal.empty();
}
taskProcessor.acton(TaskActon.RUN);
stateWheelExecuteThread.addTask4TmeoutCheck(processInstance, taskInstance);
stateWheelExecuteThread.addTask4StateCheck(processInstance, taskInstance);
f (taskProcessor.taskInstance().getState().typeIsFnshed()) {
f (processInstance.sBlocked()) {
StateEvent processBlockEvent = new StateEvent();
processBlockEvent.setProcessInstanceId(ths.processInstance.getId());
processBlockEvent.setTaskInstanceId(taskInstance.getId());
processBlockEvent.setExecutonStatus(taskProcessor.taskInstance().getState());
processBlockEvent.setType(StateEventType.PROCESS_BLOCKED);
ths.stateEvents.add(processBlockEvent); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
StateEvent taskStateChangeEvent = new StateEvent();
taskStateChangeEvent.setProcessInstanceId(ths.processInstance.getId());
taskStateChangeEvent.setTaskInstanceId(taskInstance.getId());
taskStateChangeEvent.setExecutonStatus(taskProcessor.taskInstance().getState());
taskStateChangeEvent.setType(StateEventType.TASK_STATE_CHANGE);
ths.stateEvents.add(taskStateChangeEvent);
}
return Optonal.of(taskInstance);
} catch (Excepton e) {
logger.error("submt standby task error, taskCode: {}, taskInstanceId: {}",
taskInstance.getTaskCode(),
taskInstance.getId(),
e);
return Optonal.empty();
}
}
prvate vod notfyProcessHostUpdate(TaskInstance taskInstance) {
f (StrngUtls.sEmpty(taskInstance.getHost())) {
return;
}
try {
HostUpdateCommand hostUpdateCommand = new HostUpdateCommand();
hostUpdateCommand.setProcessHost(masterAddress);
hostUpdateCommand.setTaskInstanceId(taskInstance.getId());
Host host = new Host(taskInstance.getHost());
nettyExecutorManager.doExecute(host, hostUpdateCommand.convert2Command());
} catch (Excepton e) {
logger.error("notfy process host update", e); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
}
/**
* fnd task nstance n db.
* n case submt more than one same name task n the same tme.
*
* @param taskCode task code
* @param taskVerson task verson
* @return TaskInstance
*/
prvate TaskInstance fndTaskIfExsts(Long taskCode, nt taskVerson) {
Lst<TaskInstance> valdTaskInstanceLst = getValdTaskLst();
for (TaskInstance taskInstance : valdTaskInstanceLst) {
f (taskInstance.getTaskCode() == taskCode && taskInstance.getTaskDefntonVerson() == taskVerson) {
return taskInstance;
}
}
return null;
}
/**
* encapsulaton task, ths method wll only create a new task nstance, the return task nstance wll not contan d.
*
* @param processInstance process nstance
* @param taskNode taskNode
* @return TaskInstance
*/
prvate TaskInstance createTaskInstance(ProcessInstance processInstance, TaskNode taskNode) {
TaskInstance taskInstance = fndTaskIfExsts(taskNode.getCode(), taskNode.getVerson());
f (taskInstance != null) {
return taskInstance; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
return newTaskInstance(processInstance, taskNode);
}
/**
* clone a new taskInstance for retry and reset some logc felds
*
* @return
*/
publc TaskInstance cloneRetryTaskInstance(TaskInstance taskInstance) {
TaskNode taskNode = dag.getNode(Long.toStrng(taskInstance.getTaskCode()));
f (taskNode == null) {
logger.error("taskNode s null, code:{}", taskInstance.getTaskCode());
return null;
}
TaskInstance newTaskInstance = newTaskInstance(processInstance, taskNode);
newTaskInstance.setTaskDefne(taskInstance.getTaskDefne());
newTaskInstance.setProcessDefne(taskInstance.getProcessDefne());
newTaskInstance.setProcessInstance(processInstance);
newTaskInstance.setRetryTmes(taskInstance.getRetryTmes() + 1);
newTaskInstance.setState(taskInstance.getState());
newTaskInstance.setEndTme(taskInstance.getEndTme());
return newTaskInstance;
}
/**
* clone a new taskInstance for tolerant and reset some logc felds
*
* @return
*/
publc TaskInstance cloneTolerantTaskInstance(TaskInstance taskInstance) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | TaskNode taskNode = dag.getNode(Long.toStrng(taskInstance.getTaskCode()));
f (taskNode == null) {
logger.error("taskNode s null, code:{}", taskInstance.getTaskCode());
return null;
}
TaskInstance newTaskInstance = newTaskInstance(processInstance, taskNode);
newTaskInstance.setTaskDefne(taskInstance.getTaskDefne());
newTaskInstance.setProcessDefne(taskInstance.getProcessDefne());
newTaskInstance.setProcessInstance(processInstance);
newTaskInstance.setRetryTmes(taskInstance.getRetryTmes());
newTaskInstance.setState(taskInstance.getState());
return newTaskInstance;
}
/**
* new a taskInstance
*
* @param processInstance
* @param taskNode
* @return
*/
publc TaskInstance newTaskInstance(ProcessInstance processInstance, TaskNode taskNode) {
TaskInstance taskInstance = new TaskInstance();
taskInstance.setTaskCode(taskNode.getCode());
taskInstance.setTaskDefntonVerson(taskNode.getVerson());
taskInstance.setName(taskNode.getName());
taskInstance.setState(ExecutonStatus.SUBMITTED_SUCCESS);
taskInstance.setProcessInstanceId(processInstance.getId()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | taskInstance.setTaskType(taskNode.getType().toUpperCase());
taskInstance.setAlertFlag(Flag.NO);
taskInstance.setStartTme(null);
taskInstance.setFlag(Flag.YES);
taskInstance.setDryRun(processInstance.getDryRun());
taskInstance.setRetryTmes(0);
taskInstance.setMaxRetryTmes(taskNode.getMaxRetryTmes());
taskInstance.setRetryInterval(taskNode.getRetryInterval());
taskInstance.setTaskParams(taskNode.getTaskParams());
taskInstance.setTaskGroupId(taskNode.getTaskGroupId());
taskInstance.setTaskGroupProrty(taskNode.getTaskGroupProrty());
taskInstance.setCpuQuota(taskNode.getCpuQuota());
taskInstance.setMemoryMax(taskNode.getMemoryMax());
f (taskNode.getTaskInstanceProrty() == null) {
taskInstance.setTaskInstanceProrty(Prorty.MEDIUM);
} else {
taskInstance.setTaskInstanceProrty(taskNode.getTaskInstanceProrty());
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | Strng processWorkerGroup = processInstance.getWorkerGroup();
processWorkerGroup = StrngUtls.sBlank(processWorkerGroup) ? DEFAULT_WORKER_GROUP : processWorkerGroup;
Strng taskWorkerGroup = StrngUtls.sBlank(taskNode.getWorkerGroup()) ? processWorkerGroup : taskNode.getWorkerGroup();
Long processEnvronmentCode = Objects.sNull(processInstance.getEnvronmentCode()) ? -1 : processInstance.getEnvronmentCode();
Long taskEnvronmentCode = Objects.sNull(taskNode.getEnvronmentCode()) ? processEnvronmentCode : taskNode.getEnvronmentCode();
f (!processWorkerGroup.equals(DEFAULT_WORKER_GROUP) && taskWorkerGroup.equals(DEFAULT_WORKER_GROUP)) {
taskInstance.setWorkerGroup(processWorkerGroup);
taskInstance.setEnvronmentCode(processEnvronmentCode);
} else {
taskInstance.setWorkerGroup(taskWorkerGroup);
taskInstance.setEnvronmentCode(taskEnvronmentCode);
}
f (!taskInstance.getEnvronmentCode().equals(-1L)) {
Envronment envronment = processServce.fndEnvronmentByCode(taskInstance.getEnvronmentCode());
f (Objects.nonNull(envronment) && StrngUtls.sNotEmpty(envronment.getConfg())) {
taskInstance.setEnvronmentConfg(envronment.getConfg());
}
}
taskInstance.setDelayTme(taskNode.getDelayTme());
return taskInstance;
}
publc vod getPreVarPool(TaskInstance taskInstance, Set<Strng> preTask) {
Map<Strng, Property> allProperty = new HashMap<>();
Map<Strng, TaskInstance> allTaskInstance = new HashMap<>();
f (CollectonUtls.sNotEmpty(preTask)) {
for (Strng preTaskCode : preTask) {
Integer taskId = completeTaskMap.get(Long.parseLong(preTaskCode));
f (taskId == null) {
contnue; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
TaskInstance preTaskInstance = taskInstanceMap.get(taskId);
f (preTaskInstance == null) {
contnue;
}
Strng preVarPool = preTaskInstance.getVarPool();
f (StrngUtls.sNotEmpty(preVarPool)) {
Lst<Property> propertes = JSONUtls.toLst(preVarPool, Property.class);
for (Property nfo : propertes) {
setVarPoolValue(allProperty, allTaskInstance, preTaskInstance, nfo);
}
}
}
f (allProperty.sze() > 0) {
taskInstance.setVarPool(JSONUtls.toJsonStrng(allProperty.values()));
}
} else {
f (StrngUtls.sNotEmpty(processInstance.getVarPool())) {
taskInstance.setVarPool(processInstance.getVarPool());
}
}
}
publc Collecton<TaskInstance> getAllTaskInstances() {
return taskInstanceMap.values();
}
prvate vod setVarPoolValue(Map<Strng, Property> allProperty, Map<Strng, TaskInstance> allTaskInstance, TaskInstance preTaskInstance, Property thsProperty) {
thsProperty.setDrect(Drect.IN);
Strng proName = thsProperty.getProp(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | f (allProperty.contansKey(proName)) {
Property otherPro = allProperty.get(proName);
f (StrngUtls.sEmpty(thsProperty.getValue())) {
allProperty.put(proName, otherPro);
} else f (StrngUtls.sNotEmpty(otherPro.getValue())) {
TaskInstance otherTask = allTaskInstance.get(proName);
f (otherTask.getEndTme().getTme() > preTaskInstance.getEndTme().getTme()) {
allProperty.put(proName, thsProperty);
allTaskInstance.put(proName, preTaskInstance);
} else {
allProperty.put(proName, otherPro);
}
} else {
allProperty.put(proName, thsProperty);
allTaskInstance.put(proName, preTaskInstance);
}
} else {
allProperty.put(proName, thsProperty);
allTaskInstance.put(proName, preTaskInstance);
}
}
/**
* get complete task nstance map, taskCode as key
*/
prvate Map<Strng, TaskInstance> getCompleteTaskInstanceMap() {
Map<Strng, TaskInstance> completeTaskInstanceMap = new HashMap<>(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | for (Map.Entry<Long, Integer> entry : completeTaskMap.entrySet()) {
Long taskConde = entry.getKey();
Integer taskInstanceId = entry.getValue();
TaskInstance taskInstance = taskInstanceMap.get(taskInstanceId);
f (taskInstance == null) {
logger.warn("Cannot fnd the taskInstance from taskInstanceMap, taskInstanceId: {}, taskConde: {}",
taskInstanceId,
taskConde);
contnue;
}
completeTaskInstanceMap.put(Long.toStrng(taskInstance.getTaskCode()), taskInstance);
}
return completeTaskInstanceMap;
}
/**
* get vald task lst
*/
prvate Lst<TaskInstance> getValdTaskLst() {
Lst<TaskInstance> valdTaskInstanceLst = new ArrayLst<>();
for (Integer taskInstanceId : valdTaskMap.values()) {
valdTaskInstanceLst.add(taskInstanceMap.get(taskInstanceId));
}
return valdTaskInstanceLst;
}
prvate vod submtPostNode(Strng parentNodeCode) throws StateEventHandleExcepton {
Set<Strng> submtTaskNodeLst =
DagHelper.parsePostNodes(parentNodeCode, skpTaskNodeMap, dag, getCompleteTaskInstanceMap());
Lst<TaskInstance> taskInstances = new ArrayLst<>();
for (Strng taskNode : submtTaskNodeLst) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | TaskNode taskNodeObject = dag.getNode(taskNode);
Optonal<TaskInstance> exstTaskInstanceOptonal = getTaskInstance(taskNodeObject.getCode());
f (exstTaskInstanceOptonal.sPresent()) {
taskInstances.add(exstTaskInstanceOptonal.get());
contnue;
}
TaskInstance task = createTaskInstance(processInstance, taskNodeObject);
taskInstances.add(task);
}
f (StrngUtls.sNotEmpty(parentNodeCode) && dag.getEndNode().contans(parentNodeCode)) {
TaskInstance endTaskInstance = taskInstanceMap.get(completeTaskMap.get(NumberUtls.toLong(parentNodeCode)));
Strng taskInstanceVarPool = endTaskInstance.getVarPool();
f (StrngUtls.sNotEmpty(taskInstanceVarPool)) {
Set<Property> taskPropertes = new HashSet<>(JSONUtls.toLst(taskInstanceVarPool, Property.class));
Strng processInstanceVarPool = processInstance.getVarPool();
f (StrngUtls.sNotEmpty(processInstanceVarPool)) {
Set<Property> propertes = new HashSet<>(JSONUtls.toLst(processInstanceVarPool, Property.class));
propertes.addAll(taskPropertes);
processInstance.setVarPool(JSONUtls.toJsonStrng(propertes));
} else {
processInstance.setVarPool(JSONUtls.toJsonStrng(taskPropertes));
}
}
}
for (TaskInstance task : taskInstances) {
f (readyToSubmtTaskQueue.contans(task)) {
logger.warn("Task s already at submt queue, taskInstanceId: {}", task.getId());
contnue; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
f (task.getId() > 0 && completeTaskMap.contansKey(task.getTaskCode())) {
logger.nfo("task {} has already run success", task.getName());
contnue;
}
f (task.getState().typeIsPause() || task.getState().typeIsCancel()) {
logger.nfo("task {} stopped, the state s {}", task.getName(), task.getState());
contnue;
}
addTaskToStandByLst(task);
}
submtStandByTask();
updateProcessInstanceState();
}
/**
* determne whether the dependences of the task node are complete
*
* @return DependResult
*/
prvate DependResult sTaskDepsComplete(Strng taskCode) {
Collecton<Strng> startNodes = dag.getBegnNode();
f (startNodes.contans(taskCode)) {
return DependResult.SUCCESS;
}
TaskNode taskNode = dag.getNode(taskCode);
Lst<Strng> ndrectDepCodeLst = new ArrayLst<>();
setIndrectDepLst(taskCode, ndrectDepCodeLst);
for (Strng depsNode : ndrectDepCodeLst) {
f (dag.contansNode(depsNode) && !skpTaskNodeMap.contansKey(depsNode)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | Long despNodeTaskCode = Long.parseLong(depsNode);
f (!completeTaskMap.contansKey(despNodeTaskCode)) {
return DependResult.WAITING;
}
Integer depsTaskId = completeTaskMap.get(despNodeTaskCode);
ExecutonStatus depTaskState = taskInstanceMap.get(depsTaskId).getState();
f (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) {
return DependResult.NON_EXEC;
}
f (taskNode.sBlockngTask()) {
contnue;
}
f (taskNode.sCondtonsTask()) {
contnue;
}
f (!dependTaskSuccess(depsNode, taskCode)) {
return DependResult.FAILED;
}
}
}
logger.nfo("taskCode: {} completeDependTaskLst: {}", taskCode, Arrays.toStrng(completeTaskMap.keySet().toArray()));
return DependResult.SUCCESS;
}
/**
* Ths functon s specally used to handle the dependency stuaton where the parent node s a prohbted node.
* When the parent node s a forbdden node, the dependency relatonshp should contnue to be traced
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | * @param taskCode taskCode
* @param ndrectDepCodeLst All ndrectly dependent nodes
*/
prvate vod setIndrectDepLst(Strng taskCode, Lst<Strng> ndrectDepCodeLst) {
TaskNode taskNode = dag.getNode(taskCode);
Lst<Strng> depCodeLst = taskNode.getDepLst();
for (Strng depsNode : depCodeLst) {
f (forbddenTaskMap.contansKey(Long.parseLong(depsNode))) {
setIndrectDepLst(depsNode, ndrectDepCodeLst);
} else {
ndrectDepCodeLst.add(depsNode);
}
}
}
/**
* depend node s completed, but here need check the condton task branch s the next node
*/
prvate boolean dependTaskSuccess(Strng dependNodeName, Strng nextNodeName) {
f (dag.getNode(dependNodeName).sCondtonsTask()) {
Lst<Strng> nextTaskLst = DagHelper.parseCondtonTask(dependNodeName, skpTaskNodeMap, dag, getCompleteTaskInstanceMap());
f (!nextTaskLst.contans(nextNodeName)) {
return false;
}
} else {
long taskCode = Long.parseLong(dependNodeName);
Integer taskInstanceId = completeTaskMap.get(taskCode);
ExecutonStatus depTaskState = taskInstanceMap.get(taskInstanceId).getState();
f (depTaskState.typeIsFalure()) {
return false; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
}
return true;
}
/**
* query task nstance by complete state
*
* @param state state
* @return task nstance lst
*/
prvate Lst<TaskInstance> getCompleteTaskByState(ExecutonStatus state) {
Lst<TaskInstance> resultLst = new ArrayLst<>();
for (Integer taskInstanceId : completeTaskMap.values()) {
TaskInstance taskInstance = taskInstanceMap.get(taskInstanceId);
f (taskInstance != null && taskInstance.getState() == state) {
resultLst.add(taskInstance);
}
}
return resultLst;
}
/**
* where there are ongong tasks
*
* @param state state
* @return ExecutonStatus
*/
prvate ExecutonStatus runnngState(ExecutonStatus state) {
f (state == ExecutonStatus.READY_STOP || state == ExecutonStatus.READY_PAUSE || state == ExecutonStatus.WAITING_THREAD || state == ExecutonStatus.READY_BLOCK ||
state == ExecutonStatus.DELAY_EXECUTION) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | return state;
} else {
return ExecutonStatus.RUNNING_EXECUTION;
}
}
/**
* exsts falure task,contans submt falure、dependency falure,execute falure(retry after)
*
* @return Boolean whether has faled task
*/
prvate boolean hasFaledTask() {
f (ths.taskFaledSubmt) {
return true;
}
f (ths.errorTaskMap.sze() > 0) {
return true;
}
return ths.dependFaledTaskMap.sze() > 0;
}
/**
* process nstance falure
*
* @return Boolean whether process nstance faled
*/
prvate boolean processFaled() {
f (hasFaledTask()) {
logger.nfo("The current process has faled task, the current process faled");
f (processInstance.getFalureStrategy() == FalureStrategy.END) {
return true;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | f (processInstance.getFalureStrategy() == FalureStrategy.CONTINUE) {
return readyToSubmtTaskQueue.sze() == 0 && actveTaskProcessorMaps.sze() == 0 && watToRetryTaskInstanceMap.sze() == 0;
}
}
return false;
}
/**
* whether task for watng thread
*
* @return Boolean whether has watng thread task
*/
prvate boolean hasWatngThreadTask() {
Lst<TaskInstance> watngLst = getCompleteTaskByState(ExecutonStatus.WAITING_THREAD);
return CollectonUtls.sNotEmpty(watngLst);
}
/**
* prepare for pause
* 1,faled retry task n the preparaton queue , returns to falure drectly
* 2,exsts pause task,complement not completed, pendng submsson of tasks, return to suspenson
* 3,success
*
* @return ExecutonStatus
*/
prvate ExecutonStatus processReadyPause() {
f (hasRetryTaskInStandBy()) {
return ExecutonStatus.FAILURE;
}
Lst<TaskInstance> pauseLst = getCompleteTaskByState(ExecutonStatus.PAUSE);
f (CollectonUtls.sNotEmpty(pauseLst) || processInstance.sBlocked() || !sComplementEnd() || readyToSubmtTaskQueue.sze() > 0) {
return ExecutonStatus.PAUSE; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | } else {
return ExecutonStatus.SUCCESS;
}
}
/**
* prepare for block
* f process has tasks stll runnng, pause them
* f readyToSubmtTaskQueue s not empty, kll them
* else return block status drectly
*
* @return ExecutonStatus
*/
prvate ExecutonStatus processReadyBlock() {
f (actveTaskProcessorMaps.sze() > 0) {
for (ITaskProcessor taskProcessor : actveTaskProcessorMaps.values()) {
f (!TASK_TYPE_BLOCKING.equals(taskProcessor.getType())) {
taskProcessor.acton(TaskActon.PAUSE);
}
}
}
f (readyToSubmtTaskQueue.sze() > 0) {
for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) {
ter.next().setState(ExecutonStatus.KILL);
}
}
return ExecutonStatus.BLOCK;
}
/**
* generate the latest process nstance status by the tasks state
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | * @return process nstance executon status
*/
prvate ExecutonStatus getProcessInstanceState(ProcessInstance nstance) {
ExecutonStatus state = nstance.getState();
f (actveTaskProcessorMaps.sze() > 0 || hasRetryTaskInStandBy()) {
// actve
ExecutonStatus executonStatus = runnngState(state);
logger.nfo("The workflowInstance has task runnng, the workflowInstance status s {}", executonStatus);
return executonStatus;
}
// block
f (state == ExecutonStatus.READY_BLOCK) {
ExecutonStatus executonStatus = processReadyBlock();
logger.nfo("The workflowInstance s ready to block, the workflowInstance status s {}", executonStatus);
}
// watng thread
f (hasWatngThreadTask()) {
logger.nfo("The workflowInstance has watng thread task, the workflow status s {}",
ExecutonStatus.WAITING_THREAD);
return ExecutonStatus.WAITING_THREAD;
}
// pause
f (state == ExecutonStatus.READY_PAUSE) {
ExecutonStatus executonStatus = processReadyPause();
logger.nfo("The workflowInstance s ready to pause, the workflow status s {}", executonStatus);
return executonStatus;
}
// stop
f (state == ExecutonStatus.READY_STOP) {
Lst<TaskInstance> stopLst = getCompleteTaskByState(ExecutonStatus.STOP); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | Lst<TaskInstance> kllLst = getCompleteTaskByState(ExecutonStatus.KILL);
Lst<TaskInstance> falLst = getCompleteTaskByState(ExecutonStatus.FAILURE);
ExecutonStatus executonStatus;
f (CollectonUtls.sNotEmpty(stopLst) || CollectonUtls.sNotEmpty(kllLst) || CollectonUtls.sNotEmpty(falLst) || !sComplementEnd()) {
executonStatus = ExecutonStatus.STOP;
} else {
executonStatus = ExecutonStatus.SUCCESS;
}
logger.nfo("The workflowInstance s ready to stop, the workflow status s {}", executonStatus);
}
// process falure
f (processFaled()) {
logger.nfo("The workflowInstance s faled, the workflow status s {}", ExecutonStatus.FAILURE);
return ExecutonStatus.FAILURE;
}
// success
f (state == ExecutonStatus.RUNNING_EXECUTION) {
Lst<TaskInstance> kllTasks = getCompleteTaskByState(ExecutonStatus.KILL);
f (readyToSubmtTaskQueue.sze() > 0 || watToRetryTaskInstanceMap.sze() > 0) {
//tasks cu
return ExecutonStatus.RUNNING_EXECUTION;
} else f (CollectonUtls.sNotEmpty(kllTasks)) {
// tasks m
return ExecutonStatus.FAILURE;
} else {
// f the
return ExecutonStatus.SUCCESS;
}
}
return state; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
/**
* whether complement end
*
* @return Boolean whether s complement end
*/
prvate boolean sComplementEnd() {
f (!processInstance.sComplementData()) {
return true;
}
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
Date endTme = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE));
return processInstance.getScheduleTme().equals(endTme);
}
/**
* updateProcessInstance process nstance state
* after each batch of tasks s executed, of the process nstance s updated
*/
prvate vod updateProcessInstanceState() throws StateEventHandleExcepton {
ExecutonStatus state = getProcessInstanceState(processInstance);
f (processInstance.getState() != state) {
logger.nfo("Update workflowInstance states, orgn state: {}, target state: {}",
processInstance.getState(),
state);
updateWorkflowInstanceStatesToDB(state);
StateEvent stateEvent = new StateEvent();
stateEvent.setExecutonStatus(processInstance.getState());
stateEvent.setProcessInstanceId(ths.processInstance.getId());
stateEvent.setType(StateEventType.PROCESS_STATE_CHANGE);
// replace |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | ths.stateEvents.add(stateEvent);
} else {
logger.nfo("There s no need to update the workflow nstance state, orgn state: {}, target state: {}",
processInstance.getState(),
state);
}
}
/**
* stateEvent's executon status as process nstance state
*/
publc vod updateProcessInstanceState(StateEvent stateEvent) throws StateEventHandleExcepton {
ExecutonStatus state = stateEvent.getExecutonStatus();
updateWorkflowInstanceStatesToDB(state);
}
prvate vod updateWorkflowInstanceStatesToDB(ExecutonStatus newStates) throws StateEventHandleExcepton {
ExecutonStatus orgnStates = processInstance.getState();
f (orgnStates != newStates) {
logger.nfo("Begn to update workflow nstance state , state wll change from {} to {}",
orgnStates,
newStates);
processInstance.setState(newStates);
f (newStates.typeIsFnshed()) {
processInstance.setEndTme(new Date());
}
try {
processServce.updateProcessInstance(processInstance);
} catch (Excepton ex) {
// recover
processInstance.setState(orgnStates);
processInstance.setEndTme(null); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | throw new StateEventHandleExcepton("Update process nstance status to DB error", ex);
}
}
}
/**
* get task dependency result
*
* @param taskInstance task nstance
* @return DependResult
*/
prvate DependResult getDependResultForTask(TaskInstance taskInstance) {
return sTaskDepsComplete(Long.toStrng(taskInstance.getTaskCode()));
}
/**
* add task to standby lst
*
* @param taskInstance task nstance
*/
publc vod addTaskToStandByLst(TaskInstance taskInstance) {
f (readyToSubmtTaskQueue.contans(taskInstance)) {
logger.warn("task was found n ready submt queue, task code:{}", taskInstance.getTaskCode());
return;
}
logger.nfo("add task to stand by lst, task name:{}, task d:{}, task code:{}",
taskInstance.getName(),
taskInstance.getId(),
taskInstance.getTaskCode());
TaskMetrcs.ncTaskSubmt();
readyToSubmtTaskQueue.put(taskInstance);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | /**
* remove task from stand by lst
*
* @param taskInstance task nstance
*/
prvate boolean removeTaskFromStandbyLst(TaskInstance taskInstance) {
return readyToSubmtTaskQueue.remove(taskInstance);
}
/**
* has retry task n standby
*
* @return Boolean whether has retry task n standby
*/
prvate boolean hasRetryTaskInStandBy() {
for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) {
f (ter.next().getState().typeIsFalure()) {
return true;
}
}
return false;
}
/**
* close the on gong tasks
*/
publc vod kllAllTasks() {
logger.nfo("kll called on process nstance d: {}, num: {}",
processInstance.getId(),
actveTaskProcessorMaps.sze());
f (readyToSubmtTaskQueue.sze() > 0) {
readyToSubmtTaskQueue.clear(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | }
for (long taskCode : actveTaskProcessorMaps.keySet()) {
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskCode);
Integer taskInstanceId = valdTaskMap.get(taskCode);
f (taskInstanceId == null || taskInstanceId.equals(0)) {
contnue;
}
TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId);
f (taskInstance == null || taskInstance.getState().typeIsFnshed()) {
contnue;
}
taskProcessor.acton(TaskActon.STOP);
f (taskProcessor.taskInstance().getState().typeIsFnshed()) {
StateEvent stateEvent = new StateEvent();
stateEvent.setType(StateEventType.TASK_STATE_CHANGE);
stateEvent.setProcessInstanceId(ths.processInstance.getId());
stateEvent.setTaskInstanceId(taskInstance.getId());
stateEvent.setExecutonStatus(taskProcessor.taskInstance().getState());
ths.addStateEvent(stateEvent);
}
}
}
publc boolean workFlowFnsh() {
return ths.processInstance.getState().typeIsFnshed();
}
/**
* handlng the lst of tasks to be submtted
*/
publc vod submtStandByTask() throws StateEventHandleExcepton {
nt length = readyToSubmtTaskQueue.sze(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | for (nt = 0; < length; ++) {
TaskInstance task = readyToSubmtTaskQueue.peek();
f (task == null) {
contnue;
}
// stop ta
f (task.taskCanRetry()) {
TaskInstance retryTask = processServce.fndTaskInstanceById(task.getId());
f (retryTask != null && retryTask.getState().equals(ExecutonStatus.FORCED_SUCCESS)) {
task.setState(retryTask.getState());
logger.nfo("task: {} has been forced success, put t nto complete task lst and stop retryng", task.getName());
removeTaskFromStandbyLst(task);
completeTaskMap.put(task.getTaskCode(), task.getId());
taskInstanceMap.put(task.getId(), task);
submtPostNode(Long.toStrng(task.getTaskCode()));
contnue;
}
}
//nt var
f (task.sFrstRun()) {
//get pre
Set<Strng> preTask = dag.getPrevousNodes(Long.toStrng(task.getTaskCode()));
getPreVarPool(task, preTask);
}
DependResult dependResult = getDependResultForTask(task);
f (DependResult.SUCCESS == dependResult) {
Optonal<TaskInstance> taskInstanceOptonal = submtTaskExec(task);
f (!taskInstanceOptonal.sPresent()) {
ths.taskFaledSubmt = true;
// Remove |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | f (!removeTaskFromStandbyLst(task)) {
logger.error(
"Task submt faled, remove from standby lst faled, workflowInstanceId: {}, taskCode: {}",
processInstance.getId(),
task.getTaskCode());
}
completeTaskMap.put(task.getTaskCode(), task.getId());
taskInstanceMap.put(task.getId(), task);
errorTaskMap.put(task.getTaskCode(), task.getId());
actveTaskProcessorMaps.remove(task.getTaskCode());
logger.error("Task submtted faled, workflowInstanceId: {}, taskInstanceId: {}, taskCode: {}",
task.getProcessInstanceId(),
task.getId(),
task.getTaskCode());
} else {
removeTaskFromStandbyLst(task);
}
} else f (DependResult.FAILED == dependResult) {
// f the
dependFaledTaskMap.put(task.getTaskCode(), task.getId());
removeTaskFromStandbyLst(task);
logger.nfo("Task dependent result s faled, taskInstanceId:{} depend result : {}", task.getId(), dependResult);
} else f (DependResult.NON_EXEC == dependResult) {
// for som
removeTaskFromStandbyLst(task);
logger.nfo("Remove task due to depend result not executed, taskInstanceId:{} depend result : {}", task.getId(), dependResult);
}
}
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | * Get start task nstance lst from recover
*
* @param cmdParam command param
* @return task nstance lst
*/
protected Lst<TaskInstance> getRecoverTaskInstanceLst(Strng cmdParam) {
Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam);
// todo: Can we use a better way to set the recover taskInstanceId lst? rather then use the cmdParam
f (paramMap != null && paramMap.contansKey(CMD_PARAM_RECOVERY_START_NODE_STRING)) {
Strng[] dLst = paramMap.get(CMD_PARAM_RECOVERY_START_NODE_STRING).splt(Constants.COMMA);
f (ArrayUtls.sNotEmpty(dLst)) {
Lst<Integer> taskInstanceIds = Arrays.stream(dLst).map(Integer::valueOf).collect(Collectors.toLst());
return processServce.fndTaskInstanceByIdLst(taskInstanceIds);
}
}
return Collectons.emptyLst();
}
/**
* parse "StartNodeNameLst" from cmd param
*
* @param cmdParam command param
* @return start node name lst
*/
prvate Lst<Strng> parseStartNodeName(Strng cmdParam) {
Lst<Strng> startNodeNameLst = new ArrayLst<>();
Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam);
f (paramMap == null) {
return startNodeNameLst;
}
f (paramMap.contansKey(CMD_PARAM_START_NODES)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | startNodeNameLst = Arrays.asLst(paramMap.get(CMD_PARAM_START_NODES).splt(Constants.COMMA));
}
return startNodeNameLst;
}
/**
* generate start node code lst from parsng command param;
* f "StartNodeIdLst" exsts n command param, return StartNodeIdLst
*
* @return recovery node code lst
*/
prvate Lst<Strng> getRecoveryNodeCodeLst(Lst<TaskInstance> recoverNodeLst) {
Lst<Strng> recoveryNodeCodeLst = new ArrayLst<>();
f (CollectonUtls.sNotEmpty(recoverNodeLst)) {
for (TaskInstance task : recoverNodeLst) {
recoveryNodeCodeLst.add(Long.toStrng(task.getTaskCode()));
}
}
return recoveryNodeCodeLst;
}
/**
* generate flow dag
*
* @param totalTaskNodeLst total task node lst
* @param startNodeNameLst start node name lst
* @param recoveryNodeCodeLst recovery node code lst
* @param depNodeType depend node type
* @return ProcessDag process dag
* @throws Excepton excepton
*/
publc ProcessDag generateFlowDag(Lst<TaskNode> totalTaskNodeLst, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | Lst<Strng> startNodeNameLst,
Lst<Strng> recoveryNodeCodeLst,
TaskDependType depNodeType) throws Excepton {
return DagHelper.generateFlowDag(totalTaskNodeLst, startNodeNameLst, recoveryNodeCodeLst, depNodeType);
}
/**
* check task queue
*/
prvate boolean checkTaskQueue() {
AtomcBoolean result = new AtomcBoolean(false);
taskInstanceMap.forEach((d, taskInstance) -> {
f (taskInstance != null && taskInstance.getTaskGroupId() > 0) {
result.set(true);
}
});
return result.get();
}
/**
* s new process nstance
*/
prvate boolean sNewProcessInstance() {
f (Flag.YES.equals(processInstance.getRecovery())) {
logger.nfo("Ths workInstance wll be recover by ths executon");
return false;
}
f (ExecutonStatus.RUNNING_EXECUTION == processInstance.getState() && processInstance.getRunTmes() == 1) {
return true;
}
logger.nfo(
"The workflowInstance has been executed before, ths executon s to reRun, processInstance status: {}, runTmes: {}", |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | processInstance.getState(),
processInstance.getRunTmes());
return false;
}
publc vod resubmt(long taskCode) throws Excepton {
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskCode);
f (taskProcessor != null) {
taskProcessor.acton(TaskActon.RESUBMIT);
logger.debug("RESUBMIT: task code:{}", taskCode);
} else {
throw new Excepton("resubmt error, taskProcessor s null, task code: " + taskCode);
}
}
publc Map<Long, Integer> getCompleteTaskMap() {
return completeTaskMap;
}
publc Map<Long, ITaskProcessor> getActveTaskProcessMap() {
return actveTaskProcessorMaps;
}
publc Map<Long, TaskInstance> getWatToRetryTaskInstanceMap() {
return watToRetryTaskInstanceMap;
}
prvate vod setGlobalParamIfCommanded(ProcessDefnton processDefnton, Map<Strng, Strng> cmdParam) {
// get start params from command param
Map<Strng, Strng> startParamMap = new HashMap<>();
f (cmdParam.contansKey(Constants.CMD_PARAM_START_PARAMS)) {
Strng startParamJson = cmdParam.get(Constants.CMD_PARAM_START_PARAMS);
startParamMap = JSONUtls.toMap(startParamJson);
}
Map<Strng, Strng> fatherParamMap = new HashMap<>(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,909 | [Bug] Stop process instance state is incorrect. | ### 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
Stop process instance state is incorrect.
### What you expected to happen
process instance state is correct.
### How to reproduce
Execute a process instance and stop it.
### Anything else
No
### 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/10909 | https://github.com/apache/dolphinscheduler/pull/10922 | 2d7a48b0f059136e160f0a986265d02432701c66 | 9f34a837b8ff068dcc516cf68b140c1c2a3e3381 | 2022-07-12T11:07:21Z | java | 2022-07-13T12:45:52Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java | f (cmdParam.contansKey(Constants.CMD_PARAM_FATHER_PARAMS)) {
Strng fatherParamJson = cmdParam.get(Constants.CMD_PARAM_FATHER_PARAMS);
fatherParamMap = JSONUtls.toMap(fatherParamJson);
}
startParamMap.putAll(fatherParamMap);
// set start param nto global params
Map<Strng, Strng> globalMap = processDefnton.getGlobalParamMap();
Lst<Property> globalParamLst = processDefnton.getGlobalParamLst();
f (startParamMap.sze() > 0 && globalMap != null) {
//start pa
for (Map.Entry<Strng, Strng> param : globalMap.entrySet()) {
Strng val = startParamMap.get(param.getKey());
f (val != null) {
param.setValue(val);
}
}
//start pa
for (Map.Entry<Strng, Strng> startParam : startParamMap.entrySet()) {
f (!globalMap.contansKey(startParam.getKey())) {
globalMap.put(startParam.getKey(), startParam.getValue());
globalParamLst.add(new Property(startParam.getKey(), IN, VARCHAR, startParam.getValue()));
}
}
}
}
prvate enum WorkflowRunnableStatus {
CREATED, INITIALIZE_DAG, INITIALIZE_QUEUE, STARTED,
;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.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. |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | * See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.api.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.service.TaskGroupQueueService;
import org.apache.dolphinscheduler.api.service.TaskGroupService;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.AuthorizationType;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.dao.entity.TaskGroup;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper;
import org.apache.dolphinscheduler.service.process.ProcessService;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* task Group Service
*/
@Service
public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupService {
@Autowired
private TaskGroupMapper taskGroupMapper;
@Autowired
private TaskGroupQueueService taskGroupQueueService;
@Autowired
private ProcessService processService;
@Autowired
private ExecutorService executorService;
private static final Logger logger = LoggerFactory.getLogger(TaskGroupServiceImpl.class);
/**
* create a Task group
*
* @param loginUser login user
* @param name task group name
* @param description task group description
* @param groupSize task group total size
* @return the result code and msg
*/
@Override
@Transactional
public Map<String, Object> createTaskGroup(User loginUser, Long projectCode, String name, String description, int groupSize) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | Map<String, Object> result = new HashMap<>();
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_CREATE);
if (!canOperatorPermissions){
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
return result;
}
if (name == null) {
putMsg(result, Status.NAME_NULL);
return result;
}
if (groupSize <= 0) {
putMsg(result, Status.TASK_GROUP_SIZE_ERROR);
return result;
}
TaskGroup taskGroup1 = taskGroupMapper.queryByName(loginUser.getId(), name);
if (taskGroup1 != null) {
putMsg(result, Status.TASK_GROUP_NAME_EXSIT);
return result;
}
TaskGroup taskGroup = new TaskGroup(name, projectCode, description,
groupSize, loginUser.getId(), Flag.YES.getCode());
taskGroup.setCreateTime(new Date());
taskGroup.setUpdateTime(new Date());
if (taskGroupMapper.insert(taskGroup) > 0) {
permissionPostHandle(AuthorizationType.TASK_GROUP, loginUser.getId(), Collections.singletonList(taskGroup.getId()),logger);
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.CREATE_TASK_GROUP_ERROR);
return result;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | return result;
}
/**
* update the task group
*
* @param loginUser login user
* @param name task group name
* @param description task group description
* @param groupSize task group total size
* @return the result code and msg
*/
@Override
public Map<String, Object> updateTaskGroup(User loginUser, int id, String name, String description, int groupSize) {
Map<String, Object> result = new HashMap<>();
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_EDIT);
if (!canOperatorPermissions){
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
return result;
}
if (name == null) {
putMsg(result, Status.NAME_NULL);
return result;
}
if (groupSize <= 0) {
putMsg(result, Status.TASK_GROUP_SIZE_ERROR);
return result;
}
Integer exists = taskGroupMapper.selectCount(new QueryWrapper<TaskGroup>().lambda()
.eq(TaskGroup::getName, name)
.eq(TaskGroup::getUserId, loginUser.getId()) |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | .ne(TaskGroup::getId, id));
if (exists > 0) {
putMsg(result, Status.TASK_GROUP_NAME_EXSIT);
return result;
}
TaskGroup taskGroup = taskGroupMapper.selectById(id);
if (taskGroup.getStatus() != Flag.YES.getCode()) {
putMsg(result, Status.TASK_GROUP_STATUS_ERROR);
return result;
}
taskGroup.setGroupSize(groupSize);
taskGroup.setDescription(description);
taskGroup.setUpdateTime(new Date());
if (StringUtils.isNotEmpty(name)) {
taskGroup.setName(name);
}
int i = taskGroupMapper.updateById(taskGroup);
logger.info("update result:{}", i);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* get task group status
*
* @param id task group id
* @return is the task group available
*/
@Override
public boolean isTheTaskGroupAvailable(int id) {
return taskGroupMapper.selectCountByIdStatus(id, Flag.YES.getCode()) == 1; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | }
/**
* query all task group by user id
*
* @param loginUser login user
* @param pageNo page no
* @param pageSize page size
* @return the result code and msg
*/
@Override
public Map<String, Object> queryAllTaskGroup(User loginUser, String name, Integer status, int pageNo, int pageSize) {
return this.doQuery(loginUser, pageNo, pageSize, loginUser.getUserType().equals(UserType.ADMIN_USER) ? 0 : loginUser.getId(), name, status);
}
/**
* query all task group by status
*
* @param loginUser login user
* @param pageNo page no
* @param pageSize page size
* @param status status
* @return the result code and msg
*/
@Override
public Map<String, Object> queryTaskGroupByStatus(User loginUser, int pageNo, int pageSize, int status) {
return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), null, status);
}
/**
* query all task group by name
*
* @param loginUser login user |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | * @param pageNo page no
* @param pageSize page size
* @param projectCode project code
* @return the result code and msg
*/
@Override
public Map<String, Object> queryTaskGroupByProjectCode(User loginUser, int pageNo, int pageSize, Long projectCode) {
Map<String, Object> result = new HashMap<>();
Page<TaskGroup> page = new Page<>(pageNo, pageSize);
PageInfo<TaskGroup> emptyPageInfo = new PageInfo<>(pageNo, pageSize);
Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP, loginUser.getId(), logger);
if (ids.isEmpty()) {
result.put(Constants.DATA_LIST, emptyPageInfo);
putMsg(result, Status.SUCCESS);
return result;
}
IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, new ArrayList<>(ids), projectCode);
return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging);
}
private Map<String, Object> getStringObjectMap(int pageNo, int pageSize, Map<String, Object> result, IPage<TaskGroup> taskGroupPaging) {
PageInfo<TaskGroup> pageInfo = new PageInfo<>(pageNo, pageSize);
int total = taskGroupPaging == null ? 0 : (int) taskGroupPaging.getTotal();
List<TaskGroup> list = taskGroupPaging == null ? new ArrayList<TaskGroup>() : taskGroupPaging.getRecords();
pageInfo.setTotal(total);
pageInfo.setTotalList(list);
result.put(Constants.DATA_LIST, pageInfo);
putMsg(result, Status.SUCCESS);
return result;
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | * query all task group by id
*
* @param loginUser login user
* @param id id
* @return the result code and msg
*/
@Override
public Map<String, Object> queryTaskGroupById(User loginUser, int id) {
Map<String, Object> result = new HashMap<>();
TaskGroup taskGroup = taskGroupMapper.selectById(id);
result.put(Constants.DATA_LIST, taskGroup);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* query
*
* @param pageNo page no
* @param pageSize page size
* @param userId user id
* @param name name
* @param status status
* @return the result code and msg
*/
@Override
public Map<String, Object> doQuery(User loginUser, int pageNo, int pageSize, int userId, String name, Integer status) {
Map<String, Object> result = new HashMap<>();
Page<TaskGroup> page = new Page<>(pageNo, pageSize);
PageInfo<TaskGroup> pageInfo = new PageInfo<>(pageNo, pageSize);
Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP, userId, logger); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | if (ids.isEmpty()) {
result.put(Constants.DATA_LIST, pageInfo);
putMsg(result, Status.SUCCESS);
return result;
}
IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPaging(page, new ArrayList<>(ids), name, status);
return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging);
}
/**
* close a task group
*
* @param loginUser login user
* @param id task group id
* @return the result code and msg
*/
@Override
public Map<String, Object> closeTaskGroup(User loginUser, int id) {
Map<String, Object> result = new HashMap<>();
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_CLOSE);
if (!canOperatorPermissions){
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
return result;
}
TaskGroup taskGroup = taskGroupMapper.selectById(id);
if (taskGroup.getStatus() == Flag.NO.getCode()) {
putMsg(result, Status.TASK_GROUP_STATUS_CLOSED);
return result;
}
taskGroup.setStatus(Flag.NO.getCode());
taskGroupMapper.updateById(taskGroup); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | putMsg(result, Status.SUCCESS);
return result;
}
/**
* start a task group
*
* @param loginUser login user
* @param id task group id
* @return the result code and msg
*/
@Override
public Map<String, Object> startTaskGroup(User loginUser, int id) {
Map<String, Object> result = new HashMap<>();
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_CLOSE);
if (!canOperatorPermissions){
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
return result;
}
TaskGroup taskGroup = taskGroupMapper.selectById(id);
if (taskGroup.getStatus() == Flag.YES.getCode()) {
putMsg(result, Status.TASK_GROUP_STATUS_OPENED);
return result;
}
taskGroup.setStatus(Flag.YES.getCode());
taskGroup.setUpdateTime(new Date(System.currentTimeMillis()));
int update = taskGroupMapper.updateById(taskGroup);
putMsg(result, Status.SUCCESS);
return result;
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,954 | [Bug] [TaskGroupOption] Querying the task group list returns empty data | ### 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
Querying the task group list returns empty data
### What you expected to happen
Querying the task group list returns data
### How to reproduce
see task group option
### Anything else
<img width="1854" alt="image" src="https://user-images.githubusercontent.com/42627702/178781218-f0e33e68-491e-46ad-945d-bbc565a0bb9a.png">
### 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/10954 | https://github.com/apache/dolphinscheduler/pull/10955 | c2dfda80f606b4fa333588cb91749e11c5d6c327 | ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 | 2022-07-13T16:14:22Z | java | 2022-07-14T03:16:28Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java | * wake a task manually
*
* @param loginUser
* @param queueId task group queue id
* @return result
*/
@Override
public Map<String, Object> forceStartTask(User loginUser, int queueId) {
Map<String, Object> result = new HashMap<>();
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_QUEUE_START);
if (!canOperatorPermissions){
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
return result;
}
return executorService.forceStartTaskInstance(loginUser, queueId);
}
@Override
public Map<String, Object> modifyPriority(User loginUser, Integer queueId, Integer priority) {
Map<String, Object> result = new HashMap<>();
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_QUEUE_PRIORITY);
if (!canOperatorPermissions){
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
return result;
}
taskGroupQueueService.modifyPriority(queueId, priority);
putMsg(result, Status.SUCCESS);
return result;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,595 | [Bug] [Api] Dependent Node Only View Projects Created By Self | ### 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
Only display project code.
### What you expected to happen
correct it.
### How to reproduce
None
### Anything else
_No response_
### Version
3.0.0-beta-1
### 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/10595 | https://github.com/apache/dolphinscheduler/pull/10834 | 89780e296d7dc3e9fe510e3b9d3e8addc17acdd9 | 4ff8eaa996fab2593ca77df436727ec7a4d6e596 | 2022-06-24T08:59:42Z | java | 2022-07-14T11:03:34Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProjectMapperTest.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.dao.mapper;
import org.apache.dolphinscheduler.dao.BaseDaoTest;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.User;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
public class ProjectMapperTest extends BaseDaoTest { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,595 | [Bug] [Api] Dependent Node Only View Projects Created By Self | ### 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
Only display project code.
### What you expected to happen
correct it.
### How to reproduce
None
### Anything else
_No response_
### Version
3.0.0-beta-1
### 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/10595 | https://github.com/apache/dolphinscheduler/pull/10834 | 89780e296d7dc3e9fe510e3b9d3e8addc17acdd9 | 4ff8eaa996fab2593ca77df436727ec7a4d6e596 | 2022-06-24T08:59:42Z | java | 2022-07-14T11:03:34Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProjectMapperTest.java | @Autowired
private ProjectMapper projectMapper;
@Autowired
private UserMapper userMapper;
/**
* insert
*
* @return Project
*/
private Project insertOne() {
Project project = new Project();
project.setName("ut project");
project.setUserId(111);
project.setCode(1L);
project.setCreateTime(new Date());
project.setUpdateTime(new Date());
projectMapper.insert(project);
return project;
}
/**
* test update
*/
@Test |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,595 | [Bug] [Api] Dependent Node Only View Projects Created By Self | ### 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
Only display project code.
### What you expected to happen
correct it.
### How to reproduce
None
### Anything else
_No response_
### Version
3.0.0-beta-1
### 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/10595 | https://github.com/apache/dolphinscheduler/pull/10834 | 89780e296d7dc3e9fe510e3b9d3e8addc17acdd9 | 4ff8eaa996fab2593ca77df436727ec7a4d6e596 | 2022-06-24T08:59:42Z | java | 2022-07-14T11:03:34Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProjectMapperTest.java | public void testUpdate() {
Project project = insertOne();
project.setCreateTime(new Date());
int update = projectMapper.updateById(project);
Assert.assertEquals(update, 1);
}
/**
* test delete
*/
@Test
public void testDelete() {
Project projectMap = insertOne();
int delete = projectMapper.deleteById(projectMap.getId());
Assert.assertEquals(delete, 1);
}
/**
* test query
*/
@Test
public void testQuery() {
Project project = insertOne();
List<Project> projects = projectMapper.selectList(null);
Assert.assertNotEquals(projects.size(), 0);
}
/**
* test query detail by id
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,595 | [Bug] [Api] Dependent Node Only View Projects Created By Self | ### 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
Only display project code.
### What you expected to happen
correct it.
### How to reproduce
None
### Anything else
_No response_
### Version
3.0.0-beta-1
### 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/10595 | https://github.com/apache/dolphinscheduler/pull/10834 | 89780e296d7dc3e9fe510e3b9d3e8addc17acdd9 | 4ff8eaa996fab2593ca77df436727ec7a4d6e596 | 2022-06-24T08:59:42Z | java | 2022-07-14T11:03:34Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProjectMapperTest.java | @Test
public void testQueryDetailById() {
User user = new User();
user.setUserName("ut user");
userMapper.insert(user);
Project project = insertOne();
project.setUserId(user.getId());
projectMapper.updateById(project);
Project project1 = projectMapper.queryDetailById(project.getId());
Assert.assertNotEquals(project1, null);
Assert.assertEquals(project1.getUserName(), user.getUserName());
}
/**
* test query project by name
*/
@Test
public void testQueryProjectByName() {
User user = new User();
user.setUserName("ut user");
userMapper.insert(user);
Project project = insertOne();
project.setUserId(user.getId());
projectMapper.updateById(project);
Project project1 = projectMapper.queryByName(project.getName());
Assert.assertNotEquals(project1, null);
}
/**
* test page
*/
@Test |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,595 | [Bug] [Api] Dependent Node Only View Projects Created By Self | ### 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
Only display project code.
### What you expected to happen
correct it.
### How to reproduce
None
### Anything else
_No response_
### Version
3.0.0-beta-1
### 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/10595 | https://github.com/apache/dolphinscheduler/pull/10834 | 89780e296d7dc3e9fe510e3b9d3e8addc17acdd9 | 4ff8eaa996fab2593ca77df436727ec7a4d6e596 | 2022-06-24T08:59:42Z | java | 2022-07-14T11:03:34Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProjectMapperTest.java | public void testQueryProjectListPaging() {
Project project = insertOne();
User user = new User();
user.setUserName("ut user");
userMapper.insert(user);
project.setUserId(user.getId());
projectMapper.updateById(project);
Page<Project> page = new Page(1, 3);
IPage<Project> projectIPage = projectMapper.queryProjectListPaging(
page,
null,
null
);
IPage<Project> projectIPage1 = projectMapper.queryProjectListPaging(
page,
null,
project.getName()
);
Assert.assertEquals(projectIPage.getTotal(), 1);
Assert.assertEquals(projectIPage1.getTotal(), 1);
}
/**
* test query project create user
*/
@Test
public void testQueryProjectCreatedByUser() {
Project project = insertOne();
List<Project> projects = projectMapper.queryProjectCreatedByUser(project.getUserId());
Assert.assertNotEquals(projects.size(), 0);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,595 | [Bug] [Api] Dependent Node Only View Projects Created By Self | ### 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
Only display project code.
### What you expected to happen
correct it.
### How to reproduce
None
### Anything else
_No response_
### Version
3.0.0-beta-1
### 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/10595 | https://github.com/apache/dolphinscheduler/pull/10834 | 89780e296d7dc3e9fe510e3b9d3e8addc17acdd9 | 4ff8eaa996fab2593ca77df436727ec7a4d6e596 | 2022-06-24T08:59:42Z | java | 2022-07-14T11:03:34Z | dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProjectMapperTest.java | /**
* test query authed prject list by userId
*/
@Test
public void testQueryAuthedProjectListByUserId() {
Project project = insertOne();
List<Project> projects = projectMapper.queryProjectCreatedByUser(project.getUserId());
Assert.assertNotEquals(projects.size(), 0);
}
/**
* test query project expect userId
*/
@Test
public void testQueryProjectExceptUserId() {
Project project = insertOne();
List<Project> projects = projectMapper.queryProjectExceptUserId(
100000
);
Assert.assertNotEquals(projects.size(), 0);
}
/**
* test query project permission
*/
@Test
public void testListAuthorizedProjects(){
Project project = insertOne();
List<Project> projects = projectMapper.listAuthorizedProjects(1, Collections.singletonList(project.getId()));
Assert.assertEquals(projects.size(),0);
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.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.plugin.task.datax;
import static org.apache.dolphinscheduler.plugin.datasource.api.utils.PasswordUtils.decodePassword;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_FAILURE;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.RWXR_XR_X;
import org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceClientProvider;
import org.apache.dolphinscheduler.plugin.datasource.api.utils.DataSourceUtils;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor;
import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
import org.apache.dolphinscheduler.plugin.task.api.model.TaskResponse;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils;
import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils;
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam;
import org.apache.dolphinscheduler.spi.enums.DbType;
import org.apache.dolphinscheduler.spi.enums.Flag;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.SystemUtils;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.nio.file.attribute.FileAttribute;
import java.nio.file.attribute.PosixFilePermission;
import java.nio.file.attribute.PosixFilePermissions;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | import java.util.concurrent.ExecutionException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
import com.alibaba.druid.sql.ast.statement.SQLSelect;
import com.alibaba.druid.sql.ast.statement.SQLSelectItem;
import com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock;
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
import com.alibaba.druid.sql.ast.statement.SQLUnionQuery;
import com.alibaba.druid.sql.parser.SQLStatementParser;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
public class DataxTask extends AbstractTaskExecutor {
/**
* jvm parameters
*/
public static final String JVM_PARAM = " --jvm=\"-Xms%sG -Xmx%sG\" ";
/**
* python process(datax only supports version 2.7 by default)
*/
private static final String DATAX_PYTHON = "python2.7";
private static final Pattern PYTHON_PATH_PATTERN = Pattern.compile("/bin/python[\\d.]*$");
/**
* datax path
*/
private static final String DATAX_PATH = "${DATAX_HOME}/bin/datax.py";
/**
* datax channel count |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | */
private static final int DATAX_CHANNEL_COUNT = 1;
/**
* datax parameters
*/
private DataxParameters dataXParameters;
/**
* shell command executor
*/
private ShellCommandExecutor shellCommandExecutor;
/**
* taskExecutionContext
*/
private TaskExecutionContext taskExecutionContext;
private DataxTaskExecutionContext dataxTaskExecutionContext;
/**
* constructor
*
* @param taskExecutionContext taskExecutionContext
*/
public DataxTask(TaskExecutionContext taskExecutionContext) {
super(taskExecutionContext);
this.taskExecutionContext = taskExecutionContext;
this.shellCommandExecutor = new ShellCommandExecutor(this::logHandle,
taskExecutionContext, logger);
}
/**
* init DataX config
*/
@Override |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | public void init() {
logger.info("datax task params {}", taskExecutionContext.getTaskParams());
dataXParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), DataxParameters.class);
if (!dataXParameters.checkParameters()) {
throw new RuntimeException("datax task params is not valid");
}
dataxTaskExecutionContext = dataXParameters.generateExtendedContext(taskExecutionContext.getResourceParametersHelper());
}
/**
* run DataX process
*
* @throws Exception if error throws Exception
*/
@Override
public void handle() throws Exception {
try {
Map<String, Property> paramsMap = taskExecutionContext.getPrepareParamsMap();
String jsonFilePath = buildDataxJsonFile(paramsMap);
String shellCommandFilePath = buildShellCommandFile(jsonFilePath, paramsMap);
TaskResponse commandExecuteResult = shellCommandExecutor.run(shellCommandFilePath);
setExitStatusCode(commandExecuteResult.getExitStatusCode());
setAppIds(commandExecuteResult.getAppIds());
setProcessId(commandExecuteResult.getProcessId());
} catch (Exception e) {
logger.error("datax task error", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw e;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | }
/**
* cancel DataX process
*
* @param cancelApplication cancelApplication
* @throws Exception if error throws Exception
*/
@Override
public void cancelApplication(boolean cancelApplication)
throws Exception {
shellCommandExecutor.cancelApplication();
}
/**
* build datax configuration file
*
* @return datax json file name
* @throws Exception if error throws Exception
*/
private String buildDataxJsonFile(Map<String, Property> paramsMap)
throws Exception {
String fileName = String.format("%s/%s_job.json",
taskExecutionContext.getExecutePath(),
taskExecutionContext.getTaskAppId());
String json;
Path path = new File(fileName).toPath();
if (Files.exists(path)) {
return fileName;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | if (dataXParameters.getCustomConfig() == Flag.YES.ordinal()) {
json = dataXParameters.getJson().replaceAll("\\r\\n", "\n");
} else {
ObjectNode job = JSONUtils.createObjectNode();
job.putArray("content").addAll(buildDataxJobContentJson());
job.set("setting", buildDataxJobSettingJson());
ObjectNode root = JSONUtils.createObjectNode();
root.set("job", job);
root.set("core", buildDataxCoreJson());
json = root.toString();
}
json = ParameterUtils.convertParameterPlaceholders(json, ParamUtils.convert(paramsMap));
logger.debug("datax job json : {}", json);
FileUtils.writeStringToFile(new File(fileName), json, StandardCharsets.UTF_8);
return fileName;
}
/**
* build datax job config
*
* @return collection of datax job config JSONObject
* @throws SQLException if error throws SQLException
*/
private List<ObjectNode> buildDataxJobContentJson() {
BaseConnectionParam dataSourceCfg = (BaseConnectionParam) DataSourceUtils.buildConnectionParams(
dataxTaskExecutionContext.getSourcetype(),
dataxTaskExecutionContext.getSourceConnectionParams());
BaseConnectionParam dataTargetCfg = (BaseConnectionParam) DataSourceUtils.buildConnectionParams(
dataxTaskExecutionContext.getTargetType(), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | dataxTaskExecutionContext.getTargetConnectionParams());
List<ObjectNode> readerConnArr = new ArrayList<>();
ObjectNode readerConn = JSONUtils.createObjectNode();
ArrayNode sqlArr = readerConn.putArray("querySql");
for (String sql : new String[]{dataXParameters.getSql()}) {
sqlArr.add(sql);
}
ArrayNode urlArr = readerConn.putArray("jdbcUrl");
urlArr.add(DataSourceUtils.getJdbcUrl(DbType.valueOf(dataXParameters.getDsType()), dataSourceCfg));
readerConnArr.add(readerConn);
ObjectNode readerParam = JSONUtils.createObjectNode();
readerParam.put("username", dataSourceCfg.getUser());
readerParam.put("password", decodePassword(dataSourceCfg.getPassword()));
readerParam.putArray("connection").addAll(readerConnArr);
ObjectNode reader = JSONUtils.createObjectNode();
reader.put("name", DataxUtils.getReaderPluginName(dataxTaskExecutionContext.getSourcetype()));
reader.set("parameter", readerParam);
List<ObjectNode> writerConnArr = new ArrayList<>();
ObjectNode writerConn = JSONUtils.createObjectNode();
ArrayNode tableArr = writerConn.putArray("table");
tableArr.add(dataXParameters.getTargetTable());
writerConn.put("jdbcUrl", DataSourceUtils.getJdbcUrl(DbType.valueOf(dataXParameters.getDtType()), dataTargetCfg));
writerConnArr.add(writerConn);
ObjectNode writerParam = JSONUtils.createObjectNode();
writerParam.put("username", dataTargetCfg.getUser());
writerParam.put("password", decodePassword(dataTargetCfg.getPassword()));
String[] columns = parsingSqlColumnNames(dataxTaskExecutionContext.getSourcetype(),
dataxTaskExecutionContext.getTargetType(),
dataSourceCfg, dataXParameters.getSql());
ArrayNode columnArr = writerParam.putArray("column"); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | for (String column : columns) {
columnArr.add(column);
}
writerParam.putArray("connection").addAll(writerConnArr);
if (CollectionUtils.isNotEmpty(dataXParameters.getPreStatements())) {
ArrayNode preSqlArr = writerParam.putArray("preSql");
for (String preSql : dataXParameters.getPreStatements()) {
preSqlArr.add(preSql);
}
}
if (CollectionUtils.isNotEmpty(dataXParameters.getPostStatements())) {
ArrayNode postSqlArr = writerParam.putArray("postSql");
for (String postSql : dataXParameters.getPostStatements()) {
postSqlArr.add(postSql);
}
}
ObjectNode writer = JSONUtils.createObjectNode();
writer.put("name", DataxUtils.getWriterPluginName(dataxTaskExecutionContext.getTargetType()));
writer.set("parameter", writerParam);
List<ObjectNode> contentList = new ArrayList<>();
ObjectNode content = JSONUtils.createObjectNode();
content.set("reader", reader);
content.set("writer", writer);
contentList.add(content);
return contentList;
}
/**
* build datax setting config
*
* @return datax setting config JSONObject |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | */
private ObjectNode buildDataxJobSettingJson() {
ObjectNode speed = JSONUtils.createObjectNode();
speed.put("channel", DATAX_CHANNEL_COUNT);
if (dataXParameters.getJobSpeedByte() > 0) {
speed.put("byte", dataXParameters.getJobSpeedByte());
}
if (dataXParameters.getJobSpeedRecord() > 0) {
speed.put("record", dataXParameters.getJobSpeedRecord());
}
ObjectNode errorLimit = JSONUtils.createObjectNode();
errorLimit.put("record", 0);
errorLimit.put("percentage", 0);
ObjectNode setting = JSONUtils.createObjectNode();
setting.set("speed", speed);
setting.set("errorLimit", errorLimit);
return setting;
}
private ObjectNode buildDataxCoreJson() {
ObjectNode speed = JSONUtils.createObjectNode();
speed.put("channel", DATAX_CHANNEL_COUNT);
if (dataXParameters.getJobSpeedByte() > 0) {
speed.put("byte", dataXParameters.getJobSpeedByte());
}
if (dataXParameters.getJobSpeedRecord() > 0) {
speed.put("record", dataXParameters.getJobSpeedRecord());
}
ObjectNode channel = JSONUtils.createObjectNode();
channel.set("speed", speed);
ObjectNode transport = JSONUtils.createObjectNode(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | transport.set("channel", channel);
ObjectNode core = JSONUtils.createObjectNode();
core.set("transport", transport);
return core;
}
/**
* create command
*
* @return shell command file name
* @throws Exception if error throws Exception
*/
private String buildShellCommandFile(String jobConfigFilePath, Map<String, Property> paramsMap)
throws Exception {
String fileName = String.format("%s/%s_node.%s",
taskExecutionContext.getExecutePath(),
taskExecutionContext.getTaskAppId(),
SystemUtils.IS_OS_WINDOWS ? "bat" : "sh");
Path path = new File(fileName).toPath();
if (Files.exists(path)) {
return fileName;
}
StringBuilder sbr = new StringBuilder();
sbr.append(getPythonCommand());
sbr.append(" ");
sbr.append(DATAX_PATH);
sbr.append(" ");
sbr.append(loadJvmEnv(dataXParameters));
sbr.append(jobConfigFilePath); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | String dataxCommand = ParameterUtils.convertParameterPlaceholders(sbr.toString(), ParamUtils.convert(paramsMap));
logger.debug("raw script : {}", dataxCommand);
Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X);
FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms);
if (SystemUtils.IS_OS_WINDOWS) {
Files.createFile(path);
} else {
Files.createFile(path, attr);
}
Files.write(path, dataxCommand.getBytes(), StandardOpenOption.APPEND);
return fileName;
}
public String getPythonCommand() {
String pythonHome = System.getenv("PYTHON_HOME");
return getPythonCommand(pythonHome);
}
public String getPythonCommand(String pythonHome) {
if (StringUtils.isEmpty(pythonHome)) {
return DATAX_PYTHON;
}
String pythonBinPath = "/bin/" + DATAX_PYTHON;
Matcher matcher = PYTHON_PATH_PATTERN.matcher(pythonHome);
if (matcher.find()) {
return matcher.replaceAll(pythonBinPath);
}
return Paths.get(pythonHome, pythonBinPath).toString();
}
public String loadJvmEnv(DataxParameters dataXParameters) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | int xms = Math.max(dataXParameters.getXms(), 1);
int xmx = Math.max(dataXParameters.getXmx(), 1);
return String.format(JVM_PARAM, xms, xmx);
}
/**
* parsing synchronized column names in SQL statements
*
* @param sourceType the database type of the data source
* @param targetType the database type of the data target
* @param dataSourceCfg the database connection parameters of the data source
* @param sql sql for data synchronization
* @return Keyword converted column names
*/
private String[] parsingSqlColumnNames(DbType sourceType, DbType targetType, BaseConnectionParam dataSourceCfg, String sql) {
String[] columnNames = tryGrammaticalAnalysisSqlColumnNames(sourceType, sql);
if (columnNames == null || columnNames.length == 0) {
logger.info("try to execute sql analysis query column name");
columnNames = tryExecuteSqlResolveColumnNames(sourceType, dataSourceCfg, sql);
}
notNull(columnNames, String.format("parsing sql columns failed : %s", sql));
return DataxUtils.convertKeywordsColumns(targetType, columnNames);
}
/**
* try grammatical parsing column
*
* @param dbType database type
* @param sql sql for data synchronization
* @return column name array
* @throws RuntimeException if error throws RuntimeException
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | private String[] tryGrammaticalAnalysisSqlColumnNames(DbType dbType, String sql) {
String[] columnNames;
try {
SQLStatementParser parser = DataxUtils.getSqlStatementParser(dbType, sql);
if (parser == null) {
logger.warn("database driver [{}] is not support grammatical analysis sql", dbType);
return new String[0];
}
SQLStatement sqlStatement = parser.parseStatement();
SQLSelectStatement sqlSelectStatement = (SQLSelectStatement) sqlStatement;
SQLSelect sqlSelect = sqlSelectStatement.getSelect();
List<SQLSelectItem> selectItemList = null;
if (sqlSelect.getQuery() instanceof SQLSelectQueryBlock) {
SQLSelectQueryBlock block = (SQLSelectQueryBlock) sqlSelect.getQuery();
selectItemList = block.getSelectList();
} else if (sqlSelect.getQuery() instanceof SQLUnionQuery) {
SQLUnionQuery unionQuery = (SQLUnionQuery) sqlSelect.getQuery();
SQLSelectQueryBlock block = (SQLSelectQueryBlock) unionQuery.getRight();
selectItemList = block.getSelectList();
}
notNull(selectItemList,
String.format("select query type [%s] is not support", sqlSelect.getQuery().toString()));
columnNames = new String[selectItemList.size()];
for (int i = 0; i < selectItemList.size(); i++) {
SQLSelectItem item = selectItemList.get(i);
String columnName = null;
if (item.getAlias() != null) {
columnName = item.getAlias();
} else if (item.getExpr() != null) {
if (item.getExpr() instanceof SQLPropertyExpr) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | SQLPropertyExpr expr = (SQLPropertyExpr) item.getExpr();
columnName = expr.getName();
} else if (item.getExpr() instanceof SQLIdentifierExpr) {
SQLIdentifierExpr expr = (SQLIdentifierExpr) item.getExpr();
columnName = expr.getName();
}
} else {
throw new RuntimeException(
String.format("grammatical analysis sql column [ %s ] failed", item.toString()));
}
if (columnName == null) {
throw new RuntimeException(
String.format("grammatical analysis sql column [ %s ] failed", item.toString()));
}
columnNames[i] = columnName;
}
} catch (Exception e) {
logger.warn(e.getMessage(), e);
return new String[0];
}
return columnNames;
}
/**
* try to execute sql to resolve column names
*
* @param baseDataSource the database connection parameters
* @param sql sql for data synchronization
* @return column name array
*/
public String[] tryExecuteSqlResolveColumnNames(DbType sourceType, BaseConnectionParam baseDataSource, String sql) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,815 | [Feature][Datax Task] Suggest support input parameters in datax task | ### 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
datax support parameters, but datax task not support parameters now, suggest support it.

### Use case
```shell
bin/datax.py xxx.json -p "-Dp1=1 -Dp2=2"
```
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/10815 | https://github.com/apache/dolphinscheduler/pull/10950 | a38fa34d43b2c39cda955bd8d73b1148b6decdd6 | 7196b125d9a6612f2f175c2190d7758a09d7e0b9 | 2022-07-06T12:24:24Z | java | 2022-07-15T01:27:23Z | dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java | String[] columnNames;
sql = String.format("SELECT t.* FROM ( %s ) t WHERE 0 = 1", sql);
sql = sql.replace(";", "");
try (
Connection connection = DataSourceClientProvider.getInstance().getConnection(sourceType, baseDataSource);
PreparedStatement stmt = connection.prepareStatement(sql);
ResultSet resultSet = stmt.executeQuery()) {
ResultSetMetaData md = resultSet.getMetaData();
int num = md.getColumnCount();
columnNames = new String[num];
for (int i = 1; i <= num; i++) {
columnNames[i - 1] = md.getColumnName(i);
}
} catch (SQLException | ExecutionException e) {
logger.error(e.getMessage(), e);
return null;
}
return columnNames;
}
@Override
public AbstractParameters getParameters() {
return dataXParameters;
}
private void notNull(Object obj, String message) {
if (obj == null) {
throw new RuntimeException(message);
}
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowConstants.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.plugin.task.mlflow;
public class MlflowConstants {
private MlflowConstants() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowConstants.java | throw new IllegalStateException("Utility class");
}
public static final String JOB_TYPE_AUTOML = "AutoML";
public static final String JOB_TYPE_BASIC_ALGORITHM = "BasicAlgorithm";
public static final String JOB_TYPE_CUSTOM_PROJECT = "CustomProject";
public static final String PRESET_REPOSITORY = "https://github.com/apache/dolphinscheduler-mlflow";
public static final String PRESET_REPOSITORY_VERSION = "main";
public static final String PRESET_AUTOML_PROJECT = PRESET_REPOSITORY + "#Project-AutoML";
public static final String PRESET_BASIC_ALGORITHM_PROJECT = PRESET_REPOSITORY + "#Project-BasicAlgorithm";
public static final String MLFLOW_TASK_TYPE_PROJECTS = "MLflow Projects";
public static final String MLFLOW_TASK_TYPE_MODELS = "MLflow Models";
public static final String MLFLOW_MODELS_DEPLOY_TYPE_MLFLOW = "MLFLOW";
public static final String MLFLOW_MODELS_DEPLOY_TYPE_DOCKER = "DOCKER";
public static final String MLFLOW_MODELS_DEPLOY_TYPE_DOCKER_COMPOSE = "DOCKER COMPOSE";
/**
* template file
*/
public static final String TEMPLATE_DOCKER_COMPOSE = "docker-compose.yml";
/**
* mlflow command
*/
public static final String EXPORT_MLFLOW_TRACKING_URI_ENV = "export MLFLOW_TRACKING_URI=%s";
public static final String SET_DATA_PATH = "data_path=%s";
public static final String SET_REPOSITORY = "repo=%s";
public static final String MLFLOW_RUN_BASIC_ALGORITHM = "mlflow run $repo " +
"-P algorithm=%s " +
"-P data_path=$data_path " +
"-P params=\"%s\" " +
"-P search_params=\"%s\" " +
"-P model_name=\"%s\" " + |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowConstants.java | "--experiment-name=\"%s\" " +
"--version=main ";
public static final String MLFLOW_RUN_AUTOML_PROJECT = "mlflow run $repo " +
"-P tool=%s " +
"-P data_path=$data_path " +
"-P params=\"%s\" " +
"-P model_name=\"%s\" " +
"--experiment-name=\"%s\" " +
"--version=main ";
public static final String MLFLOW_RUN_CUSTOM_PROJECT = "mlflow run $repo " +
"%s " +
"--experiment-name=\"%s\" " +
"--version=\"%s\" ";
public static final String MLFLOW_MODELS_SERVE = "mlflow models serve -m %s --port %s -h 0.0.0.0";
public static final String MLFLOW_BUILD_DOCKER = "mlflow models build-docker -m %s -n %s --enable-mlserver";
public static final String DOCKER_RREMOVE_CONTAINER = "docker rm -f %s";
public static final String DOCKER_RUN = "docker run -d --name=%s -p=%s:8080 " +
"--health-cmd \"curl --fail http://127.0.0.1:8080/ping || exit 1\" --health-interval 5s --health-retries 20" +
" %s";
public static final String DOCKER_COMPOSE_RUN = "docker-compose up -d";
public static final String SET_DOCKER_COMPOSE_ENV = "export DS_TASK_MLFLOW_IMAGE_NAME=%s\n" +
"export DS_TASK_MLFLOW_CONTAINER_NAME=%s\n" +
"export DS_TASK_MLFLOW_DEPLOY_PORT=%s\n" +
"export DS_TASK_MLFLOW_CPU_LIMIT=%s\n" +
"export DS_TASK_MLFLOW_MEMORY_LIMIT=%s";
public static final String DOCKER_HEALTH_CHECK = "docker inspect --format \"{{json .State.Health.Status }}\" %s";
public static final int DOCKER_HEALTH_CHECK_TIMEOUT = 20;
public static final int DOCKER_HEALTH_CHECK_INTERVAL = 5000;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.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.plugin.task.mlflow;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_FAILURE;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor;
import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
import org.apache.dolphinscheduler.plugin.task.api.model.TaskResponse; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java | import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils;
import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils;
import org.apache.dolphinscheduler.plugin.task.api.utils.OSUtils;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import org.apache.dolphinscheduler.common.thread.ThreadUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* shell task
*/
public class MlflowTask extends AbstractTaskExecutor {
/**
* shell parameters
*/
private MlflowParameters mlflowParameters;
/**
* shell command executor
*/
private ShellCommandExecutor shellCommandExecutor;
/**
* taskExecutionContext
*/
private TaskExecutionContext taskExecutionContext;
/**
* constructor
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java | * @param taskExecutionContext taskExecutionContext
*/
public MlflowTask(TaskExecutionContext taskExecutionContext) {
super(taskExecutionContext);
this.taskExecutionContext = taskExecutionContext;
this.shellCommandExecutor = new ShellCommandExecutor(this::logHandle, taskExecutionContext, logger);
}
@Override
public void init() {
logger.info("shell task params {}", taskExecutionContext.getTaskParams());
mlflowParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), MlflowParameters.class);
if (!mlflowParameters.checkParameters()) {
throw new RuntimeException("shell task params is not valid");
}
}
@Override
public void handle() throws Exception {
try {
String command = buildCommand();
TaskResponse commandExecuteResult = shellCommandExecutor.run(command);
int exitCode;
if (mlflowParameters.getIsDeployDocker()){
exitCode = checkDockerHealth();
}else {
exitCode = commandExecuteResult.getExitStatusCode();
}
setExitStatusCode(exitCode);
setAppIds(commandExecuteResult.getAppIds());
setProcessId(commandExecuteResult.getProcessId()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java | mlflowParameters.dealOutParam(shellCommandExecutor.getVarPool());
} catch (Exception e) {
logger.error("shell task error", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw e;
}
}
@Override
public void cancelApplication(boolean cancelApplication) throws Exception {
shellCommandExecutor.cancelApplication();
}
public String buildCommand() {
String command = "";
if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS)) {
command = buildCommandForMlflowProjects();
} else if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_MODELS)) {
command = buildCommandForMlflowModels();
}
logger.info("mlflow task command: \n{}", command);
return command;
}
/**
* create command
*
* @return file name
*/
private String buildCommandForMlflowProjects() {
Map<String, Property> paramsMap = getParamsMap();
List<String> args = new ArrayList<>(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java | args.add(String.format(MlflowConstants.EXPORT_MLFLOW_TRACKING_URI_ENV, mlflowParameters.getMlflowTrackingUri()));
String runCommand;
if (mlflowParameters.getMlflowJobType().equals(MlflowConstants.JOB_TYPE_BASIC_ALGORITHM)) {
args.add(String.format(MlflowConstants.SET_DATA_PATH, mlflowParameters.getDataPath()));
args.add(String.format(MlflowConstants.SET_REPOSITORY, MlflowConstants.PRESET_BASIC_ALGORITHM_PROJECT));
runCommand = MlflowConstants.MLFLOW_RUN_BASIC_ALGORITHM;
runCommand = String.format(runCommand, mlflowParameters.getAlgorithm(), mlflowParameters.getParams(), mlflowParameters.getSearchParams(), mlflowParameters.getModelName(), mlflowParameters.getExperimentName());
} else if (mlflowParameters.getMlflowJobType().equals(MlflowConstants.JOB_TYPE_AUTOML)) {
args.add(String.format(MlflowConstants.SET_DATA_PATH, mlflowParameters.getDataPath()));
args.add(String.format(MlflowConstants.SET_REPOSITORY, MlflowConstants.PRESET_AUTOML_PROJECT));
runCommand = MlflowConstants.MLFLOW_RUN_AUTOML_PROJECT;
runCommand = String.format(runCommand, mlflowParameters.getAutomlTool(), mlflowParameters.getParams(), mlflowParameters.getModelName(), mlflowParameters.getExperimentName());
} else if (mlflowParameters.getMlflowJobType().equals(MlflowConstants.JOB_TYPE_CUSTOM_PROJECT)) {
args.add(String.format(MlflowConstants.SET_REPOSITORY, mlflowParameters.getMlflowProjectRepository()));
runCommand = MlflowConstants.MLFLOW_RUN_CUSTOM_PROJECT;
runCommand = String.format(runCommand, mlflowParameters.getParams(), mlflowParameters.getExperimentName(), mlflowParameters.getMlflowProjectVersion());
} else {
runCommand = String.format("Cant not Support %s", mlflowParameters.getMlflowJobType());
}
args.add(runCommand);
String command = ParameterUtils.convertParameterPlaceholders(String.join("\n", args), ParamUtils.convert(paramsMap));
return command;
}
protected String buildCommandForMlflowModels() {
/**
* papermill [OPTIONS] NOTEBOOK_PATH [OUTPUT_PATH]
*/
Map<String, Property> paramsMap = getParamsMap();
List<String> args = new ArrayList<>();
args.add(String.format(MlflowConstants.EXPORT_MLFLOW_TRACKING_URI_ENV, mlflowParameters.getMlflowTrackingUri())); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java | String deployModelKey = mlflowParameters.getDeployModelKey();
if (mlflowParameters.getDeployType().equals(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_MLFLOW)) {
args.add(String.format(MlflowConstants.MLFLOW_MODELS_SERVE, deployModelKey, mlflowParameters.getDeployPort()));
} else if (mlflowParameters.getDeployType().equals(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_DOCKER)) {
String imageName = "mlflow/" + mlflowParameters.getModelKeyName(":");
String containerName = mlflowParameters.getContainerName();
args.add(String.format(MlflowConstants.MLFLOW_BUILD_DOCKER, deployModelKey, imageName));
args.add(String.format(MlflowConstants.DOCKER_RREMOVE_CONTAINER, containerName));
args.add(String.format(MlflowConstants.DOCKER_RUN, containerName, mlflowParameters.getDeployPort(), imageName));
} else if (mlflowParameters.getDeployType().equals(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_DOCKER_COMPOSE)) {
String templatePath = getTemplatePath(MlflowConstants.TEMPLATE_DOCKER_COMPOSE);
args.add(String.format("cp %s %s", templatePath, taskExecutionContext.getExecutePath()));
String imageName = "mlflow/" + mlflowParameters.getModelKeyName(":");
String containerName = mlflowParameters.getContainerName();
args.add(String.format(MlflowConstants.MLFLOW_BUILD_DOCKER, deployModelKey, imageName));
args.add(String.format(MlflowConstants.DOCKER_RREMOVE_CONTAINER, containerName));
args.add(mlflowParameters.getDockerComposeEnvCommand());
args.add(MlflowConstants.DOCKER_COMPOSE_RUN);
}
String command = ParameterUtils.convertParameterPlaceholders(String.join("\n", args), ParamUtils.convert(paramsMap));
return command;
}
private Map<String, Property> getParamsMap() {
return taskExecutionContext.getPrepareParamsMap();
}
public int checkDockerHealth() throws Exception {
logger.info("checking container healthy ... ");
int exitCode = -1;
String[] command = {"sh", "-c", String.format(MlflowConstants.DOCKER_HEALTH_CHECK, mlflowParameters.getContainerName())}; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java | for(int x = 0; x < MlflowConstants.DOCKER_HEALTH_CHECK_TIMEOUT; x = x+1) {
String status;
try {
status = OSUtils.exeShell(command).replace("\n", "").replace("\"", "");
} catch (Exception e) {
status = String.format("error --- %s", e.getMessage());
}
logger.info("container healthy status: {}", status);
if (status.equals("healthy")) {
exitCode = 0;
logger.info("container is healthy");
return exitCode;
}else {
logger.info("The health check has been running for {} seconds", x * MlflowConstants.DOCKER_HEALTH_CHECK_INTERVAL / 1000);
ThreadUtils.sleep(MlflowConstants.DOCKER_HEALTH_CHECK_INTERVAL);
}
}
logger.info("health check fail");
return exitCode;
}
@Override
public AbstractParameters getParameters() {
return mlflowParameters;
}
public String getTemplatePath(String template) {
String templatePath = MlflowTask.class.getClassLoader().getResource(template).getPath();
return templatePath;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.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 | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.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.dolphinler.plugin.task.mlflow;
import java.util.Date;
import java.util.UUID;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContextCacheManager;
import org.apache.dolphinscheduler.plugin.task.api.utils.OSUtils;
import org.apache.dolphinscheduler.plugin.task.mlflow.MlflowConstants;
import org.apache.dolphinscheduler.plugin.task.mlflow.MlflowParameters;
import org.apache.dolphinscheduler.plugin.task.mlflow.MlflowTask;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.dolphinscheduler.spi.utils.PropertyUtils;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.junit.runner.RunWith;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
@RunWith(PowerMockRunner.class) |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.java | @PrepareForTest({
JSONUtils.class,
PropertyUtils.class,
})
@PowerMockIgnore({"javax.*"})
@SuppressStaticInitializationFor("org.apache.dolphinscheduler.spi.utils.PropertyUtils")
public class MlflowTaskTest {
private static final Logger logger = LoggerFactory.getLogger(MlflowTask.class);
@Before
public void before() throws Exception {
PowerMockito.mockStatic(PropertyUtils.class);
}
public TaskExecutionContext createContext(MlflowParameters mlflowParameters) {
String parameters = JSONUtils.toJsonString(mlflowParameters);
TaskExecutionContext taskExecutionContext = Mockito.mock(TaskExecutionContext.class);
Mockito.when(taskExecutionContext.getTaskParams()).thenReturn(parameters);
Mockito.when(taskExecutionContext.getTaskLogName()).thenReturn("MLflowTest");
Mockito.when(taskExecutionContext.getExecutePath()).thenReturn("/tmp/dolphinscheduler_test");
Mockito.when(taskExecutionContext.getTaskAppId()).thenReturn(UUID.randomUUID().toString());
Mockito.when(taskExecutionContext.getTenantCode()).thenReturn("root");
Mockito.when(taskExecutionContext.getStartTime()).thenReturn(new Date());
Mockito.when(taskExecutionContext.getTaskTimeout()).thenReturn(10000);
Mockito.when(taskExecutionContext.getLogPath()).thenReturn("/tmp/dolphinscheduler_test/log");
Mockito.when(taskExecutionContext.getEnvironmentConfig()).thenReturn("export PATH=$HOME/anaconda3/bin:$PATH");
String userName = System.getenv().get("USER");
Mockito.when(taskExecutionContext.getTenantCode()).thenReturn(userName);
TaskExecutionContextCacheManager.cacheTaskExecutionContext(taskExecutionContext);
return taskExecutionContext;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.java | @Test
public void testInitBasicAlgorithmTask() {
MlflowTask mlflowTask = initTask(createBasicAlgorithmParameters());
Assert.assertEquals(mlflowTask.buildCommand(),
"export MLFLOW_TRACKING_URI=http://127.0.0.1:5000\n" +
"data_path=/data/iris.csv\n" +
"repo=https://github.com/apache/dolphinscheduler-mlflow#Project-BasicAlgorithm\n" +
"mlflow run $repo " +
"-P algorithm=xgboost " +
"-P data_path=$data_path " +
"-P params=\"n_estimators=100\" " +
"-P search_params=\"\" " +
"-P model_name=\"BasicAlgorithm\" " +
"--experiment-name=\"BasicAlgorithm\" " +
"--version=main ");
}
@Test
public void testInitAutoMLTask() {
MlflowTask mlflowTask = initTask(createAutoMLParameters());
Assert.assertEquals(mlflowTask.buildCommand(),
"export MLFLOW_TRACKING_URI=http://127.0.0.1:5000\n" +
"data_path=/data/iris.csv\n" +
"repo=https://github.com/apache/dolphinscheduler-mlflow#Project-AutoML\n" +
"mlflow run $repo " +
"-P tool=autosklearn " +
"-P data_path=$data_path " +
"-P params=\"time_left_for_this_task=30\" " +
"-P model_name=\"AutoML\" " +
"--experiment-name=\"AutoML\" " +
"--version=main "); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.java | }
@Test
public void testInitCustomProjectTask() {
MlflowTask mlflowTask = initTask(createCustomProjectParameters());
Assert.assertEquals(mlflowTask.buildCommand(),
"export MLFLOW_TRACKING_URI=http://127.0.0.1:5000\n" +
"repo=https://github.com/mlflow/mlflow#examples/xgboost/xgboost_native\n" +
"mlflow run $repo " +
"-P learning_rate=0.2 " +
"-P colsample_bytree=0.8 " +
"-P subsample=0.9 " +
"--experiment-name=\"custom_project\" " +
"--version=\"master\" ");
}
@Test
public void testModelsDeployMlflow() {
MlflowTask mlflowTask = initTask(createModelDeplyMlflowParameters());
Assert.assertEquals(mlflowTask.buildCommand(),
"export MLFLOW_TRACKING_URI=http://127.0.0.1:5000\n" +
"mlflow models serve -m models:/model/1 --port 7000 -h 0.0.0.0");
}
@Test
public void testModelsDeployDocker() {
MlflowTask mlflowTask = initTask(createModelDeplyDockerParameters());
Assert.assertEquals(mlflowTask.buildCommand(),
"export MLFLOW_TRACKING_URI=http://127.0.0.1:5000\n" +
"mlflow models build-docker -m models:/model/1 -n mlflow/model:1 --enable-mlserver\n" +
"docker rm -f ds-mlflow-model-1\n" +
"docker run -d --name=ds-mlflow-model-1 -p=7000:8080 " +
"--health-cmd \"curl --fail http://127.0.0.1:8080/ping || exit 1\" --health-interval 5s --health-retries 20 " + |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.java | "mlflow/model:1");
}
@Test
public void testModelsDeployDockerCompose() throws Exception{
MlflowTask mlflowTask = initTask(createModelDeplyDockerComposeParameters());
Assert.assertEquals(mlflowTask.buildCommand(),
"export MLFLOW_TRACKING_URI=http://127.0.0.1:5000\n" +
"cp " + mlflowTask.getTemplatePath(MlflowConstants.TEMPLATE_DOCKER_COMPOSE) +
" /tmp/dolphinscheduler_test\n" +
"mlflow models build-docker -m models:/model/1 -n mlflow/model:1 --enable-mlserver\n" +
"docker rm -f ds-mlflow-model-1\n" +
"export DS_TASK_MLFLOW_IMAGE_NAME=mlflow/model:1\n" +
"export DS_TASK_MLFLOW_CONTAINER_NAME=ds-mlflow-model-1\n" +
"export DS_TASK_MLFLOW_DEPLOY_PORT=7000\n" +
"export DS_TASK_MLFLOW_CPU_LIMIT=0.5\n" +
"export DS_TASK_MLFLOW_MEMORY_LIMIT=200m\n" +
"docker-compose up -d");
}
private MlflowTask initTask(MlflowParameters mlflowParameters) {
TaskExecutionContext taskExecutionContext = createContext(mlflowParameters);
MlflowTask mlflowTask = new MlflowTask(taskExecutionContext);
mlflowTask.init();
mlflowTask.getParameters().setVarPool(taskExecutionContext.getVarPool());
return mlflowTask;
}
private MlflowParameters createBasicAlgorithmParameters() {
MlflowParameters mlflowParameters = new MlflowParameters();
mlflowParameters.setMlflowTaskType(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS);
mlflowParameters.setMlflowJobType(MlflowConstants.JOB_TYPE_BASIC_ALGORITHM);
mlflowParameters.setAlgorithm("xgboost"); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.java | mlflowParameters.setDataPaths("/data/iris.csv");
mlflowParameters.setParams("n_estimators=100");
mlflowParameters.setExperimentNames("BasicAlgorithm");
mlflowParameters.setModelNames("BasicAlgorithm");
mlflowParameters.setMlflowTrackingUris("http://127.0.0.1:5000");
return mlflowParameters;
}
private MlflowParameters createAutoMLParameters() {
MlflowParameters mlflowParameters = new MlflowParameters();
mlflowParameters.setMlflowTaskType(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS);
mlflowParameters.setMlflowJobType(MlflowConstants.JOB_TYPE_AUTOML);
mlflowParameters.setAutomlTool("autosklearn");
mlflowParameters.setParams("time_left_for_this_task=30");
mlflowParameters.setDataPaths("/data/iris.csv");
mlflowParameters.setExperimentNames("AutoML");
mlflowParameters.setModelNames("AutoML");
mlflowParameters.setMlflowTrackingUris("http://127.0.0.1:5000");
return mlflowParameters;
}
private MlflowParameters createCustomProjectParameters() {
MlflowParameters mlflowParameters = new MlflowParameters();
mlflowParameters.setMlflowTaskType(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS);
mlflowParameters.setMlflowJobType(MlflowConstants.JOB_TYPE_CUSTOM_PROJECT);
mlflowParameters.setMlflowTrackingUris("http://127.0.0.1:5000");
mlflowParameters.setExperimentNames("custom_project");
mlflowParameters.setParams("-P learning_rate=0.2 -P colsample_bytree=0.8 -P subsample=0.9");
mlflowParameters.setMlflowProjectRepository("https://github.com/mlflow/mlflow#examples/xgboost/xgboost_native");
return mlflowParameters;
}
private MlflowParameters createModelDeplyMlflowParameters() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 10,986 | [Bug] [MLflow Task plugin] Sometimes errors are reported using preset algorithms | ### 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
Sometimes errors are reported using preset algorithms
```
File "/home/lucky/anaconda3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/cli.py", line 168, in run
projects.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 293, in run
submitted_run_obj = _run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/__init__.py", line 92, in _run
submitted_run = backend.run(
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/backend/local.py", line 45, in run
work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 130, in fetch_and_validate_project
work_dir = _fetch_project(uri=uri, version=version)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 164, in _fetch_project
_fetch_git_repo(parsed_uri, version, dst_dir)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/mlflow/projects/utils.py", line 191, in _fetch_git_repo
origin.fetch(depth=GIT_FETCH_DEPTH)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
res = self._get_fetch_info_from_stderr(proc, progress,
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/lucky/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v --depth=1 origin
stderr: 'fatal: unable to access 'https://github.com/apache/dolphinscheduler-mlflow/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.'
```
### What you expected to happen
This might solve the problem
```shell
apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
```
### How to reproduce
Run MLflow Projects (BasicAlgorithm or AutoML)
### 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/10986 | https://github.com/apache/dolphinscheduler/pull/10987 | fd5fb85858502bc1261669311171b696a806d687 | 11a354927d42f0a944d51cde10114849cce88c74 | 2022-07-15T03:33:04Z | java | 2022-07-15T07:38:13Z | dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/test/java/org/apache/dolphinler/plugin/task/mlflow/MlflowTaskTest.java | MlflowParameters mlflowParameters = new MlflowParameters();
mlflowParameters.setMlflowTaskType(MlflowConstants.MLFLOW_TASK_TYPE_MODELS);
mlflowParameters.setDeployType(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_MLFLOW);
mlflowParameters.setMlflowTrackingUris("http://127.0.0.1:5000");
mlflowParameters.setDeployModelKey("models:/model/1");
mlflowParameters.setDeployPort("7000");
return mlflowParameters;
}
private MlflowParameters createModelDeplyDockerParameters() {
MlflowParameters mlflowParameters = new MlflowParameters();
mlflowParameters.setMlflowTaskType(MlflowConstants.MLFLOW_TASK_TYPE_MODELS);
mlflowParameters.setDeployType(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_DOCKER);
mlflowParameters.setMlflowTrackingUris("http://127.0.0.1:5000");
mlflowParameters.setDeployModelKey("models:/model/1");
mlflowParameters.setDeployPort("7000");
return mlflowParameters;
}
private MlflowParameters createModelDeplyDockerComposeParameters() {
MlflowParameters mlflowParameters = new MlflowParameters();
mlflowParameters.setMlflowTaskType(MlflowConstants.MLFLOW_TASK_TYPE_MODELS);
mlflowParameters.setDeployType(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_DOCKER_COMPOSE);
mlflowParameters.setMlflowTrackingUris("http://127.0.0.1:5000");
mlflowParameters.setDeployModelKey("models:/model/1");
mlflowParameters.setDeployPort("7000");
mlflowParameters.setCpuLimit("0.5");
mlflowParameters.setMemoryLimit("200m");
return mlflowParameters;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 11,003 | [BUG-BE][TaskGroupOption] Task group queue is not updated to final state | ### 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
Task group queue is not updated to final state
<img width="1467" alt="image" src="https://user-images.githubusercontent.com/42627702/179254290-b979ab6b-eb80-4fc2-9a1c-3a42e60db60c.png">
### What you expected to happen
Task group queue is updated to final state
### How to reproduce
1. create workflow
2. bind task queue (queue size is 1)
3. start the workflow three times
4. Force a workflow to start second time
### Anything else
### 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/11003 | https://github.com/apache/dolphinscheduler/pull/11004 | a5b3144e53ebea8e89b8c4070330f1eaa7933d0e | d7df89990965155e7695da402dcf322ec276355a | 2022-07-15T15:24:32Z | java | 2022-07-19T09:48:16Z | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.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. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.