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
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
public class ProcessDefinitionServiceTest extends BaseServiceTestTool {
private static final String taskRelationJson =
"[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":123456789,"
+ "\"postTaskVersion\":1,\"conditionType\":0,\"conditionParams\":\"{}\"},{\"name\":\"\",\"preTaskCode\":123456789,"
+ "\"preTaskVersion\":1,\"postTaskCode\":123451234,\"postTaskVersion\":1,\"conditionType\":0,\"conditionParams\":\"{}\"}]";
private static final String taskDefinitionJson =
"[{\"code\":123456789,\"name\":\"test1\",\"version\":1,\"description\":\"\",\"delayTime\":0,\"taskType\":\"SHELL\","
+ "\"taskParams\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"echo 1\",\"dependence\":{},\"conditionResult\":{\"successNode\":[],\"failedNode\":[]},\"waitStartTimeout\":{},"
+ "\"switchResult\":{}},\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"default\",\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\","
+ "\"timeoutNotifyStrategy\":null,\"timeout\":0,\"environmentCode\":-1},{\"code\":123451234,\"name\":\"test2\",\"version\":1,\"description\":\"\",\"delayTime\":0,\"taskType\":\"SHELL\","
+ "\"taskParams\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"echo 2\",\"dependence\":{},\"conditionResult\":{\"successNode\":[],\"failedNode\":[]},\"waitStartTimeout\":{},"
+ "\"switchResult\":{}},\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"default\",\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\","
+ "\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"environmentCode\":-1}]";
@InjectMocks
private ProcessDefinitionServiceImpl processDefinitionService;
@Mock
private ProcessDefinitionMapper processDefinitionMapper;
@Mock
private TaskDefinitionMapper taskDefinitionMapper;
@Mock
private ProcessDefinitionLogMapper processDefinitionLogMapper;
@Mock
private ProcessDefinitionDao processDefinitionDao;
@Mock
private ProcessTaskRelationMapper processTaskRelationMapper;
@Mock
private ProjectMapper projectMapper;
@Mock
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
private ProjectServiceImpl projectService;
@Mock
private ScheduleMapper scheduleMapper;
@Mock
private SchedulerService schedulerService;
@Mock
private ProcessService processService;
@Mock
private TaskDefinitionLogDao taskDefinitionLogDao;
@Mock
private ProcessInstanceService processInstanceService;
@Mock
private TenantMapper tenantMapper;
@Mock
private DataSourceMapper dataSourceMapper;
@Mock
private WorkFlowLineageService workFlowLineageService;
protected User user;
protected Exception exception;
protected final static long projectCode = 1L;
protected final static long projectCodeOther = 2L;
protected final static long processDefinitionCode = 11L;
protected final static String name = "testProcessDefinitionName";
protected final static String description = "this is a description";
protected final static String releaseState = "ONLINE";
protected final static int warningGroupId = 1;
protected final static int timeout = 60;
protected final static String executionType = "PARALLEL";
protected final static String tenantCode = "tenant";
@BeforeEach
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
public void before() {
User loginUser = new User();
loginUser.setId(1);
loginUser.setTenantId(2);
loginUser.setUserType(UserType.GENERAL_USER);
loginUser.setUserName("admin");
user = loginUser;
}
@Test
public void testQueryProcessDefinitionList() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Map<String, Object> map = processDefinitionService.queryProcessDefinitionList(user, projectCode);
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
List<ProcessDefinition> resourceList = new ArrayList<>();
resourceList.add(getProcessDefinition());
Mockito.when(processDefinitionMapper.queryAllDefinitionList(project.getCode())).thenReturn(resourceList);
Map<String, Object> checkSuccessRes =
processDefinitionService.queryProcessDefinitionList(user, projectCode);
Assertions.assertEquals(Status.SUCCESS, checkSuccessRes.get(Constants.STATUS));
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
@Test
public void testQueryProcessDefinitionListPaging() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
try {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(null);
Mockito.doThrow(new ServiceException(Status.PROJECT_NOT_EXIST)).when(projectService)
.checkProjectAndAuthThrowException(user, null, WORKFLOW_DEFINITION);
processDefinitionService.queryProcessDefinitionListPaging(user, projectCode, "", "", 1, 5, 0);
} catch (ServiceException serviceException) {
Assertions.assertEquals(Status.PROJECT_NOT_EXIST.getCode(), serviceException.getCode());
}
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS, projectCode);
user.setId(1);
Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, project,
WORKFLOW_DEFINITION);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project);
PageListingResult<ProcessDefinition> pageListingResult = PageListingResult.<ProcessDefinition>builder()
.records(Collections.emptyList())
.currentPage(1)
.pageSize(10)
.totalCount(30)
.build();
Mockito.when(processDefinitionDao.listingProcessDefinition(
Mockito.eq(0),
Mockito.eq(10),
Mockito.eq(""),
Mockito.eq(1),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.eq(project.getCode()))).thenReturn(pageListingResult);
PageInfo<ProcessDefinition> pageInfo = processDefinitionService.queryProcessDefinitionListPaging(
user, project.getCode(), "", "", 1, 0, 10);
Assertions.assertNotNull(pageInfo);
}
@Test
public void testQueryProcessDefinitionByCode() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Tenant tenant = new Tenant();
tenant.setId(1);
tenant.setTenantCode("root");
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Map<String, Object> map = processDefinitionService.queryProcessDefinitionByCode(user, 1L, 1L);
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
DagData dagData = new DagData(getProcessDefinition(), null, null);
Mockito.when(processService.genDagData(Mockito.any())).thenReturn(dagData);
Map<String, Object> instanceNotexitRes =
processDefinitionService.queryProcessDefinitionByCode(user, projectCode, 1L);
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, instanceNotexitRes.get(Constants.STATUS));
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(getProcessDefinition());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Mockito.when(tenantMapper.queryById(1)).thenReturn(tenant);
Map<String, Object> successRes =
processDefinitionService.queryProcessDefinitionByCode(user, projectCode, 46L);
Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
}
@Test
public void testQueryProcessDefinitionByName() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Map<String, Object> map =
processDefinitionService.queryProcessDefinitionByName(user, projectCode, "test_def");
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Mockito.when(processDefinitionMapper.queryByDefineName(project.getCode(), "test_def")).thenReturn(null);
Map<String, Object> instanceNotExitRes =
processDefinitionService.queryProcessDefinitionByName(user, projectCode, "test_def");
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, instanceNotExitRes.get(Constants.STATUS));
Mockito.when(processDefinitionMapper.queryByDefineName(project.getCode(), "test"))
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
.thenReturn(getProcessDefinition());
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Map<String, Object> successRes =
processDefinitionService.queryProcessDefinitionByName(user, projectCode, "test");
Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
}
@Test
public void testBatchCopyProcessDefinition() {
Project project = getProject(projectCode);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_BATCH_COPY))
.thenReturn(result);
Map<String, Object> map =
processDefinitionService.batchCopyProcessDefinition(user, projectCode, StringUtils.EMPTY, 2L);
Assertions.assertEquals(Status.PROCESS_DEFINITION_CODES_IS_EMPTY, map.get(Constants.STATUS));
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_BATCH_COPY))
.thenReturn(result);
Map<String, Object> map1 = processDefinitionService.batchCopyProcessDefinition(
user, projectCode, String.valueOf(project.getId()), 2L);
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map1.get(Constants.STATUS));
Project project1 = getProject(projectCodeOther);
Mockito.when(projectMapper.queryByCode(projectCodeOther)).thenReturn(project1);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCodeOther, WORKFLOW_BATCH_COPY))
.thenReturn(result);
putMsg(result, Status.SUCCESS, projectCodeOther);
ProcessDefinition definition = getProcessDefinition();
List<ProcessDefinition> processDefinitionList = new ArrayList<>();
processDefinitionList.add(definition);
Set<Long> definitionCodes = new HashSet<>();
for (String code : String.valueOf(processDefinitionCode).split(Constants.COMMA)) {
try {
long parse = Long.parseLong(code);
definitionCodes.add(parse);
} catch (NumberFormatException e) {
Assertions.fail();
}
}
Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList);
Mockito.when(processService.saveProcessDefine(user, definition, Boolean.TRUE, Boolean.TRUE)).thenReturn(2);
Map<String, Object> map3 = processDefinitionService.batchCopyProcessDefinition(
user, projectCodeOther, String.valueOf(processDefinitionCode), projectCode);
Assertions.assertEquals(Status.SUCCESS, map3.get(Constants.STATUS));
}
@Test
public void testBatchMoveProcessDefinition() {
Project project1 = getProject(projectCode);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project1);
Project project2 = getProject(projectCodeOther);
Mockito.when(projectMapper.queryByCode(projectCodeOther)).thenReturn(project2);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS, projectCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(projectService.checkProjectAndAuth(user, project1, projectCode, TASK_DEFINITION_MOVE))
.thenReturn(result);
Mockito.when(projectService.checkProjectAndAuth(user, project2, projectCodeOther, TASK_DEFINITION_MOVE))
.thenReturn(result);
ProcessDefinition definition = getProcessDefinition();
definition.setVersion(1);
List<ProcessDefinition> processDefinitionList = new ArrayList<>();
processDefinitionList.add(definition);
Set<Long> definitionCodes = new HashSet<>();
for (String code : String.valueOf(processDefinitionCode).split(Constants.COMMA)) {
try {
long parse = Long.parseLong(code);
definitionCodes.add(parse);
} catch (NumberFormatException e) {
Assertions.fail();
}
}
Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList);
Mockito.when(processService.saveProcessDefine(user, definition, Boolean.TRUE, Boolean.TRUE)).thenReturn(2);
Mockito.when(processTaskRelationMapper.queryByProcessCode(projectCode, processDefinitionCode))
.thenReturn(getProcessTaskRelation());
putMsg(result, Status.SUCCESS);
Map<String, Object> successRes = processDefinitionService.batchMoveProcessDefinition(
user, projectCode, String.valueOf(processDefinitionCode), projectCodeOther);
Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
}
@Test
public void deleteProcessDefinitionByCodeTest() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Project project = getProject(projectCode);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 2L));
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode());
Mockito.when(processDefinitionMapper.queryByCode(6L)).thenReturn(this.getProcessDefinition());
Mockito.doThrow(new ServiceException(Status.PROJECT_NOT_FOUND)).when(projectService)
.checkProjectAndAuthThrowException(user, project, WORKFLOW_DEFINITION_DELETE);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 6L));
Assertions.assertEquals(Status.PROJECT_NOT_FOUND.getCode(), ((ServiceException) exception).getCode());
Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, project,
WORKFLOW_DEFINITION_DELETE);
Mockito.when(processDefinitionMapper.queryByCode(1L)).thenReturn(null);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 1L));
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode());
ProcessDefinition processDefinition = getProcessDefinition();
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L));
Assertions.assertEquals(Status.USER_NO_OPERATION_PERM.getCode(), ((ServiceException) exception).getCode());
user.setUserType(UserType.ADMIN_USER);
processDefinition.setReleaseState(ReleaseState.ONLINE);
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition);
exception = Assertions.assertThrows(ServiceException.class,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L));
Assertions.assertEquals(Status.PROCESS_DEFINE_STATE_ONLINE.getCode(), ((ServiceException) exception).getCode());
processDefinition.setReleaseState(ReleaseState.OFFLINE);
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition);
Mockito.when(scheduleMapper.queryByProcessDefinitionCode(46L)).thenReturn(getSchedule());
Mockito.when(scheduleMapper.deleteById(46)).thenReturn(1);
Mockito.when(processDefinitionMapper.deleteById(processDefinition.getId())).thenReturn(1);
Mockito.when(processTaskRelationMapper.deleteByCode(project.getCode(), processDefinition.getCode()))
.thenReturn(1);
Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), processDefinition.getCode()))
.thenReturn(Collections.emptySet());
processDefinitionService.deleteProcessDefinitionByCode(user, 46L);
Schedule schedule = getSchedule();
schedule.setReleaseState(ReleaseState.ONLINE);
Mockito.when(scheduleMapper.queryByProcessDefinitionCode(46L)).thenReturn(schedule);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L));
Assertions.assertEquals(Status.SCHEDULE_STATE_ONLINE.getCode(), ((ServiceException) exception).getCode());
user.setUserType(UserType.ADMIN_USER);
TaskMainInfo taskMainInfo = getTaskMainInfo().get(0);
Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), processDefinition.getCode()))
.thenReturn(ImmutableSet.copyOf(getTaskMainInfo()));
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L));
Assertions.assertEquals(Status.DELETE_PROCESS_DEFINITION_USE_BY_OTHER_FAIL.getCode(),
((ServiceException) exception).getCode());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
schedule.setReleaseState(ReleaseState.OFFLINE);
Mockito.when(processTaskRelationMapper.queryByProcessCode(1, 11))
.thenReturn(getProcessTaskRelation());
Mockito.when(taskDefinitionMapper.deleteByBatchCodes(Arrays.asList(100L, 200L))).thenReturn(2);
Mockito.when(processDefinitionMapper.deleteById(46)).thenReturn(1);
Mockito.when(scheduleMapper.deleteById(schedule.getId())).thenReturn(1);
Mockito.when(processTaskRelationMapper.deleteByCode(project.getCode(), processDefinition.getCode()))
.thenReturn(1);
Mockito.when(scheduleMapper.queryByProcessDefinitionCode(46L)).thenReturn(getSchedule());
Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), processDefinition.getCode()))
.thenReturn(Collections.emptySet());
Assertions.assertDoesNotThrow(() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L));
Mockito.when(taskDefinitionMapper.deleteByBatchCodes(Arrays.asList(100L, 200L))).thenReturn(1);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L));
Assertions.assertEquals(Status.DELETE_TASK_DEFINE_BY_CODE_ERROR.getCode(),
((ServiceException) exception).getCode());
}
@Test
public void batchDeleteProcessDefinitionByCodeTest() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
final String twoCodes = "11,12";
Set<Long> definitionCodes = Lists.newArrayList(twoCodes.split(Constants.COMMA)).stream()
.map(Long::parseLong).collect(Collectors.toSet());
ProcessDefinition process = getProcessDefinition();
List<ProcessDefinition> processDefinitionList = new ArrayList<>();
processDefinitionList.add(process);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList);
Throwable exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.batchDeleteProcessDefinitionByCodes(user, projectCode, twoCodes));
String formatter = MessageFormat.format(Status.BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR.getMsg(),
"12[process definition not exist]");
Assertions.assertEquals(formatter, exception.getMessage());
Map<String, Object> result = new HashMap<>();
final String singleCodes = "11";
definitionCodes = Lists.newArrayList(singleCodes.split(Constants.COMMA)).stream().map(Long::parseLong)
.collect(Collectors.toSet());
Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList);
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(process);
user.setUserType(UserType.ADMIN_USER);
putMsg(result, Status.SUCCESS, projectCode);
process.setReleaseState(ReleaseState.ONLINE);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.batchDeleteProcessDefinitionByCodes(user, projectCode, singleCodes));
String subFormatter =
MessageFormat.format(Status.PROCESS_DEFINE_STATE_ONLINE.getMsg(), process.getName());
formatter =
MessageFormat.format(Status.DELETE_PROCESS_DEFINE_ERROR.getMsg(), process.getName(), subFormatter);
Assertions.assertEquals(formatter, exception.getMessage());
process.setReleaseState(ReleaseState.OFFLINE);
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(process);
Mockito.when(processDefinitionMapper.deleteById(process.getId())).thenReturn(1);
Mockito.when(processTaskRelationMapper.deleteByCode(project.getCode(), process.getCode()))
.thenReturn(1);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), process.getCode()))
.thenReturn(Collections.emptySet());
putMsg(result, Status.SUCCESS, projectCode);
Map<String, Object> deleteSuccess =
processDefinitionService.batchDeleteProcessDefinitionByCodes(user, projectCode, singleCodes);
Assertions.assertEquals(Status.SUCCESS, deleteSuccess.get(Constants.STATUS));
}
@Test
public void testReleaseProcessDefinition() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_ONLINE_OFFLINE))
.thenReturn(result);
Map<String, Object> map = processDefinitionService.releaseProcessDefinition(user, projectCode,
processDefinitionCode, ReleaseState.OFFLINE);
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(getProcessDefinition());
List<ProcessTaskRelation> processTaskRelationList = new ArrayList<>();
ProcessTaskRelation processTaskRelation = new ProcessTaskRelation();
processTaskRelation.setProjectCode(projectCode);
processTaskRelation.setProcessDefinitionCode(46L);
processTaskRelation.setPostTaskCode(123L);
processTaskRelationList.add(processTaskRelation);
Mockito.when(processService.findRelationByCode(46L, 1)).thenReturn(processTaskRelationList);
Map<String, Object> onlineRes =
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
processDefinitionService.releaseProcessDefinition(user, projectCode, 46, ReleaseState.ONLINE);
Assertions.assertEquals(Status.SUCCESS, onlineRes.get(Constants.STATUS));
Map<String, Object> onlineWithResourceRes =
processDefinitionService.releaseProcessDefinition(user, projectCode, 46, ReleaseState.ONLINE);
Assertions.assertEquals(Status.SUCCESS, onlineWithResourceRes.get(Constants.STATUS));
Map<String, Object> failRes =
processDefinitionService.releaseProcessDefinition(user, projectCode, 46, ReleaseState.getEnum(2));
Assertions.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, failRes.get(Constants.STATUS));
}
@Test
public void testVerifyProcessDefinitionName() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_CREATE))
.thenReturn(result);
Map<String, Object> map = processDefinitionService.verifyProcessDefinitionName(user,
projectCode, "test_pdf", 0);
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), "test_pdf")).thenReturn(null);
Map<String, Object> processNotExistRes =
processDefinitionService.verifyProcessDefinitionName(user, projectCode, "test_pdf", 0);
Assertions.assertEquals(Status.SUCCESS, processNotExistRes.get(Constants.STATUS));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), "test_pdf"))
.thenReturn(getProcessDefinition());
Map<String, Object> processExistRes = processDefinitionService.verifyProcessDefinitionName(user,
projectCode, "test_pdf", 0);
Assertions.assertEquals(Status.PROCESS_DEFINITION_NAME_EXIST, processExistRes.get(Constants.STATUS));
}
@Test
public void testCheckProcessNodeList() {
Map<String, Object> dataNotValidRes = processDefinitionService.checkProcessNodeList(null, null);
Assertions.assertEquals(Status.DATA_IS_NOT_VALID, dataNotValidRes.get(Constants.STATUS));
List<TaskDefinitionLog> taskDefinitionLogs = JSONUtils.toList(taskDefinitionJson, TaskDefinitionLog.class);
Map<String, Object> taskEmptyRes =
processDefinitionService.checkProcessNodeList(taskRelationJson, taskDefinitionLogs);
Assertions.assertEquals(Status.PROCESS_DAG_IS_EMPTY, taskEmptyRes.get(Constants.STATUS));
}
@Test
public void testGetTaskNodeListByDefinitionCode() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, null)).thenReturn(result);
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(null);
Map<String, Object> processDefinitionNullRes =
processDefinitionService.getTaskNodeListByDefinitionCode(user, projectCode, 46L);
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, processDefinitionNullRes.get(Constants.STATUS));
ProcessDefinition processDefinition = getProcessDefinition();
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(processService.genDagData(Mockito.any())).thenReturn(new DagData(processDefinition, null, null));
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition);
Map<String, Object> dataNotValidRes =
processDefinitionService.getTaskNodeListByDefinitionCode(user, projectCode, 46L);
Assertions.assertEquals(Status.SUCCESS, dataNotValidRes.get(Constants.STATUS));
}
@Test
public void testGetTaskNodeListByDefinitionCodes() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, null)).thenReturn(result);
String defineCodes = "46";
Set<Long> defineCodeSet = Lists.newArrayList(defineCodes.split(Constants.COMMA)).stream().map(Long::parseLong)
.collect(Collectors.toSet());
Mockito.when(processDefinitionMapper.queryByCodes(defineCodeSet)).thenReturn(null);
Map<String, Object> processNotExistRes =
processDefinitionService.getNodeListMapByDefinitionCodes(user, projectCode, defineCodes);
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, processNotExistRes.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
ProcessDefinition processDefinition = getProcessDefinition();
List<ProcessDefinition> processDefinitionList = new ArrayList<>();
processDefinitionList.add(processDefinition);
Mockito.when(processDefinitionMapper.queryByCodes(defineCodeSet)).thenReturn(processDefinitionList);
Mockito.when(processService.genDagData(Mockito.any())).thenReturn(new DagData(processDefinition, null, null));
Project project1 = getProject(projectCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
List<Project> projects = new ArrayList<>();
projects.add(project1);
Mockito.when(projectMapper.queryProjectCreatedAndAuthorizedByUserId(user.getId())).thenReturn(projects);
Map<String, Object> successRes =
processDefinitionService.getNodeListMapByDefinitionCodes(user, projectCode, defineCodes);
Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
}
@Test
public void testQueryAllProcessDefinitionByProjectCode() {
Map<String, Object> result = new HashMap<>();
Project project = getProject(projectCode);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project);
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
ProcessDefinition processDefinition = getProcessDefinition();
List<ProcessDefinition> processDefinitionList = new ArrayList<>();
processDefinitionList.add(processDefinition);
Mockito.when(processDefinitionMapper.queryAllDefinitionList(projectCode)).thenReturn(processDefinitionList);
Map<String, Object> successRes =
processDefinitionService.queryAllProcessDefinitionByProjectCode(user, projectCode);
Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
}
@Test
public void testViewTree() {
Project project1 = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectMapper.queryByCode(1)).thenReturn(project1);
Mockito.when(projectService.checkProjectAndAuth(user, project1, projectCode, WORKFLOW_TREE_VIEW))
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
.thenReturn(result);
ProcessDefinition processDefinition = getProcessDefinition();
Map<String, Object> processDefinitionNullRes =
processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10);
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, processDefinitionNullRes.get(Constants.STATUS));
putMsg(result, Status.SUCCESS, projectCode);
Mockito.when(projectMapper.queryByCode(1)).thenReturn(project1);
Mockito.when(projectService.checkProjectAndAuth(user, project1, 1, WORKFLOW_TREE_VIEW)).thenReturn(result);
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition);
Mockito.when(processService.genDagGraph(processDefinition)).thenReturn(new DAG<>());
Map<String, Object> taskNullRes =
processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10);
Assertions.assertEquals(Status.SUCCESS, taskNullRes.get(Constants.STATUS));
Map<String, Object> taskNotNuLLRes =
processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10);
Assertions.assertEquals(Status.SUCCESS, taskNotNuLLRes.get(Constants.STATUS));
}
@Test
public void testSubProcessViewTree() {
ProcessDefinition processDefinition = getProcessDefinition();
Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition);
Project project1 = getProject(1);
Map<String, Object> result = new HashMap<>();
result.put(Constants.STATUS, Status.SUCCESS);
Mockito.when(projectMapper.queryByCode(1)).thenReturn(project1);
Mockito.when(projectService.checkProjectAndAuth(user, project1, 1, WORKFLOW_TREE_VIEW)).thenReturn(result);
Mockito.when(processService.genDagGraph(processDefinition)).thenReturn(new DAG<>());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(processTaskRelationMapper.queryByProcessCode(projectCode, processDefinitionCode))
.thenReturn(getProcessTaskRelation());
Mockito.when(taskDefinitionLogDao.getTaskDefineLogList(any())).thenReturn(new ArrayList<>());
Map<String, Object> taskNotNuLLRes =
processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10);
Assertions.assertEquals(Status.SUCCESS, taskNotNuLLRes.get(Constants.STATUS));
}
@Test
public void testUpdateProcessDefinition() {
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS);
Project project = getProject(projectCode);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_UPDATE))
.thenReturn(result);
Mockito.when(projectService.hasProjectAndWritePerm(user, project, result)).thenReturn(true);
try {
processDefinitionService.updateProcessDefinition(user, projectCode, "test", 1,
"", "", "", 0, "root", null, "", null, ProcessExecutionTypeEnum.PARALLEL);
Assertions.fail();
} catch (ServiceException ex) {
Assertions.assertEquals(Status.DATA_IS_NOT_VALID.getCode(), ex.getCode());
}
}
@Test
public void testBatchExportProcessDefinitionByCodes() {
processDefinitionService.batchExportProcessDefinitionByCodes(null, 1L, null, null);
Project project = getProject(projectCode);
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
processDefinitionService.batchExportProcessDefinitionByCodes(user, projectCode, "1", null);
ProcessDefinition processDefinition = new ProcessDefinition();
processDefinition.setId(1);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project);
HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
DagData dagData = new DagData(getProcessDefinition(), null, null);
Mockito.when(processService.genDagData(Mockito.any())).thenReturn(dagData);
processDefinitionService.batchExportProcessDefinitionByCodes(user, projectCode, "1", response);
Assertions.assertNotNull(processDefinitionService.exportProcessDagData(processDefinition));
}
@Test
public void testImportSqlProcessDefinition() throws Exception {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ZipOutputStream outputStream = new ZipOutputStream(byteArrayOutputStream);
outputStream.putNextEntry(new ZipEntry("import_sql/"));
outputStream.putNextEntry(new ZipEntry("import_sql/a.sql"));
outputStream.write(
"-- upstream: start_auto_dag\n-- datasource: mysql_1\nselect 1;".getBytes(StandardCharsets.UTF_8));
outputStream.putNextEntry(new ZipEntry("import_sql/b.sql"));
outputStream
.write("-- name: start_auto_dag\n-- datasource: mysql_1\nselect 1;".getBytes(StandardCharsets.UTF_8));
outputStream.close();
MockMultipartFile mockMultipartFile =
new MockMultipartFile("import_sql.zip", byteArrayOutputStream.toByteArray());
DataSource dataSource = Mockito.mock(DataSource.class);
Mockito.when(dataSource.getId()).thenReturn(1);
Mockito.when(dataSource.getType()).thenReturn(DbType.MYSQL);
Mockito.when(dataSourceMapper.queryDataSourceByNameAndUserId(user.getId(), "mysql_1")).thenReturn(dataSource);
Project project = getProject(projectCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Map<String, Object> result = new HashMap<>();
result.put(Constants.STATUS, Status.SUCCESS);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_IMPORT))
.thenReturn(result);
Mockito.when(processService.saveTaskDefine(Mockito.same(user), Mockito.eq(projectCode), Mockito.notNull(),
Mockito.anyBoolean())).thenReturn(2);
Mockito.when(processService.saveProcessDefine(Mockito.same(user), Mockito.notNull(), Mockito.notNull(),
Mockito.anyBoolean())).thenReturn(1);
Mockito.when(
processService.saveTaskRelation(Mockito.same(user), Mockito.eq(projectCode), Mockito.anyLong(),
Mockito.eq(1), Mockito.notNull(), Mockito.notNull(), Mockito.anyBoolean()))
.thenReturn(0);
result = processDefinitionService.importSqlProcessDefinition(user, projectCode, mockMultipartFile);
Assertions.assertEquals(result.get(Constants.STATUS), Status.SUCCESS);
}
@Test
public void testGetNewProcessName() {
String processName1 = "test_copy_" + DateUtils.getCurrentTimeStamp();
final String newName1 = processDefinitionService.getNewName(processName1, Constants.COPY_SUFFIX);
Assertions.assertEquals(2, newName1.split(Constants.COPY_SUFFIX).length);
String processName2 = "wf_copy_all_ods_data_to_d";
final String newName2 = processDefinitionService.getNewName(processName2, Constants.COPY_SUFFIX);
Assertions.assertEquals(3, newName2.split(Constants.COPY_SUFFIX).length);
String processName3 = "test_import_" + DateUtils.getCurrentTimeStamp();
final String newName3 = processDefinitionService.getNewName(processName3, Constants.IMPORT_SUFFIX);
Assertions.assertEquals(2, newName3.split(Constants.IMPORT_SUFFIX).length);
}
@Test
public void testCreateProcessDefinitionV2() {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Project project = this.getProject(projectCode);
WorkflowCreateRequest workflowCreateRequest = new WorkflowCreateRequest();
workflowCreateRequest.setName(name);
workflowCreateRequest.setProjectCode(projectCode);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest));
Assertions.assertEquals(Status.PROJECT_NOT_FOUND.getCode(), ((ServiceException) exception).getCode());
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project);
Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM)).when(projectService)
.checkProjectAndAuthThrowException(user, project, WORKFLOW_CREATE);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest));
Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(),
((ServiceException) exception).getCode());
workflowCreateRequest.setDescription(taskDefinitionJson);
Mockito.doThrow(new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR)).when(projectService)
.checkProjectAndAuthThrowException(user, project, WORKFLOW_CREATE);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest));
Assertions.assertEquals(Status.DESCRIPTION_TOO_LONG_ERROR.getCode(), ((ServiceException) exception).getCode());
workflowCreateRequest.setDescription(EMPTY_STRING);
Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, project, WORKFLOW_CREATE);
Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), name))
.thenReturn(this.getProcessDefinition());
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Assertions.assertEquals(Status.PROCESS_DEFINITION_NAME_EXIST.getCode(),
((ServiceException) exception).getCode());
Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), name)).thenReturn(null);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest));
Assertions.assertEquals(Status.TENANT_NOT_EXIST.getCode(), ((ServiceException) exception).getCode());
workflowCreateRequest.setTenantCode(DEFAULT);
workflowCreateRequest.setDescription(description);
workflowCreateRequest.setTimeout(timeout);
workflowCreateRequest.setReleaseState(releaseState);
workflowCreateRequest.setWarningGroupId(warningGroupId);
workflowCreateRequest.setExecutionType(executionType);
Mockito.when(processDefinitionLogMapper.insert(Mockito.any())).thenReturn(1);
Mockito.when(processDefinitionMapper.insert(Mockito.any())).thenReturn(1);
ProcessDefinition processDefinition =
processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest);
Assertions.assertTrue(processDefinition.getCode() > 0L);
Assertions.assertEquals(workflowCreateRequest.getName(), processDefinition.getName());
Assertions.assertEquals(workflowCreateRequest.getDescription(), processDefinition.getDescription());
Assertions.assertTrue(StringUtils.endsWithIgnoreCase(workflowCreateRequest.getReleaseState(),
processDefinition.getReleaseState().getDescp()));
Assertions.assertEquals(workflowCreateRequest.getTimeout(), processDefinition.getTimeout());
Assertions.assertTrue(StringUtils.endsWithIgnoreCase(workflowCreateRequest.getExecutionType(),
processDefinition.getExecutionType().getDescp()));
}
@Test
public void testFilterProcessDefinition() {
Project project = this.getProject(projectCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
WorkflowFilterRequest workflowFilterRequest = new WorkflowFilterRequest();
workflowFilterRequest.setProjectName(project.getName());
Mockito.when(projectMapper.queryByName(project.getName())).thenReturn(project);
Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM, user.getUserName(), projectCode))
.when(projectService).checkProjectAndAuthThrowException(user, project, WORKFLOW_DEFINITION);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.filterProcessDefinition(user, workflowFilterRequest));
Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(),
((ServiceException) exception).getCode());
}
@Test
public void testGetProcessDefinition() {
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.getProcessDefinition(user, processDefinitionCode));
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode());
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode))
.thenReturn(this.getProcessDefinition());
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(this.getProject(projectCode));
Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM, user.getUserName(), projectCode))
.when(projectService)
.checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_DEFINITION);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.getProcessDefinition(user, processDefinitionCode));
Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(),
((ServiceException) exception).getCode());
Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, this.getProject(projectCode),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
WORKFLOW_DEFINITION);
ProcessDefinition processDefinition =
processDefinitionService.getProcessDefinition(user, processDefinitionCode);
Assertions.assertEquals(this.getProcessDefinition(), processDefinition);
}
@Test
public void testUpdateProcessDefinitionV2() {
ProcessDefinition processDefinition;
WorkflowUpdateRequest workflowUpdateRequest = new WorkflowUpdateRequest();
workflowUpdateRequest.setName(name);
exception = Assertions.assertThrows(ServiceException.class,
() -> processDefinitionService.getProcessDefinition(user, processDefinitionCode));
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode());
processDefinition = this.getProcessDefinition();
processDefinition.setReleaseState(ReleaseState.ONLINE);
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition);
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService
.updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest));
Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT.getCode(),
((ServiceException) exception).getCode());
processDefinition = this.getProcessDefinition();
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition);
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(this.getProject(projectCode));
Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM, user.getUserName(), projectCode))
.when(projectService)
.checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_DEFINITION);
exception = Assertions.assertThrows(ServiceException.class,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
() -> processDefinitionService.getProcessDefinition(user, processDefinitionCode));
Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(),
((ServiceException) exception).getCode());
workflowUpdateRequest.setDescription(taskDefinitionJson);
Mockito.doThrow(new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR)).when(projectService)
.checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_UPDATE);
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService
.updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest));
Assertions.assertEquals(Status.DESCRIPTION_TOO_LONG_ERROR.getCode(), ((ServiceException) exception).getCode());
workflowUpdateRequest.setDescription(EMPTY_STRING);
Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, this.getProject(projectCode),
WORKFLOW_UPDATE);
Mockito.when(processDefinitionMapper.verifyByDefineName(projectCode, workflowUpdateRequest.getName()))
.thenReturn(this.getProcessDefinition());
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService
.updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest));
Assertions.assertEquals(Status.PROCESS_DEFINITION_NAME_EXIST.getCode(),
((ServiceException) exception).getCode());
processDefinition = this.getProcessDefinition();
workflowUpdateRequest.setTenantCode(tenantCode);
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition);
Mockito.when(processDefinitionMapper.verifyByDefineName(projectCode, workflowUpdateRequest.getName()))
.thenReturn(null);
Mockito.when(tenantMapper.queryByTenantCode(workflowUpdateRequest.getTenantCode())).thenReturn(null);
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService
.updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest));
Assertions.assertEquals(Status.TENANT_NOT_EXIST.getCode(), ((ServiceException) exception).getCode());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
workflowUpdateRequest.setTenantCode(null);
workflowUpdateRequest.setName(name);
Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition);
Mockito.when(processDefinitionLogMapper.insert(Mockito.any())).thenReturn(1);
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService
.updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest));
Assertions.assertEquals(Status.UPDATE_PROCESS_DEFINITION_ERROR.getCode(),
((ServiceException) exception).getCode());
Mockito.when(processDefinitionLogMapper.queryMaxVersionForDefinition(processDefinition.getCode()))
.thenReturn(processDefinition.getVersion());
Mockito.when(processDefinitionMapper.updateById(isA(ProcessDefinition.class))).thenReturn(1);
ProcessDefinition processDefinitionUpdate =
processDefinitionService.updateSingleProcessDefinition(user, processDefinitionCode,
workflowUpdateRequest);
Assertions.assertNotNull(processDefinitionUpdate);
Assertions.assertEquals(processDefinition.getVersion() + 1, processDefinitionUpdate.getVersion());
}
@Test
public void testCheckVersion() {
WorkflowFilterRequest workflowFilterRequest = new WorkflowFilterRequest();
workflowFilterRequest.setWorkflowName(name);
}
@Test
public void testViewVariables() {
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
Project project = getProject(projectCode);
ProcessDefinition processDefinition = getProcessDefinition();
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
Map<String, Object> result = new HashMap<>();
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode);
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION))
.thenReturn(result);
Map<String, Object> map =
processDefinitionService.viewVariables(user, processDefinition.getProjectCode(),
processDefinition.getCode());
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS));
}
/**
* get mock processDefinition
*
* @return ProcessDefinition
*/
private ProcessDefinition getProcessDefinition() {
ProcessDefinition processDefinition = new ProcessDefinition();
processDefinition.setId(46);
processDefinition.setProjectCode(1L);
processDefinition.setName("test_pdf");
processDefinition.setTenantId(1);
processDefinition.setDescription("");
processDefinition.setCode(processDefinitionCode);
processDefinition.setProjectCode(projectCode);
processDefinition.setVersion(1);
return processDefinition;
}
/**
* get mock Project
*
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
* @param projectCode projectCode
* @return Project
*/
private Project getProject(long projectCode) {
Project project = new Project();
project.setCode(projectCode);
project.setId(1);
project.setName("test");
project.setUserId(1);
return project;
}
private List<ProcessTaskRelation> getProcessTaskRelation() {
List<ProcessTaskRelation> processTaskRelations = new ArrayList<>();
ProcessTaskRelation processTaskRelation = new ProcessTaskRelation();
processTaskRelation.setProjectCode(projectCode);
processTaskRelation.setProcessDefinitionCode(46L);
processTaskRelation.setProcessDefinitionVersion(1);
processTaskRelation.setPreTaskCode(100);
processTaskRelation.setPostTaskCode(200);
processTaskRelations.add(processTaskRelation);
return processTaskRelations;
}
/**
* get mock schedule
*
* @return schedule
*/
private Schedule getSchedule() {
Date date = new Date();
Schedule schedule = new Schedule();
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
|
schedule.setId(46);
schedule.setProcessDefinitionCode(1);
schedule.setStartTime(date);
schedule.setEndTime(date);
schedule.setCrontab("0 0 5 * * ? *");
schedule.setFailureStrategy(FailureStrategy.END);
schedule.setUserId(1);
schedule.setReleaseState(ReleaseState.OFFLINE);
schedule.setProcessInstancePriority(Priority.MEDIUM);
schedule.setWarningType(WarningType.NONE);
schedule.setWarningGroupId(1);
schedule.setWorkerGroup(Constants.DEFAULT_WORKER_GROUP);
return schedule;
}
/**
* get mock task main info
*
* @return schedule
*/
private List<TaskMainInfo> getTaskMainInfo() {
List<TaskMainInfo> taskMainInfos = new ArrayList<>();
TaskMainInfo taskMainInfo = new TaskMainInfo();
taskMainInfo.setId(1);
taskMainInfo.setProcessDefinitionName("process");
taskMainInfo.setTaskName("task");
taskMainInfos.add(taskMainInfo);
return taskMainInfos;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.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.
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
|
*/
package org.apache.dolphinscheduler.dao.entity;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.ProcessExecutionTypeEnum;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.google.common.base.Strings;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_ds_process_definition")
public class ProcessDefinition {
/**
* id
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
|
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* code
*/
private long code;
/**
* name
*/
private String name;
/**
* version
*/
private int version;
/**
* release state : online/offline
*/
private ReleaseState releaseState;
/**
* project code
*/
private long projectCode;
/**
* description
*/
private String description;
/**
* user defined parameters
*/
private String globalParams;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
|
/**
* user defined parameter list
*/
@TableField(exist = false)
private List<Property> globalParamList;
/**
* user define parameter map
*/
@TableField(exist = false)
private Map<String, String> globalParamMap;
/**
* create time
*/
private Date createTime;
/**
* update time
*/
private Date updateTime;
/**
* process is valid: yes/no
*/
private Flag flag;
/**
* process user id
*/
private int userId;
/**
* user name
*/
@TableField(exist = false)
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
|
private String userName;
/**
* project name
*/
@TableField(exist = false)
private String projectName;
/**
* locations array for web
*/
private String locations;
/**
* schedule release state : online/offline
*/
@TableField(exist = false)
private ReleaseState scheduleReleaseState;
/**
* process warning time out. unit: minute
*/
private int timeout;
/**
* tenant id
*/
private int tenantId;
/**
* tenant code
*/
@TableField(exist = false)
private String tenantCode;
/**
* modify user name
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
|
*/
@TableField(exist = false)
private String modifyBy;
/**
* warningGroupId
*/
@TableField(exist = false)
private Integer warningGroupId;
/**
* execution type
*/
private ProcessExecutionTypeEnum executionType;
public ProcessDefinition(long projectCode,
String name,
long code,
String description,
String globalParams,
String locations,
int timeout,
int userId,
int tenantId) {
set(projectCode, name, description, globalParams, locations, timeout, tenantId);
this.code = code;
this.userId = userId;
Date date = new Date();
this.createTime = date;
this.updateTime = date;
}
public void set(long projectCode,
String name,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,260 |
[Bug] [API] When querying the list of workflow definitions the api response result lacks the value of user name.
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When querying the list of workflow definitions the api response result lacks the value of user name.

### What you expected to happen
I expect that the user name of workflow definition can be displayed.
### How to reproduce
1.Visit the workflow definition.
2.Look at the column 'Create User' on the table of workflow definitions.
### 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/13260
|
https://github.com/apache/dolphinscheduler/pull/13261
|
a235d3cd6a0f889b4793f81b07aaa73ba23c2412
|
a98cae70651af32fe83ad7206388b8fcd9698059
| 2022-12-22T09:53:01Z |
java
| 2022-12-23T11:22:08Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
|
String description,
String globalParams,
String locations,
int timeout,
int tenantId) {
this.projectCode = projectCode;
this.name = name;
this.description = description;
this.globalParams = globalParams;
this.locations = locations;
this.timeout = timeout;
this.tenantId = tenantId;
this.flag = Flag.YES;
}
public void setGlobalParams(String globalParams) {
this.globalParamList = JSONUtils.toList(globalParams, Property.class);
if (this.globalParamList == null) {
this.globalParamList = new ArrayList<>();
}
this.globalParams = globalParams;
}
public Map<String, String> getGlobalParamMap() {
if (globalParamMap == null && !Strings.isNullOrEmpty(globalParams)) {
List<Property> propList = JSONUtils.toList(globalParams, Property.class);
globalParamMap = propList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue));
}
return globalParamMap;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.api.service.impl;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_START;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_COMPLEMENT_DATA_END_DATE;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_COMPLEMENT_DATA_START_DATE;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_START_NODES;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_START_PARAMS;
import static org.apache.dolphinscheduler.common.constants.CommandKeyConstants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE;
import static org.apache.dolphinscheduler.common.constants.Constants.COMMA;
import static org.apache.dolphinscheduler.common.constants.Constants.MAX_TASK_TIMEOUT;
import static org.apache.dolphinscheduler.common.constants.Constants.SCHEDULE_TIME_MAX_LENGTH;
import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant;
import org.apache.dolphinscheduler.api.dto.workflowInstance.WorkflowExecuteResponse;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ServiceException;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.service.MonitorService;
import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.api.service.WorkerGroupService;
import org.apache.dolphinscheduler.common.constants.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
import org.apache.dolphinscheduler.common.enums.CycleEnum;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.RunMode;
import org.apache.dolphinscheduler.common.enums.T;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
import org.apache.dolphinscheduler.common.model.Server;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.Command;
import org.apache.dolphinscheduler.dao.entity.DependentProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.dao.entity.TaskDefinition;
import org.apache.dolphinscheduler.dao.entity.TaskGroupQueue;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionLogMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper;
import org.apache.dolphinscheduler.dao.repository.ProcessInstanceDao;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
import org.apache.dolphinscheduler.remote.command.TaskExecuteStartCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataRequestCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataResponseCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowStateEventChangeCommand;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
import org.apache.dolphinscheduler.remote.processor.StateEventCallbackService;
import org.apache.dolphinscheduler.remote.utils.Host;
import org.apache.dolphinscheduler.service.command.CommandService;
import org.apache.dolphinscheduler.service.cron.CronUtils;
import org.apache.dolphinscheduler.service.exceptions.CronParseException;
import org.apache.dolphinscheduler.service.process.ProcessService;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.Lists;
/**
* executor service impl
*/
@Service
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorService {
private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceImpl.class);
@Autowired
private ProjectMapper projectMapper;
@Autowired
private ProjectService projectService;
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
@Autowired
ProcessDefinitionMapper processDefineMapper;
@Autowired
private MonitorService monitorService;
@Autowired
private ProcessInstanceMapper processInstanceMapper;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
@Autowired
private ProcessService processService;
@Autowired
private CommandService commandService;
@Autowired
private ProcessInstanceDao processInstanceDao;
@Autowired
private TaskDefinitionLogMapper taskDefinitionLogMapper;
@Autowired
private StateEventCallbackService stateEventCallbackService;
@Autowired
private TaskDefinitionMapper taskDefinitionMapper;
@Autowired
private ProcessTaskRelationMapper processTaskRelationMapper;
@Autowired
private TaskGroupQueueMapper taskGroupQueueMapper;
@Autowired
private WorkerGroupService workerGroupService;
/**
* execute process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode code
* @param cronTime cron time
* @param commandType command type
* @param failureStrategy failure strategy
* @param s start nodelist
* @param t node dependency type
* @param warningType warning type
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param warningGroupId notify group id
* @param processInstancePriority process instance priority
* @param workerGroup worker group name
* @param environmentCode environment code
* @param runMode run mode
* @param timeout timeout
* @param startParams the global param values which pass to new process instance
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
* @param testFlag testFlag
* @return execute process instance code
*/
@Override
public Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode,
String cronTime, CommandType commandType,
FailureStrategy failureStrategy, String s,
T t, WarningType warningType,
Integer warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup,
Long environmentCode, Integer timeout,
Map<String, String> startParams, Integer expectedParallelismNumber,
int dryRun, int testFlag,
ComplementDependentMode complementDependentMode) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) {
logger.warn("Parameter timeout is invalid, timeout:{}.", timeout);
putMsg(result, Status.TASK_TIMEOUT_PARAMS_ERROR);
return result;
}
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
this.checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode,
processDefinition.getVersion());
if (!checkTenantSuitable(processDefinition)) {
logger.error(
"There is not any valid tenant for the , processDefinitionCode:{}, processDefinitionName:{}.",
processDefinition.getCode(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
return result;
}
if (!checkScheduleTimeNum(commandType, cronTime)) {
putMsg(result, Status.SCHEDULE_TIME_NUMBER);
return result;
}
if (!checkMasterExists(result)) {
return result;
}
/**
* create command
*/
int create =
this.createCommand(commandType, processDefinition.getCode(), t, failureStrategy,
s,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority,
workerGroup,
environmentCode, startParams, expectedParallelismNumber, dryRun, testFlag,
complementDependentMode);
if (create > 0) {
processDefinition.setWarningGroupId(warningGroupId);
processDefinitionMapper.updateById(processDefinition);
logger.info("Create command complete, processDefinitionCode:{}, commandCount:{}.",
processDefinition.getCode(), create);
putMsg(result, Status.SUCCESS);
} else {
logger.error("Start process instance failed because create command error, processDefinitionCode:{}.",
processDefinition.getCode());
putMsg(result, Status.START_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* check whether master exists
*
* @param result result
* @return master exists return true , otherwise return false
*/
private boolean checkMasterExists(Map<String, Object> result) {
List<Server> masterServers = monitorService.getServerListFromRegistry(true);
if (masterServers.isEmpty()) {
logger.error("Master does not exist.");
putMsg(result, Status.MASTER_NOT_EXISTS);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return false;
}
return true;
}
/**
* @param complementData
* @param cronTime
* @return CommandType is COMPLEMENT_DATA and cronTime's number is not greater than 100 return true , otherwise return false
*/
private boolean checkScheduleTimeNum(CommandType complementData, String cronTime) {
if (!CommandType.COMPLEMENT_DATA.equals(complementData)) {
return true;
}
if (cronTime == null) {
return true;
}
Map<String, String> cronMap = JSONUtils.toMap(cronTime);
if (cronMap.containsKey(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
String[] stringDates = cronMap.get(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).split(COMMA);
if (stringDates.length > SCHEDULE_TIME_MAX_LENGTH) {
logger.warn("Parameter cornTime is bigger than {}.", SCHEDULE_TIME_MAX_LENGTH);
return false;
}
}
return true;
}
/**
* check whether the can be executed
*
* @param projectCode project code
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param processDefinition
* @param processDefineCode code
* @param version process instance version
*/
@Override
public void checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition,
long processDefineCode, Integer version) {
if (processDefinition == null || projectCode != processDefinition.getProjectCode()) {
throw new ServiceException(Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode));
}
if (processDefinition.getReleaseState() != ReleaseState.ONLINE) {
throw new ServiceException(Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version);
}
if (!checkSubProcessDefinitionValid(processDefinition)) {
throw new ServiceException(Status.SUB_PROCESS_DEFINE_NOT_RELEASE);
}
}
/**
* check whether the current process has subprocesses and validate all subprocesses
*
* @param processDefinition
* @return check result
*/
@Override
public boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition) {
List<ProcessTaskRelation> processTaskRelations =
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode());
if (processTaskRelations.isEmpty()) {
return true;
}
Set<Long> relationCodes =
processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet());
List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryByCodeList(relationCodes);
Set<Long> processDefinitionCodeSet = new HashSet<>();
taskDefinitions.stream()
.filter(task -> TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach(
taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(
JSONUtils.getNodeString(taskDefinition.getTaskParams(),
CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));
if (processDefinitionCodeSet.isEmpty()) {
return true;
}
List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryByCodes(processDefinitionCodeSet);
return processDefinitions.stream()
.filter(definition -> definition.getReleaseState().equals(ReleaseState.OFFLINE))
.collect(Collectors.toSet())
.isEmpty();
}
/**
* do action to process instance:pause, stop, repeat, recover from pause, recover from stop,rerun failed task
*
* @param loginUser login user
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param projectCode project code
* @param processInstanceId process instance id
* @param executeType execute type
* @return execute result code
*/
@Override
public Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId,
ExecuteType executeType) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,
ApiFuncIdentificationConstant.map.get(executeType));
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkMasterExists(result)) {
return result;
}
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId)
.orElseThrow(() -> new ServiceException(Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId));
ProcessDefinition processDefinition =
processService.findProcessDefinition(processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
processDefinition.setReleaseState(ReleaseState.ONLINE);
if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) {
this.checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
}
result = checkExecuteType(processInstance, executeType);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkTenantSuitable(processDefinition)) {
logger.error(
"There is not any valid tenant for the , processDefinitionId:{}, processDefinitionCode:{}, ",
processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
}
// g
Map<String, Object> commandMap =
JSONUtils.parseObject(processInstance.getCommandParam(), new TypeReference<Map<String, Object>>() {
});
String startParams = null;
if (MapUtils.isNotEmpty(commandMap) && executeType == ExecuteType.REPEAT_RUNNING) {
Object startParamsJson = commandMap.get(CMD_PARAM_START_PARAMS);
if (startParamsJson != null) {
startParams = startParamsJson.toString();
}
}
switch (executeType) {
case REPEAT_RUNNING:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.REPEAT_RUNNING, startParams,
processInstance.getTestFlag());
break;
case RECOVER_SUSPENDED_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.RECOVER_SUSPENDED_PROCESS, startParams,
processInstance.getTestFlag());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
break;
case START_FAILURE_TASK_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.START_FAILURE_TASK_PROCESS, startParams,
processInstance.getTestFlag());
break;
case STOP:
if (processInstance.getState() == WorkflowExecutionStatus.READY_STOP) {
logger.warn("Process instance status is already {}, processInstanceName:{}.",
WorkflowExecutionStatus.READY_STOP.getDesc(), processInstance.getName());
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
result =
updateProcessInstancePrepare(processInstance, CommandType.STOP,
WorkflowExecutionStatus.READY_STOP);
}
break;
case PAUSE:
if (processInstance.getState() == WorkflowExecutionStatus.READY_PAUSE) {
logger.warn("Process instance status is already {}, processInstanceName:{}.",
WorkflowExecutionStatus.READY_STOP.getDesc(), processInstance.getName());
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE,
WorkflowExecutionStatus.READY_PAUSE);
}
break;
default:
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.warn("Unknown execute type for process instance, processInstanceId:{}.",
processInstance.getId());
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type");
break;
}
return result;
}
/**
* do action to workflow instance:pause, stop, repeat, recover from pause, recover from stop,rerun failed task
*
* @param loginUser login user
* @param workflowInstanceId workflow instance id
* @param executeType execute type
* @return execute result code
*/
@Override
public Map<String, Object> execute(User loginUser, Integer workflowInstanceId, ExecuteType executeType) {
ProcessInstance processInstance = processInstanceMapper.selectById(workflowInstanceId);
ProcessDefinition processDefinition =
processDefineMapper.queryByCode(processInstance.getProcessDefinitionCode());
return execute(loginUser, processDefinition.getProjectCode(), workflowInstanceId, executeType);
}
/**
* do action to execute task in process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processInstanceId process instance id
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param s start node list
* @param t task depend type
* @return execute result code
*/
@Override
public WorkflowExecuteResponse executeTask(User loginUser, long projectCode, Integer processInstanceId,
String s, T t) {
WorkflowExecuteResponse response = new WorkflowExecuteResponse();
Project project = projectMapper.queryByCode(projectCode);
projectService.checkProjectAndAuthThrowException(loginUser, project,
ApiFuncIdentificationConstant.map.get(ExecuteType.EXECUTE_TASK));
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId)
.orElseThrow(() -> new ServiceException(Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId));
if (!processInstance.getState().isFinished()) {
logger.error("Can not execute task for process instance which is not finished, processInstanceId:{}.",
processInstanceId);
putMsg(response, Status.WORKFLOW_INSTANCE_IS_NOT_FINISHED);
return response;
}
ProcessDefinition processDefinition =
processService.findProcessDefinition(processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
processDefinition.setReleaseState(ReleaseState.ONLINE);
this.checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
if (!checkTenantSuitable(processDefinition)) {
logger.error(
"There is not any valid tenant for the , processDefinitionId:{}, processDefinitionCode:{}, ",
processDefinition.getId(), processDefinition.getName());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
putMsg(response, Status.TENANT_NOT_SUITABLE);
return response;
}
// g
long sLong;
try {
sLong = Long.parseLong(s);
} catch (NumberFormatException e) {
logger.error("s is not a number");
putMsg(response, Status.REQUEST_PARAMS_NOT_VALID_ERROR, s);
return response;
}
if (taskDefinitionLogMapper.queryMaxVersionForDefinition(sLong) == null) {
putMsg(response, Status.EXECUTE_NOT_DEFINE_TASK);
return response;
}
// To ad
Map<String, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, processInstanceId);
// Add S
cmdParam.put(CMD_PARAM_START_NODES, s);
Command command = new Command();
command.setCommandType(CommandType.EXECUTE_TASK);
command.setProcessDefinitionCode(processDefinition.getCode());
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(loginUser.getId());
command.setProcessDefinitionVersion(processDefinition.getVersion());
command.setProcessInstanceId(processInstanceId);
command.setTestFlag(processInstance.getTestFlag());
// Add t
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.setT(t);
if (!commandService.verifyIsNeedCreateCommand(command)) {
logger.warn(
"Process instance is executing the command, processDefinitionCode:{}, processDefinitionVersion:{}, processInstanceId:{}.",
processDefinition.getCode(), processDefinition.getVersion(), processInstanceId);
putMsg(response, Status.PROCESS_INSTANCE_EXECUTING_COMMAND,
String.valueOf(processDefinition.getCode()));
return response;
}
logger.info("Creating command, commandInfo:{}.", command);
int create = commandService.createCommand(command);
if (create > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}, processDefinitionVersion:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode(),
processDefinition.getVersion());
putMsg(response, Status.SUCCESS);
} else {
logger.error(
"Execute process instance failed because create {} command error, processDefinitionCode:{}, processDefinitionVersion:{}, processInstanceId:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode(),
processDefinition.getVersion(),
processInstanceId);
putMsg(response, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return response;
}
@Override
public Map<String, Object> forceStartTaskInstance(User loginUser, int queueId) {
Map<String, Object> result = new HashMap<>();
TaskGroupQueue taskGroupQueue = taskGroupQueueMapper.selectById(queueId);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
// check process instance exist
ProcessInstance processInstance = processInstanceMapper.selectById(taskGroupQueue.getProcessId());
if (processInstance == null) {
logger.error("Process instance does not exist, projectCode:{}, processInstanceId:{}.",
taskGroupQueue.getProjectCode(), taskGroupQueue.getProcessId());
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, taskGroupQueue.getProcessId());
return result;
}
if (!checkMasterExists(result)) {
return result;
}
return forceStart(processInstance, taskGroupQueue);
}
/**
* check tenant suitable
*
* @param processDefinition
* @return true if tenant suitable, otherwise return false
*/
private boolean checkTenantSuitable(ProcessDefinition processDefinition) {
Tenant tenant =
processService.getTenantForProcess(processDefinition.getTenantId(), processDefinition.getUserId());
return tenant != null;
}
/**
* Check the state of process instance and the type of operation match
*
* @param processInstance process instance
* @param executeType execute type
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @return check result code
*/
private Map<String, Object> checkExecuteType(ProcessInstance processInstance, ExecuteType executeType) {
Map<String, Object> result = new HashMap<>();
WorkflowExecutionStatus executionStatus = processInstance.getState();
boolean checkResult = false;
switch (executeType) {
case PAUSE:
if (executionStatus.isRunning()) {
checkResult = true;
}
break;
case STOP:
if (executionStatus.canStop()) {
checkResult = true;
}
break;
case REPEAT_RUNNING:
if (executionStatus.isFinished()) {
checkResult = true;
}
break;
case START_FAILURE_TASK_PROCESS:
if (executionStatus.isFailure()) {
checkResult = true;
}
break;
case RECOVER_SUSPENDED_PROCESS:
if (executionStatus.isPause() || executionStatus.isStop()) {
checkResult = true;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
break;
default:
break;
}
if (!checkResult) {
putMsg(result, Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstance.getName(),
executionStatus.toString(), executeType.toString());
} else {
putMsg(result, Status.SUCCESS);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @param commandType command type
* @param executionStatus execute status
* @return update result
*/
private Map<String, Object> updateProcessInstancePrepare(ProcessInstance processInstance, CommandType commandType,
WorkflowExecutionStatus executionStatus) {
Map<String, Object> result = new HashMap<>();
processInstance.setCommandType(commandType);
processInstance.addHistoryCmd(commandType);
processInstance.setStateWithDesc(executionStatus, commandType.getDescp() + "by ui");
int update = processInstanceDao.updateProcessInstance(processInstance);
// determine whether the process is normal
if (update > 0) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.info("Process instance state is updated to {} in database, processInstanceName:{}.",
executionStatus.getDesc(), processInstance.getName());
// directl
// success
WorkflowStateEventChangeCommand workflowStateEventChangeCommand = new WorkflowStateEventChangeCommand(
processInstance.getId(), 0, processInstance.getState(), processInstance.getId(), 0);
Host host = new Host(processInstance.getHost());
stateEventCallbackService.sendResult(host, workflowStateEventChangeCommand.convert2Command());
putMsg(result, Status.SUCCESS);
} else {
logger.error("Process instance state update error, processInstanceName:{}.", processInstance.getName());
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @return update result
*/
private Map<String, Object> forceStart(ProcessInstance processInstance, TaskGroupQueue taskGroupQueue) {
Map<String, Object> result = new HashMap<>();
if (taskGroupQueue.getStatus() != TaskGroupQueueStatus.WAIT_QUEUE) {
logger.warn("Task group queue already starts, taskGroupQueueId:{}.", taskGroupQueue.getId());
putMsg(result, Status.TASK_GROUP_QUEUE_ALREADY_START);
return result;
}
taskGroupQueue.setForceStart(Flag.YES.getCode());
processService.updateTaskGroupQueue(taskGroupQueue);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.info("Sending force start command to master.");
processService.sendStartTask2Master(processInstance, taskGroupQueue.getTaskId(),
org.apache.dolphinscheduler.remote.command.CommandType.TASK_FORCE_STATE_EVENT_REQUEST);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* insert command, used in the implementation of the page, rerun, recovery (pause / failure) execution
*
* @param loginUser login user
* @param instanceId instance id
* @param processDefinitionCode code
* @param processVersion
* @param commandType command type
* @return insert result code
*/
private Map<String, Object> insertCommand(User loginUser, Integer instanceId, long processDefinitionCode,
int processVersion, CommandType commandType, String startParams,
int testFlag) {
Map<String, Object> result = new HashMap<>();
// To ad
Map<String, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, instanceId);
if (!StringUtils.isEmpty(startParams)) {
cmdParam.put(CMD_PARAM_START_PARAMS, startParams);
}
Command command = new Command();
command.setCommandType(commandType);
command.setProcessDefinitionCode(processDefinitionCode);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.setExecutorId(loginUser.getId());
command.setProcessDefinitionVersion(processVersion);
command.setProcessInstanceId(instanceId);
command.setTestFlag(testFlag);
if (!commandService.verifyIsNeedCreateCommand(command)) {
logger.warn(
"Process instance is executing the command, processDefinitionCode:{}, processDefinitionVersion:{}, processInstanceId:{}.",
processDefinitionCode, processVersion, instanceId);
putMsg(result, Status.PROCESS_INSTANCE_EXECUTING_COMMAND, String.valueOf(processDefinitionCode));
return result;
}
logger.info("Creating command, commandInfo:{}.", command);
int create = commandService.createCommand(command);
if (create > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}, processDefinitionVersion:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode(), processVersion);
putMsg(result, Status.SUCCESS);
} else {
logger.error(
"Execute process instance failed because create {} command error, processDefinitionCode:{}, processDefinitionVersion:{}, processInstanceId:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode(), processVersion,
instanceId);
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* check whether sub processes are offline before starting
*
* @param processDefinitionCode code
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @return check result code
*/
@Override
public Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode) {
Map<String, Object> result = new HashMap<>();
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
if (processDefinition == null) {
logger.error("Process definition is not be found, processDefinitionCode:{}.", processDefinitionCode);
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "processDefinitionCode");
return result;
}
List<Long> codes = new ArrayList<>();
processService.recurseFindSubProcess(processDefinition.getCode(), codes);
if (!codes.isEmpty()) {
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(codes);
if (processDefinitionList != null) {
for (ProcessDefinition processDefinitionTmp : processDefinitionList) {
/**
* if there is no online process, exit directly
*/
if (processDefinitionTmp.getReleaseState() != ReleaseState.ONLINE) {
logger.warn("Sub {} of {} is not {}.",
processDefinitionTmp.getName(),
processDefinition.getName(), ReleaseState.ONLINE.getDescp());
putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, processDefinitionTmp.getName());
return result;
}
}
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
putMsg(result, Status.SUCCESS);
return result;
}
/**
* create command
*
* @param commandType commandType
* @param processDefineCode processDefineCode
* @param nodeDep nodeDep
* @param failureStrategy failureStrategy
* @param s s
* @param schedule schedule
* @param warningType warningType
* @param executorId executorId
* @param warningGroupId warningGroupId
* @param runMode runMode
* @param processInstancePriority processInstancePriority
* @param workerGroup workerGroup
* @param testFlag testFlag
* @param environmentCode environmentCode
* @return command id
*/
private int createCommand(CommandType commandType, long processDefineCode, T nodeDep,
FailureStrategy failureStrategy, String s, String schedule,
WarningType warningType, int executorId, Integer warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup, Long environmentCode,
Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun,
int testFlag, ComplementDependentMode complementDependentMode) {
/**
* instantiate command schedule instance
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
*/
Command command = new Command();
Map<String, String> cmdParam = new HashMap<>();
if (commandType == null) {
command.setCommandType(CommandType.START_PROCESS);
} else {
command.setCommandType(commandType);
}
command.setProcessDefinitionCode(processDefineCode);
if (nodeDep != null) {
command.setT(nodeDep);
}
if (failureStrategy != null) {
command.setFailureStrategy(failureStrategy);
}
if (!StringUtils.isEmpty(s)) {
cmdParam.put(CMD_PARAM_START_NODES, s);
}
if (warningType != null) {
command.setWarningType(warningType);
}
if (startParams != null && startParams.size() > 0) {
cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams));
}
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(executorId);
command.setWarningGroupId(warningGroupId);
command.setProcessInstancePriority(processInstancePriority);
command.setWorkerGroup(workerGroup);
command.setEnvironmentCode(environmentCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.setDryRun(dryRun);
command.setTestFlag(testFlag);
ProcessDefinition processDefinition = processService.findProcessDefinitionByCode(processDefineCode);
if (processDefinition != null) {
command.setProcessDefinitionVersion(processDefinition.getVersion());
}
command.setProcessInstanceId(0);
// determine whether to complement
if (commandType == CommandType.COMPLEMENT_DATA) {
if (schedule == null || StringUtils.isEmpty(schedule)) {
logger.error("Create {} type command error because parameter schedule is invalid.",
command.getCommandType().getDescp());
return 0;
}
if (!isValidateScheduleTime(schedule)) {
return 0;
}
try {
logger.info("Start to create {} command, processDefinitionCode:{}.",
command.getCommandType().getDescp(), processDefineCode);
return createComplementCommandList(schedule, runMode, command, expectedParallelismNumber,
complementDependentMode);
} catch (CronParseException cronParseException) {
// We catch
// cron expr
return 0;
}
} else {
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return commandService.createCommand(command);
}
}
/**
* create complement command
* close left and close right
*
* @param scheduleTimeParam
* @param runMode
* @return
*/
protected int createComplementCommandList(String scheduleTimeParam, RunMode runMode, Command command,
Integer expectedParallelismNumber,
ComplementDependentMode complementDependentMode) throws CronParseException {
int createCount = 0;
String startDate = null;
String endDate = null;
String dateList = null;
int dependentProcessDefinitionCreateCount = 0;
runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode;
Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam());
Map<String, String> scheduleParam = JSONUtils.toMap(scheduleTimeParam);
if (scheduleParam.containsKey(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
dateList = scheduleParam.get(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST);
dateList = removeDuplicates(dateList);
}
if (scheduleParam.containsKey(CMD_PARAM_COMPLEMENT_DATA_START_DATE) && scheduleParam.containsKey(
CMD_PARAM_COMPLEMENT_DATA_END_DATE)) {
startDate = scheduleParam.get(CMD_PARAM_COMPLEMENT_DATA_START_DATE);
endDate = scheduleParam.get(CMD_PARAM_COMPLEMENT_DATA_END_DATE);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
switch (runMode) {
case RUN_MODE_SERIAL: {
logger.info("RunMode of {} command is serial run, processDefinitionCode:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
if (StringUtils.isNotEmpty(dateList)) {
cmdParam.put(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, dateList);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
createCount = commandService.createCommand(command);
if (createCount > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
} else {
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
}
}
if (startDate != null && endDate != null) {
cmdParam.put(CMD_PARAM_COMPLEMENT_DATA_START_DATE, startDate);
cmdParam.put(CMD_PARAM_COMPLEMENT_DATA_END_DATE, endDate);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
createCount = commandService.createCommand(command);
if (createCount > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
} else {
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
// dependent
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info(
"Complement dependent mode is off mode or Scheduler is empty, so skip create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
} else {
logger.info(
"Complement dependent mode is all dependent and Scheduler is not empty, need create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command);
}
}
break;
}
case RUN_MODE_PARALLEL: {
logger.info("RunMode of {} command is parallel run, processDefinitionCode:{}.",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
if (startDate != null && endDate != null) {
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
List<ZonedDateTime> listDate = CronUtils.getSelfFireDateList(
DateUtils.stringToZoneDateTime(startDate),
DateUtils.stringToZoneDateTime(endDate),
schedules);
int listDateSize = listDate.size();
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("Complement command run in parallel mode, current expectedParallelismNumber:{}.",
createCount);
// Distribut
// The last
int itemsPerCommand = (listDateSize / createCount);
int remainingItems = (listDateSize % createCount);
int startDateIndex = 0;
int endDateIndex = 0;
for (int i = 1; i <= createCount; i++) {
int extra = (i <= remainingItems) ? 1 : 0;
int singleCommandItems = (itemsPerCommand + extra);
if (i == 1) {
endDateIndex += singleCommandItems - 1;
} else {
startDateIndex = endDateIndex + 1;
endDateIndex += singleCommandItems;
}
cmdParam.put(CMD_PARAM_COMPLEMENT_DATA_START_DATE,
DateUtils.dateToString(listDate.get(startDateIndex)));
cmdParam.put(CMD_PARAM_COMPLEMENT_DATA_END_DATE,
DateUtils.dateToString(listDate.get(endDateIndex)));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
if (commandService.createCommand(command) > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
} else {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
}
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info(
"Complement dependent mode is off mode or Scheduler is empty, so skip create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
} else {
logger.info(
"Complement dependent mode is all dependent and Scheduler is not empty, need create complement dependent command, processDefinitionCode:{}.",
command.getProcessDefinitionCode());
dependentProcessDefinitionCreateCount +=
createComplementDependentCommand(schedules, command);
}
}
}
}
if (StringUtils.isNotEmpty(dateList)) {
List<String> listDate = Arrays.asList(dateList.split(COMMA));
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("Complement command run in parallel mode, current expectedParallelismNumber:{}.",
createCount);
for (List<String> stringDate : Lists.partition(listDate, createCount)) {
cmdParam.put(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, String.join(COMMA, stringDate));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating command, commandInfo:{}.", command);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (commandService.createCommand(command) > 0) {
logger.info("Create {} command complete, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
} else {
logger.error("Create {} command error, processDefinitionCode:{}",
command.getCommandType().getDescp(), command.getProcessDefinitionCode());
}
}
}
}
break;
}
default:
break;
}
logger.info("Create complement command count:{}, Create dependent complement command count:{}", createCount,
dependentProcessDefinitionCreateCount);
return createCount;
}
/**
* create complement dependent command
*/
public int createComplementDependentCommand(List<Schedule> schedules, Command command) {
int dependentProcessDefinitionCreateCount = 0;
Command dependentCommand;
try {
dependentCommand = (Command) BeanUtils.cloneBean(command);
} catch (Exception e) {
logger.error("Copy dependent command error.", e);
return dependentProcessDefinitionCreateCount;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
List<DependentProcessDefinition> dependentProcessDefinitionList =
getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(),
CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup());
dependentCommand.setT(T.TASK_POST);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
// If the id
// and causi
dependentCommand.setId(null);
dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode());
dependentCommand.setProcessDefinitionVersion(dependentProcessDefinition.getProcessDefinitionVersion());
dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup());
Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam());
cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode()));
dependentCommand.setCommandParam(JSONUtils.toJsonString(cmdParam));
logger.info("Creating complement dependent command, commandInfo:{}.", command);
dependentProcessDefinitionCreateCount += commandService.createCommand(dependentCommand);
}
return dependentProcessDefinitionCreateCount;
}
/**
* get complement dependent list
*/
private List<DependentProcessDefinition> getComplementDependentDefinitionList(long processDefinitionCode,
CycleEnum processDefinitionCycle,
String workerGroup) {
List<DependentProcessDefinition> dependentProcessDefinitionList =
processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode);
return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle,
workerGroup, processDefinitionCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
/**
* Check whether the dependency cycle of the dependent node is consistent with the schedule cycle of
* the dependent and if there is no worker group in the schedule, use the complement selection's
* worker group
*/
private List<DependentProcessDefinition> checkDependentProcessDefinitionValid(
List<DependentProcessDefinition> dependentProcessDefinitionList,
CycleEnum processDefinitionCycle,
String workerGroup,
long upstreamProcessDefinitionCode) {
List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>();
List<Long> processDefinitionCodeList =
dependentProcessDefinitionList.stream().map(DependentProcessDefinition::getProcessDefinitionCode)
.collect(Collectors.toList());
Map<Long, String> processDefinitionWorkerGroupMap =
workerGroupService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
if (dependentProcessDefinition.getDependentCycle(upstreamProcessDefinitionCode) == processDefinitionCycle) {
if (processDefinitionWorkerGroupMap
.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) {
dependentProcessDefinition.setWorkerGroup(workerGroup);
}
validDependentProcessDefinitionList.add(dependentProcessDefinition);
}
}
return validDependentProcessDefinitionList;
}
/**
* @param schedule
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @return check error return 0, otherwise 1
*/
private boolean isValidateScheduleTime(String schedule) {
Map<String, String> scheduleResult = JSONUtils.toMap(schedule);
if (scheduleResult == null) {
return false;
}
if (scheduleResult.containsKey(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
if (scheduleResult.get(CMD_PARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST) == null) {
return false;
}
}
if (scheduleResult.containsKey(CMD_PARAM_COMPLEMENT_DATA_START_DATE)) {
String startDate = scheduleResult.get(CMD_PARAM_COMPLEMENT_DATA_START_DATE);
String endDate = scheduleResult.get(CMD_PARAM_COMPLEMENT_DATA_END_DATE);
if (startDate == null || endDate == null) {
return false;
}
try {
ZonedDateTime start = DateUtils.stringToZoneDateTime(startDate);
ZonedDateTime end = DateUtils.stringToZoneDateTime(endDate);
if (start == null || end == null) {
return false;
}
if (start.isAfter(end)) {
logger.error(
"Complement data parameter error, start time should be before end time, startDate:{}, endDate:{}.",
start, end);
return false;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
} catch (Exception ex) {
logger.warn("Parse schedule time error, startDate:{}, endDate:{}.", startDate, endDate);
return false;
}
}
return true;
}
/**
* @param scheduleTimeList
* @return remove duplicate date list
*/
private String removeDuplicates(String scheduleTimeList) {
if (StringUtils.isNotEmpty(scheduleTimeList)) {
Set<String> dateSet =
Arrays.stream(scheduleTimeList.split(COMMA)).map(String::trim).collect(Collectors.toSet());
return String.join(COMMA, dateSet);
}
return null;
}
/**
* query executing data of processInstance by master
* @param processInstanceId
* @return
*/
@Override
public WorkflowExecuteDto queryExecutingWorkflowByProcessInstanceId(Integer processInstanceId) {
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId).orElse(null);
if (processInstance == null) {
logger.error("Process instance does not exist, processInstanceId:{}.", processInstanceId);
return null;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
Host host = new Host(processInstance.getHost());
WorkflowExecutingDataRequestCommand requestCommand = new WorkflowExecutingDataRequestCommand();
requestCommand.setProcessInstanceId(processInstanceId);
org.apache.dolphinscheduler.remote.command.Command command =
stateEventCallbackService.sendSync(host, requestCommand.convert2Command());
if (command == null) {
logger.error("Query executing process instance from master error, processInstanceId:{}.",
processInstanceId);
return null;
}
WorkflowExecutingDataResponseCommand responseCommand =
JSONUtils.parseObject(command.getBody(), WorkflowExecutingDataResponseCommand.class);
return responseCommand.getWorkflowExecuteDto();
}
@Override
public Map<String, Object> execStreamTaskInstance(User loginUser, long projectCode, long taskDefinitionCode,
int taskDefinitionVersion,
int warningGroupId, String workerGroup, Long environmentCode,
Map<String, String> startParams, int dryRun) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkMasterExists(result)) {
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,253 |
[Improvement] [API] The downstream workflow is started, although it is not online
|
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When performed complement operation, the downstream workflow is started, although it is not online.
### What you expected to happen
Start the downstream workflow when it is online
### How to reproduce
Performs the complement operation when set complementDependentMode=ALL_DEPENDENT,downstream workflow is offline.
### Anything else
_No response_
### Version
3.1.2
### 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/13253
|
https://github.com/apache/dolphinscheduler/pull/13257
|
04785dc799200d052fa7367ca4a5ebbd9784f036
|
a75a69f3ec850236128e208351d323767fcba64a
| 2022-12-22T06:27:14Z |
java
| 2022-12-26T03:58:37Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
// todo dispatch improvement
List<Server> masterServerList = monitorService.getServerListFromRegistry(true);
Host host = new Host(masterServerList.get(0).getHost(), masterServerList.get(0).getPort());
TaskExecuteStartCommand taskExecuteStartCommand = new TaskExecuteStartCommand();
taskExecuteStartCommand.setExecutorId(loginUser.getId());
taskExecuteStartCommand.setExecutorName(loginUser.getUserName());
taskExecuteStartCommand.setProjectCode(projectCode);
taskExecuteStartCommand.setTaskDefinitionCode(taskDefinitionCode);
taskExecuteStartCommand.setTaskDefinitionVersion(taskDefinitionVersion);
taskExecuteStartCommand.setWorkerGroup(workerGroup);
taskExecuteStartCommand.setWarningGroupId(warningGroupId);
taskExecuteStartCommand.setEnvironmentCode(environmentCode);
taskExecuteStartCommand.setStartParams(startParams);
taskExecuteStartCommand.setDryRun(dryRun);
org.apache.dolphinscheduler.remote.command.Command response =
stateEventCallbackService.sendSync(host, taskExecuteStartCommand.convert2Command());
if (response != null) {
logger.info("Send task execute start command complete, response is {}.", response);
putMsg(result, Status.SUCCESS);
} else {
logger.error(
"Start to execute stream task instance error, projectCode:{}, taskDefinitionCode:{}, taskVersion:{}.",
projectCode, taskDefinitionCode, taskDefinitionVersion);
putMsg(result, Status.START_TASK_INSTANCE_ERROR);
}
return result;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.api.controller;
import static org.apache.dolphinscheduler.api.enums.Status.CREATE_SCHEDULE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.DELETE_SCHEDULE_BY_ID_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.OFFLINE_SCHEDULE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.PREVIEW_SCHEDULE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.PUBLISH_SCHEDULE_ONLINE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_SCHEDULE_LIST_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_SCHEDULE_LIST_PAGING_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_SCHEDULE_ERROR;
import static org.apache.dolphinscheduler.common.constants.Constants.SESSION_USER;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
import org.apache.dolphinscheduler.api.service.SchedulerService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
/**
* scheduler controller
*/
@Tag(name = "SCHEDULE_TAG")
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@RestController
@RequestMapping("/projects/{projectCode}/schedules")
public class SchedulerController extends BaseController {
public static final String DEFAULT_WARNING_TYPE = "NONE";
public static final String DEFAULT_NOTIFY_GROUP_ID = "1";
public static final String DEFAULT_FAILURE_POLICY = "CONTINUE";
public static final String DEFAULT_PROCESS_INSTANCE_PRIORITY = "MEDIUM";
@Autowired
private SchedulerService schedulerService;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
/**
* create schedule
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param schedule scheduler
* @param warningType warning type
* @param warningGroupId warning group id
* @param failureStrategy failure strategy
* @param processInstancePriority process instance priority
* @param workerGroup worker group
* @return create result code
*/
@Operation(summary = "createSchedule", description = "CREATE_SCHEDULE_NOTES")
@Parameters({
@Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
@Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','timezoneId':'America/Phoenix','crontab':'0 0 3/6 * * ? *'}")),
@Parameter(name = "warningType", description = "WARNING_TYPE", schema = @Schema(implementation = WarningType.class)),
@Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema = @Schema(implementation = FailureStrategy.class)),
@Parameter(name = "workerGroupId", description = "WORKER_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class)),
@Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema = @Schema(implementation = Priority.class)),
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_SCHEDULE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result createSchedule(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefinitionCode") long processDefinitionCode,
@RequestParam(value = "schedule") String schedule,
@RequestParam(value = "warningType", required = false, defaultValue = DEFAULT_WARNING_TYPE) WarningType warningType,
@RequestParam(value = "warningGroupId", required = false, defaultValue = DEFAULT_NOTIFY_GROUP_ID) int warningGroupId,
@RequestParam(value = "failureStrategy", required = false, defaultValue = DEFAULT_FAILURE_POLICY) FailureStrategy failureStrategy,
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
@RequestParam(value = "processInstancePriority", required = false, defaultValue = DEFAULT_PROCESS_INSTANCE_PRIORITY) Priority processInstancePriority) {
Map<String, Object> result = schedulerService.insertSchedule(loginUser, projectCode, processDefinitionCode,
schedule,
warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
return returnDataList(result);
}
/**
* updateProcessInstance schedule
*
* @param loginUser login user
* @param projectCode project code
* @param id scheduler id
* @param schedule scheduler
* @param warningType warning type
* @param warningGroupId warning group id
* @param failureStrategy failure strategy
* @param workerGroup worker group
* @param processInstancePriority process instance priority
* @return update result code
*/
@Operation(summary = "updateSchedule", description = "UPDATE_SCHEDULE_NOTES")
@Parameters({
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
@Parameter(name = "warningType", description = "WARNING_TYPE", schema = @Schema(implementation = WarningType.class)),
@Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema = @Schema(implementation = FailureStrategy.class)),
@Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
@Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema = @Schema(implementation = Priority.class)),
@Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class)),
})
@PutMapping("/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_SCHEDULE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result updateSchedule(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "id") Integer id,
@RequestParam(value = "schedule") String schedule,
@RequestParam(value = "warningType", required = false, defaultValue = DEFAULT_WARNING_TYPE) WarningType warningType,
@RequestParam(value = "warningGroupId", required = false) int warningGroupId,
@RequestParam(value = "failureStrategy", required = false, defaultValue = "END") FailureStrategy failureStrategy,
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
@RequestParam(value = "processInstancePriority", required = false, defaultValue = DEFAULT_PROCESS_INSTANCE_PRIORITY) Priority processInstancePriority) {
Map<String, Object> result = schedulerService.updateSchedule(loginUser, projectCode, id, schedule,
warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
return returnDataList(result);
}
/**
* publish schedule setScheduleState
*
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
* @param loginUser login user
* @param projectCode project code
* @param id scheduler id
* @return publish result code
*/
@Operation(summary = "online", description = "ONLINE_SCHEDULE_NOTES")
@Parameters({
@Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PostMapping("/{id}/online")
@ApiException(PUBLISH_SCHEDULE_ONLINE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result publishScheduleOnline(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) {
Map<String, Object> result = schedulerService.setScheduleState(loginUser, projectCode, id, ReleaseState.ONLINE);
return returnDataList(result);
}
/**
* offline schedule
*
* @param loginUser login user
* @param projectCode project code
* @param id schedule id
* @return operation result code
*/
@Operation(summary = "offline", description = "OFFLINE_SCHEDULE_NOTES")
@Parameters({
@Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@PostMapping("/{id}/offline")
@ApiException(OFFLINE_SCHEDULE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result offlineSchedule(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) {
Map<String, Object> result =
schedulerService.setScheduleState(loginUser, projectCode, id, ReleaseState.OFFLINE);
return returnDataList(result);
}
/**
* query schedule list paging
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param pageNo page number
* @param pageSize page size
* @param searchVal search value
* @return schedule list page
*/
@Operation(summary = "queryScheduleListPaging", description = "QUERY_SCHEDULE_LIST_PAGING_NOTES")
@Parameters({
@Parameter(name = "processDefinitionId", description = "PROCESS_DEFINITION_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
@Parameter(name = "pageNo", description = "PAGE_NO", schema = @Schema(implementation = int.class, example = "1")),
@Parameter(name = "pageSize", description = "PAGE_SIZE", schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ApiException(QUERY_SCHEDULE_LIST_PAGING_ERROR)
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryScheduleListPaging(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam long processDefinitionCode,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
return result;
}
searchVal = ParameterUtils.handleEscapes(searchVal);
result = schedulerService.querySchedule(loginUser, projectCode, processDefinitionCode, searchVal, pageNo,
pageSize);
return result;
}
/**
* delete schedule by id
*
* @param loginUser login user
* @param projectCode project code
* @param id scheule id
* @return delete result code
*/
@Operation(summary = "deleteScheduleById", description = "DELETE_SCHEDULE_NOTES")
@Parameters({
@Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@ApiException(DELETE_SCHEDULE_BY_ID_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result deleteScheduleById(@RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) {
schedulerService.deleteSchedulesById(loginUser, id);
return new Result(Status.SUCCESS);
}
/**
* query schedule list
*
* @param loginUser login user
* @param projectCode project code
* @return schedule list
*/
@Operation(summary = "queryScheduleList", description = "QUERY_SCHEDULE_LIST_NOTES")
@PostMapping("/list")
@ApiException(QUERY_SCHEDULE_LIST_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryScheduleList(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
Map<String, Object> result = schedulerService.queryScheduleList(loginUser, projectCode);
return returnDataList(result);
}
/**
* preview schedule
*
* @param loginUser login user
* @param schedule schedule expression
* @return the next five fire time
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
*/
@Operation(summary = "previewSchedule", description = "PREVIEW_SCHEDULE_NOTES")
@Parameters({
@Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
})
@PostMapping("/preview")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(PREVIEW_SCHEDULE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result previewSchedule(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@RequestParam(value = "schedule") String schedule) {
Map<String, Object> result = schedulerService.previewSchedule(loginUser, schedule);
return returnDataList(result);
}
/**
* update process definition schedule
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param schedule scheduler
* @param warningType warning type
* @param warningGroupId warning group id
* @param failureStrategy failure strategy
* @param workerGroup worker group
* @param processInstancePriority process instance priority
* @return update result code
*/
@Operation(summary = "updateScheduleByProcessDefinitionCode", description = "UPDATE_SCHEDULE_BY_PROCESS_DEFINITION_CODE_NOTES")
@Parameters({
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
|
@Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "12345678")),
@Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
@Parameter(name = "warningType", description = "WARNING_TYPE", schema = @Schema(implementation = WarningType.class)),
@Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema = @Schema(implementation = FailureStrategy.class)),
@Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
@Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema = @Schema(implementation = Priority.class)),
@Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class)),
})
@PutMapping("/update/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_SCHEDULE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result updateScheduleByProcessDefinitionCode(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long processDefinitionCode,
@RequestParam(value = "schedule") String schedule,
@RequestParam(value = "warningType", required = false, defaultValue = DEFAULT_WARNING_TYPE) WarningType warningType,
@RequestParam(value = "warningGroupId", required = false) int warningGroupId,
@RequestParam(value = "failureStrategy", required = false, defaultValue = "END") FailureStrategy failureStrategy,
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") long environmentCode,
@RequestParam(value = "processInstancePriority", required = false) Priority processInstancePriority) {
Map<String, Object> result = schedulerService.updateScheduleByProcessDefinitionCode(loginUser, projectCode,
processDefinitionCode, schedule,
warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
return returnDataList(result);
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.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.scheduler.quartz;
import static org.quartz.CronScheduleBuilder.cronSchedule;
import static org.quartz.JobBuilder.newJob;
import static org.quartz.TriggerBuilder.newTrigger;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.dao.entity.Schedule;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.java
|
import org.apache.dolphinscheduler.scheduler.api.SchedulerApi;
import org.apache.dolphinscheduler.scheduler.api.SchedulerException;
import org.apache.dolphinscheduler.scheduler.quartz.utils.QuartzTaskUtils;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.quartz.CronTrigger;
import org.quartz.JobDetail;
import org.quartz.JobKey;
import org.quartz.Scheduler;
import org.quartz.TriggerKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.google.common.base.Strings;
public class QuartzScheduler implements SchedulerApi {
private static final Logger logger = LoggerFactory.getLogger(QuartzScheduler.class);
@Autowired
private Scheduler scheduler;
private final ReadWriteLock lock = new ReentrantReadWriteLock();
@Override
public void start() throws SchedulerException {
try {
scheduler.start();
} catch (Exception e) {
throw new SchedulerException("Failed to start quartz scheduler ", e);
}
}
@Override
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.java
|
public void insertOrUpdateScheduleTask(int projectId, Schedule schedule) throws SchedulerException {
JobKey jobKey = QuartzTaskUtils.getJobKey(schedule.getId(), projectId);
Map<String, Object> jobDataMap = QuartzTaskUtils.buildDataMap(projectId, schedule);
String cronExpression = schedule.getCrontab();
String timezoneId = schedule.getTimezoneId();
/**
* transform from server default timezone to schedule timezone
* e.g. server default timezone is `UTC`
* user set a schedule with startTime `2022-04-28 10:00:00`, timezone is `Asia/Shanghai`,
* api skip to transform it and save into databases directly, startTime `2022-04-28 10:00:00`, timezone is `UTC`, which actually added 8 hours,
* so when add job to quartz, it should recover by transform timezone
*/
Date startDate = DateUtils.transformTimezoneDate(schedule.getStartTime(), timezoneId);
Date endDate = DateUtils.transformTimezoneDate(schedule.getEndTime(), timezoneId);
lock.writeLock().lock();
try {
JobDetail jobDetail;
if (scheduler.checkExists(jobKey)) {
jobDetail = scheduler.getJobDetail(jobKey);
jobDetail.getJobDataMap().putAll(jobDataMap);
} else {
jobDetail = newJob(ProcessScheduleTask.class).withIdentity(jobKey).build();
jobDetail.getJobDataMap().putAll(jobDataMap);
scheduler.addJob(jobDetail, false, true);
logger.info("Add job, job name: {}, group name: {}", jobKey.getName(), jobKey.getGroup());
}
TriggerKey triggerKey = new TriggerKey(jobKey.getName(), jobKey.getGroup());
/*
* Instructs the Scheduler that upon a mis-fire situation, the CronTrigger wants to have it's next-fire-time
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.java
|
* updated to the next time in the schedule after the current time (taking into account any associated
* Calendar), but it does not want to be fired now.
*/
CronTrigger cronTrigger = newTrigger()
.withIdentity(triggerKey)
.startAt(startDate)
.endAt(endDate)
.withSchedule(
cronSchedule(cronExpression)
.withMisfireHandlingInstructionFireAndProceed()
.inTimeZone(DateUtils.getTimezone(timezoneId)))
.forJob(jobDetail).build();
if (scheduler.checkExists(triggerKey)) {
CronTrigger oldCronTrigger = (CronTrigger) scheduler.getTrigger(triggerKey);
String oldCronExpression = oldCronTrigger.getCronExpression();
if (!Strings.nullToEmpty(cronExpression).equalsIgnoreCase(Strings.nullToEmpty(oldCronExpression))) {
scheduler.rescheduleJob(triggerKey, cronTrigger);
logger.info(
"reschedule job trigger, triggerName: {}, triggerGroupName: {}, cronExpression: {}, startDate: {}, endDate: {}",
triggerKey.getName(), triggerKey.getGroup(), cronExpression, startDate, endDate);
}
} else {
scheduler.scheduleJob(cronTrigger);
logger.info(
"schedule job trigger, triggerName: {}, triggerGroupName: {}, cronExpression: {}, startDate: {}, endDate: {}",
triggerKey.getName(), triggerKey.getGroup(), cronExpression, startDate, endDate);
}
} catch (Exception e) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,286 |
[Improvement][Scheduler] Use withMisfireHandlingInstructionIgnoreMisfires to handle misfire
|
### 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
When we update the scheduler, the quartz will do misfire, since the start time is less then the current data, quartz will believe we have misfired some trigger.
When we update the scheduler, we need to change the start time in quartz to avoid this.
### 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/13286
|
https://github.com/apache/dolphinscheduler/pull/13285
|
5077fa6aaef436e24615ca2fef9819044df13398
|
df32ef0efb20641a228b999c625f7c3db989b97b
| 2022-12-28T03:11:21Z |
java
| 2022-12-28T06:33:38Z |
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.java
|
logger.error("Failed to add scheduler task, projectId: {}, scheduler: {}", projectId, schedule, e);
throw new SchedulerException("Add schedule job failed", e);
} finally {
lock.writeLock().unlock();
}
}
@Override
public void deleteScheduleTask(int projectId, int scheduleId) throws SchedulerException {
JobKey jobKey = QuartzTaskUtils.getJobKey(scheduleId, projectId);
try {
if (scheduler.checkExists(jobKey)) {
logger.info("Try to delete scheduler task, projectId: {}, schedulerId: {}", projectId, scheduleId);
scheduler.deleteJob(jobKey);
}
} catch (Exception e) {
logger.error("Failed to delete scheduler task, projectId: {}, schedulerId: {}", projectId, scheduleId, e);
throw new SchedulerException("Failed to delete scheduler task");
}
}
@Override
public void close() {
try {
scheduler.shutdown();
} catch (org.quartz.SchedulerException e) {
throw new SchedulerException("Failed to shutdown scheduler", e);
}
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,089 |
[Bug] [Server] Once click online schedule time, task will be automatically scheduled
|
### 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
v3.0.2
For a workflow with a schedule time, on the `Cron management` page, when we click offline and then click online, and the task will be automatically scheduled once.
<img width="1135" alt="image" src="https://user-images.githubusercontent.com/18065113/205472202-3131a018-14bf-4016-8e55-bbae9be1ca8e.png">
### What you expected to happen
Expected workflow won't be schedule when just click online
### How to reproduce
we click offline and then click online on the `Cron management` page
### Anything else
_No response_
### Version
3.0.x
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
|
https://github.com/apache/dolphinscheduler/issues/13089
|
https://github.com/apache/dolphinscheduler/pull/13092
|
df32ef0efb20641a228b999c625f7c3db989b97b
|
7497b26979ec1ba5c473c99d8e51a97c91250f25
| 2022-12-04T03:06:54Z |
java
| 2022-12-28T06:51:59Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.api.enums;
import java.util.Locale;
import java.util.Optional;
import org.springframework.context.i18n.LocaleContextHolder;
/**
* status enum // todo #4855 One category one interval
*/
public enum Status {
SUCCESS(0, "success", "成功"),
INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"),
REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,089 |
[Bug] [Server] Once click online schedule time, task will be automatically scheduled
|
### 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
v3.0.2
For a workflow with a schedule time, on the `Cron management` page, when we click offline and then click online, and the task will be automatically scheduled once.
<img width="1135" alt="image" src="https://user-images.githubusercontent.com/18065113/205472202-3131a018-14bf-4016-8e55-bbae9be1ca8e.png">
### What you expected to happen
Expected workflow won't be schedule when just click online
### How to reproduce
we click offline and then click online on the `Cron management` page
### Anything else
_No response_
### Version
3.0.x
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
|
https://github.com/apache/dolphinscheduler/issues/13089
|
https://github.com/apache/dolphinscheduler/pull/13092
|
df32ef0efb20641a228b999c625f7c3db989b97b
|
7497b26979ec1ba5c473c99d8e51a97c91250f25
| 2022-12-04T03:06:54Z |
java
| 2022-12-28T06:51:59Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
|
TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"),
USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"),
USER_NAME_NULL(10004, "user name is null", "用户名不能为空"),
HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"),
TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"),
OS_TENANT_CODE_EXIST(10009, "os tenant code {0} already exists", "操作系统租户[{0}]已存在"),
USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"),
ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"),
ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"),
USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"),
LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"),
DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"),
DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"),
TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"),
PROJECT_NOT_FOUND(10018, "project {0} not found ", "项目[{0}]不存在"),
PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"),
TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"),
TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"),
SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"),
SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"),
SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"),
MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"),
SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"),
CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"),
QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup e询告警组错误"),
LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"),
UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"),
DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"),
ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"),
CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,089 |
[Bug] [Server] Once click online schedule time, task will be automatically scheduled
|
### 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
v3.0.2
For a workflow with a schedule time, on the `Cron management` page, when we click offline and then click online, and the task will be automatically scheduled once.
<img width="1135" alt="image" src="https://user-images.githubusercontent.com/18065113/205472202-3131a018-14bf-4016-8e55-bbae9be1ca8e.png">
### What you expected to happen
Expected workflow won't be schedule when just click online
### How to reproduce
we click offline and then click online on the `Cron management` page
### Anything else
_No response_
### Version
3.0.x
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
|
https://github.com/apache/dolphinscheduler/issues/13089
|
https://github.com/apache/dolphinscheduler/pull/13092
|
df32ef0efb20641a228b999c625f7c3db989b97b
|
7497b26979ec1ba5c473c99d8e51a97c91250f25
| 2022-12-04T03:06:54Z |
java
| 2022-12-28T06:51:59Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
|
UPDATE_DATASOURCE_ERROR(10034, "update datasource error", "更新数据源错误"),
QUERY_DATASOURCE_ERROR(10035, "query datasource e询数据源错误"),
CONNECT_DATASOURCE_FAILURE(10036, "connect datasource failure", "建立数据源连接失败"),
CONNECTION_TEST_FAILURE(10037, "connection test failure", "测试数据源连接失败"),
DELETE_DATA_SOURCE_FAILURE(10038, "delete data source failure", "删除数据源失败"),
VERIFY_DATASOURCE_NAME_FAILURE(10039, "verify datasource name failure", "验证数据源名称失败"),
UNAUTHORIZED_DATASOURCE(10040, "unauthorized datasource", "未经授权的数据源"),
AUTHORIZED_DATA_SOURCE(10041, "authorized data source", "授权数据源失败"),
LOGIN_SUCCESS(10042, "login success", "登录成功"),
USER_LOGIN_FAILURE(10043, "user login failure", "用户登录失败"),
LIST_WORKERS_ERROR(10044, "list workers e询worker列表错误"),
LIST_MASTERS_ERROR(10045, "list masters e询master列表错误"),
UPDATE_PROJECT_ERROR(10046, "update project error", "更新项目信息错误"),
QUERY_PROJECT_DETAILS_BY_CODE_ERROR(10047, "query project details by code e询项目详细信息错误"),
CREATE_PROJECT_ERROR(10048, "create project error", "创建项目错误"),
LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049, "login user query project list paging error", "分页查询项目列表错误"),
DELETE_PROJECT_ERROR(10050, "delete project error", "删除项目错误"),
QUERY_UNAUTHORIZED_PROJECT_ERROR(10051, "query unauthorized project e询未授权项目错误"),
QUERY_AUTHORIZED_PROJECT(10052, "query authorized project", "查询授权项目错误"),
QUERY_QUEUE_LIST_ERROR(10053, "query queue list e询队列列表错误"),
CREATE_RESOURCE_ERROR(10054, "create resource error", "创建资源错误"),
UPDATE_RESOURCE_ERROR(10055, "update resource error", "更新资源错误"),
QUERY_RESOURCES_LIST_ERROR(10056, "query resources list e询资源列表错误"),
QUERY_RESOURCES_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"),
DELETE_RESOURCE_ERROR(10058, "delete resource error", "删除资源错误"),
VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059, "verify resource by name and type error", "资源名称或类型验证错误"),
VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060, "view resource file online e看资源文件错误"),
CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061, "create resource file online error", "创建资源文件错误"),
RESOURCE_FILE_IS_EMPTY(10062, "resource file is empty", "资源文件内容不能为空"),
EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063, "edit resource file online error", "更新资源文件错误"),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 13,089 |
[Bug] [Server] Once click online schedule time, task will be automatically scheduled
|
### 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
v3.0.2
For a workflow with a schedule time, on the `Cron management` page, when we click offline and then click online, and the task will be automatically scheduled once.
<img width="1135" alt="image" src="https://user-images.githubusercontent.com/18065113/205472202-3131a018-14bf-4016-8e55-bbae9be1ca8e.png">
### What you expected to happen
Expected workflow won't be schedule when just click online
### How to reproduce
we click offline and then click online on the `Cron management` page
### Anything else
_No response_
### Version
3.0.x
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
|
https://github.com/apache/dolphinscheduler/issues/13089
|
https://github.com/apache/dolphinscheduler/pull/13092
|
df32ef0efb20641a228b999c625f7c3db989b97b
|
7497b26979ec1ba5c473c99d8e51a97c91250f25
| 2022-12-04T03:06:54Z |
java
| 2022-12-28T06:51:59Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
|
DOWNLOAD_RESOURCE_FILE_ERROR(10064, "download resource file error", "下载资源文件错误"),
CREATE_UDF_FUNCTION_ERROR(10065, "create udf function error", "创建UDF函数错误"),
VIEW_UDF_FUNCTION_ERROR(10066, "view udf function e询UDF函数错误"),
UPDATE_UDF_FUNCTION_ERROR(10067, "update udf function error", "更新UDF函数错误"),
QUERY_UDF_FUNCTION_LIST_PAGING_ERROR(10068, "query udf function list paging error", "分页查询UDF函数列表错误"),
QUERY_DATASOURCE_BY_TYPE_ERROR(10069, "query datasource by type e询数据源信息错误"),
VERIFY_UDF_FUNCTION_NAME_ERROR(10070, "verify udf function name error", "UDF函数名称验证错误"),
DELETE_UDF_FUNCTION_ERROR(10071, "delete udf function error", "删除UDF函数错误"),
AUTHORIZED_FILE_RESOURCE_ERROR(10072, "authorized file resource error", "授权资源文件错误"),
AUTHORIZE_RESOURCE_TREE(10073, "authorize resource tree display error", "授权资源目录树错误"),
UNAUTHORIZED_UDF_FUNCTION_ERROR(10074, "unauthorized udf function e询未授权UDF函数错误"),
AUTHORIZED_UDF_FUNCTION_ERROR(10075, "authorized udf function error", "授权UDF函数错误"),
CREATE_SCHEDULE_ERROR(10076, "create schedule error", "创建调度配置错误"),
UPDATE_SCHEDULE_ERROR(10077, "update schedule error", "更新调度配置错误"),
PUBLISH_SCHEDULE_ONLINE_ERROR(10078, "publish schedule online error", "上线调度配置错误"),
OFFLINE_SCHEDULE_ERROR(10079, "offline schedule error", "下线调度配置错误"),
QUERY_SCHEDULE_LIST_PAGING_ERROR(10080, "query schedule list paging error", "分页查询调度配置列表错误"),
QUERY_SCHEDULE_LIST_ERROR(10081, "query schedule list e询调度配置列表错误"),
QUERY_TASK_LIST_PAGING_ERROR(10082, "query task list paging error", "分页查询任务列表错误"),
QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083, "query task record list paging error", "分页查询任务记录错误"),
CREATE_TENANT_ERROR(10084, "create tenant error", "创建租户错误"),
QUERY_TENANT_LIST_PAGING_ERROR(10085, "query tenant list paging error", "分页查询租户列表错误"),
QUERY_TENANT_LIST_ERROR(10086, "query tenant list e询租户列表错误"),
UPDATE_TENANT_ERROR(10087, "update tenant error", "更新租户错误"),
DELETE_TENANT_BY_ID_ERROR(10088, "delete tenant by id error", "删除租户错误"),
VERIFY_OS_TENANT_CODE_ERROR(10089, "verify os tenant code error", "操作系统租户验证错误"),
CREATE_USER_ERROR(10090, "create user error", "创建用户错误"),
QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"),
UPDATE_USER_ERROR(10092, "update user error", "更新用户错误"),
DELETE_USER_BY_ID_ERROR(10093, "delete user by id error", "删除用户错误"),
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.