status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ public static final String TIMESTAMP = "timestamp"; public static final char SUBTRACT_CHAR = '-'; public static final char ADD_CHAR = '+'; public static final char MULTIPLY_CHAR = '*'; public static final char DIVISION_CHAR = '/'; public static final char LEFT_BRACE_CHAR = '('; public static final char RIGHT_BRACE_CHAR = ')'; public static final String ADD_STRING = "+"; public static final String STAR = "*"; public static final String DIVISION_STRING = "/"; public static final String LEFT_BRACE_STRING = "("; public static final char P = 'P'; public static final char N = 'N'; public static final String SUBTRACT_STRING = "-"; public static final String GLOBAL_PARAMS = "globalParams"; public static final String LOCAL_PARAMS = "localParams"; public static final String SUBPROCESS_INSTANCE_ID = "subProcessInstanceId"; public static final String PROCESS_INSTANCE_STATE = "processInstanceState"; public static final String PARENT_WORKFLOW_INSTANCE = "parentWorkflowInstance"; public static final String CONDITION_RESULT = "conditionResult"; public static final String SWITCH_RESULT = "switchResult"; public static final String WAIT_START_TIMEOUT = "waitStartTimeout"; public static final String DEPENDENCE = "dependence"; public static final String TASK_LIST = "taskList"; public static final String QUEUE = "queue"; public static final String QUEUE_NAME = "queueName"; public static final int LOG_QUERY_SKIP_LINE_NUMBER = 0; public static final int LOG_QUERY_LIMIT = 4096; public static final String BLOCKING_CONDITION = "blockingCondition";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String ALERT_WHEN_BLOCKING = "alertWhenBlocking"; /** * master/worker server use for zk */ public static final String MASTER_TYPE = "master"; public static final String WORKER_TYPE = "worker"; public static final String DELETE_OP = "delete"; public static final String ADD_OP = "add"; public static final String ALIAS = "alias"; public static final String CONTENT = "content"; public static final String DEPENDENT_SPLIT = ":||"; public static final long DEPENDENT_ALL_TASK_CODE = 0; /** * preview schedule execute count */ public static final int PREVIEW_SCHEDULE_EXECUTE_COUNT = 5; /** * kerberos */ public static final String KERBEROS = "kerberos"; /** * kerberos expire time */ public static final String KERBEROS_EXPIRE_TIME = "kerberos.expire.time"; /** * java.security.krb5.conf */ public static final String JAVA_SECURITY_KRB5_CONF = "java.security.krb5.conf"; /** * java.security.krb5.conf.path
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ public static final String JAVA_SECURITY_KRB5_CONF_PATH = "java.security.krb5.conf.path"; /** * hadoop.security.authentication */ public static final String HADOOP_SECURITY_AUTHENTICATION = "hadoop.security.authentication"; /** * hadoop.security.authentication */ public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = "hadoop.security.authentication.startup.state"; /** * com.amazonaws.services.s3.enableV4 */ public static final String AWS_S3_V4 = "com.amazonaws.services.s3.enableV4"; /** * loginUserFromKeytab user */ public static final String LOGIN_USER_KEY_TAB_USERNAME = "login.user.keytab.username"; /** * loginUserFromKeytab path */ public static final String LOGIN_USER_KEY_TAB_PATH = "login.user.keytab.path"; /** * task log info format */ public static final String TASK_LOG_INFO_FORMAT = "TaskLogInfo-%s"; public static final int[] NOT_TERMINATED_STATES = new int[]{ ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), ExecutionStatus.DISPATCH.ordinal(), ExecutionStatus.RUNNING_EXECUTION.ordinal(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
ExecutionStatus.DELAY_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal(), ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(), ExecutionStatus.WAITING_THREAD.ordinal(), ExecutionStatus.WAITING_DEPEND.ordinal() }; public static final int[] RUNNING_PROCESS_STATE = new int[]{ ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), ExecutionStatus.DISPATCH.ordinal(), ExecutionStatus.SERIAL_WAIT.ordinal() }; /** * status */ public static final String STATUS = "status"; /** * message */ public static final String MSG = "msg"; /** * data total */ public static final String COUNT = "count"; /** * page size */ public static final String PAGE_SIZE = "pageSize"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* current page no */ public static final String PAGE_NUMBER = "pageNo"; /** * */ public static final String DATA_LIST = "data"; public static final String TOTAL_LIST = "totalList"; public static final String CURRENT_PAGE = "currentPage"; public static final String TOTAL_PAGE = "totalPage"; public static final String TOTAL = "total"; /** * workflow */ public static final String WORKFLOW_LIST = "workFlowList"; public static final String WORKFLOW_RELATION_LIST = "workFlowRelationList"; /** * session user */ public static final String SESSION_USER = "session.user"; public static final String SESSION_ID = "sessionId"; /** * locale */ public static final String LOCALE_LANGUAGE = "language"; /** * database type */ public static final String MYSQL = "MYSQL"; public static final String HIVE = "HIVE";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String ADDRESS = "address"; public static final String DATABASE = "database"; public static final String OTHER = "other"; public static final String USER = "user"; public static final String JDBC_URL = "jdbcUrl"; /** * session timeout */ public static final int SESSION_TIME_OUT = 7200; public static final int MAX_FILE_SIZE = 1024 * 1024 * 1024; public static final String UDF = "UDF"; public static final String CLASS = "class"; /** * dataSource sensitive param */ public static final String DATASOURCE_PASSWORD_REGEX = "(?<=((?i)password((\\\\\":\\\\\")|(=')))).*?(?=((\\\\\")|(')))"; /** * default worker group */ public static final String DEFAULT_WORKER_GROUP = "default"; /** * authorize writable perm */ public static final int AUTHORIZE_WRITABLE_PERM = 7; /** * authorize readable perm */ public static final int AUTHORIZE_READABLE_PERM = 4; public static final int NORMAL_NODE_STATUS = 0; public static final int ABNORMAL_NODE_STATUS = 1;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final int BUSY_NODE_STATUE = 2; public static final String START_TIME = "start time"; public static final String END_TIME = "end time"; public static final String START_END_DATE = "startDate,endDate"; /** * system line separator */ public static final String SYSTEM_LINE_SEPARATOR = System.getProperty("line.separator"); /** * datasource encryption salt */ public static final String DATASOURCE_ENCRYPTION_SALT_DEFAULT = "!@#$%^&*"; public static final String DATASOURCE_ENCRYPTION_ENABLE = "datasource.encryption.enable"; public static final String DATASOURCE_ENCRYPTION_SALT = "datasource.encryption.salt"; /** * network interface preferred */ public static final String DOLPHIN_SCHEDULER_NETWORK_INTERFACE_PREFERRED = "dolphin.scheduler.network.interface.preferred"; /** * network IP gets priority, default inner outer */ public static final String DOLPHIN_SCHEDULER_NETWORK_PRIORITY_STRATEGY = "dolphin.scheduler.network.priority.strategy"; /** * exec shell scripts */ public static final String SH = "sh"; /** * pstree, get pud and sub pid */ public static final String PSTREE = "pstree";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final Boolean KUBERNETES_MODE = !StringUtils.isEmpty(System.getenv("KUBERNETES_SERVICE_HOST")) && !StringUtils.isEmpty(System.getenv("KUBERNETES_SERVICE_PORT")); /** * dry run flag */ public static final int DRY_RUN_FLAG_NO = 0; public static final int DRY_RUN_FLAG_YES = 1; /** * data.quality.error.output.path */ public static final String DATA_QUALITY_ERROR_OUTPUT_PATH = "data-quality.error.output.path"; public static final String CACHE_KEY_VALUE_ALL = "'all'"; /** * use for k8s */ public static final String NAMESPACE = "namespace"; public static final String K8S = "k8s"; public static final String LIMITS_CPU = "limitsCpu"; public static final String LIMITS_MEMORY = "limitsMemory"; public static final String K8S_LOCAL_TEST_CLUSTER = "ds_null_k8s"; /** * schedule timezone */ public static final String SCHEDULE_TIMEZONE = "schedule_timezone"; public static final int RESOURCE_FULL_NAME_MAX_LENGTH = 128; /** * tenant */ public static final int TENANT_FULL_NAME_MAX_LENGTH = 30; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
* See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.entity; import static org.apache.dolphinscheduler.common.Constants.SEC_2_MINUTES_TIME_UNIT; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_BLOCKING; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_CONDITIONS; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DEPENDENT; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_SUB_PROCESS; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_SWITCH; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.plugin.task.api.parameters.DependentParameters; import org.apache.dolphinscheduler.plugin.task.api.parameters.SwitchParameters; import java.io.Serializable; import java.util.Date; import java.util.Map; 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.fasterxml.jackson.core.type.TypeReference; /** * task instance */ @TableName("t_ds_task_instance")
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
public class TaskInstance implements Serializable { /** * id */ @TableId(value = "id", type = IdType.AUTO) private int id; /** * task name */ private String name; /** * task type */ private String taskType; /** * process instance id */ private int processInstanceId; /** * task code */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
private long taskCode; /** * task definition version */ private int taskDefinitionVersion; /** * process instance name */ @TableField(exist = false) private String processInstanceName; /** * process instance name */ @TableField(exist = false) private int taskGroupPriority; /** * state */ private ExecutionStatus state; /** * task first submit time. */ private Date firstSubmitTime; /** * task submit time */ private Date submitTime; /** * task start time */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
private Date startTime; /** * task end time */ private Date endTime; /** * task host */ private String host; /** * task shell execute path and the resource down from hdfs * default path: $base_run_dir/processInstanceId/taskInstanceId/retryTimes */ private String executePath; /** * task log path * default path: $base_run_dir/processInstanceId/taskInstanceId/retryTimes */ private String logPath; /** * retry times */ private int retryTimes; /** * alert flag */ private Flag alertFlag; /** * process instance */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
@TableField(exist = false) private ProcessInstance processInstance; /** * process definition */ @TableField(exist = false) private ProcessDefinition processDefine; /** * task definition */ @TableField(exist = false) private TaskDefinition taskDefine; /** * process id */ private int pid; /** * appLink */ private String appLink; /** * flag */ private Flag flag; /** * dependency */ @TableField(exist = false) private DependentParameters dependency; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
* switch dependency */ @TableField(exist = false) private SwitchParameters switchDependency; /** * duration */ @TableField(exist = false) private String duration; /** * max retry times */ private int maxRetryTimes; /** * task retry interval, unit: minute */ private int retryInterval; /** * task intance priority */ private Priority taskInstancePriority; /** * process intance priority */ @TableField(exist = false) private Priority processInstancePriority; /** * dependent state */ @TableField(exist = false)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
private String dependentResult; /** * workerGroup */ private String workerGroup; /** * environment code */ private Long environmentCode; /** * environment config */ private String environmentConfig; /** * executor id */ private int executorId; /** * varPool string */ private String varPool; /** * executor name */ @TableField(exist = false) private String executorName; @TableField(exist = false) private Map<String, String> resources; /** * delay execution time.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
*/ private int delayTime; /** * task params */ private String taskParams; /** * dry run flag */ private int dryRun; /** * task group id */ private int taskGroupId; public void init(String host, Date startTime, String executePath) { this.host = host; this.startTime = startTime; this.executePath = executePath; } public String getVarPool() { return varPool; } public void setVarPool(String varPool) { this.varPool = varPool; } public int getTaskGroupId() { return taskGroupId; } public void setTaskGroupId(int taskGroupId) { this.taskGroupId = taskGroupId;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public ProcessInstance getProcessInstance() { return processInstance; } public void setProcessInstance(ProcessInstance processInstance) { this.processInstance = processInstance; } public ProcessDefinition getProcessDefine() { return processDefine; } public void setProcessDefine(ProcessDefinition processDefine) { this.processDefine = processDefine; } public TaskDefinition getTaskDefine() { return taskDefine; } public void setTaskDefine(TaskDefinition taskDefine) { this.taskDefine = taskDefine; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public String getTaskType() { return taskType; } public void setTaskType(String taskType) { this.taskType = taskType; } public int getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(int processInstanceId) { this.processInstanceId = processInstanceId; } public ExecutionStatus getState() { return state; } public void setState(ExecutionStatus state) { this.state = state; } public Date getFirstSubmitTime() { return firstSubmitTime; } public void setFirstSubmitTime(Date firstSubmitTime) { this.firstSubmitTime = firstSubmitTime; } public Date getSubmitTime() { return submitTime; } public void setSubmitTime(Date submitTime) { this.submitTime = submitTime;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public String getHost() { return host; } public void setHost(String host) { this.host = host; } public String getExecutePath() { return executePath; } public void setExecutePath(String executePath) { this.executePath = executePath; } public String getLogPath() { return logPath; } public void setLogPath(String logPath) { this.logPath = logPath;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public Flag getAlertFlag() { return alertFlag; } public void setAlertFlag(Flag alertFlag) { this.alertFlag = alertFlag; } public int getRetryTimes() { return retryTimes; } public void setRetryTimes(int retryTimes) { this.retryTimes = retryTimes; } public Boolean isTaskSuccess() { return this.state == ExecutionStatus.SUCCESS; } public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public String getAppLink() { return appLink; } public void setAppLink(String appLink) { this.appLink = appLink; } public Long getEnvironmentCode() { return this.environmentCode;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public void setEnvironmentCode(Long environmentCode) { this.environmentCode = environmentCode; } public String getEnvironmentConfig() { return this.environmentConfig; } public void setEnvironmentConfig(String environmentConfig) { this.environmentConfig = environmentConfig; } public DependentParameters getDependency() { if (this.dependency == null) { Map<String, Object> taskParamsMap = JSONUtils.parseObject(this.getTaskParams(), new TypeReference<Map<String, Object>>() { }); this.dependency = JSONUtils.parseObject((String) taskParamsMap.get(Constants.DEPENDENCE), DependentParameters.class); } return this.dependency; } public void setDependency(DependentParameters dependency) { this.dependency = dependency; } public SwitchParameters getSwitchDependency() { if (this.switchDependency == null) { Map<String, Object> taskParamsMap = JSONUtils.parseObject(this.getTaskParams(), new TypeReference<Map<String, Object>>() { }); this.switchDependency = JSONUtils.parseObject((String) taskParamsMap.get(Constants.SWITCH_RESULT), SwitchParameters.class); } return this.switchDependency; } public void setSwitchDependency(SwitchParameters switchDependency) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
Map<String, Object> taskParamsMap = JSONUtils.parseObject(this.getTaskParams(), new TypeReference<Map<String, Object>>() { }); taskParamsMap.put(Constants.SWITCH_RESULT, JSONUtils.toJsonString(switchDependency)); this.setTaskParams(JSONUtils.toJsonString(taskParamsMap)); } public Flag getFlag() { return flag; } public void setFlag(Flag flag) { this.flag = flag; } public String getProcessInstanceName() { return processInstanceName; } public void setProcessInstanceName(String processInstanceName) { this.processInstanceName = processInstanceName; } public String getDuration() { return duration; } public void setDuration(String duration) { this.duration = duration; } public int getMaxRetryTimes() { return maxRetryTimes; } public void setMaxRetryTimes(int maxRetryTimes) { this.maxRetryTimes = maxRetryTimes; } public int getRetryInterval() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return retryInterval; } public void setRetryInterval(int retryInterval) { this.retryInterval = retryInterval; } public int getExecutorId() { return executorId; } public void setExecutorId(int executorId) { this.executorId = executorId; } public String getExecutorName() { return executorName; } public void setExecutorName(String executorName) { this.executorName = executorName; } public int getDryRun() { return dryRun; } public void setDryRun(int dryRun) { this.dryRun = dryRun; } public boolean isTaskComplete() { return this.getState().typeIsPause() || this.getState().typeIsSuccess() || this.getState().typeIsCancel() || (this.getState().typeIsFailure() && !taskCanRetry()); } public Map<String, String> getResources() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return resources; } public void setResources(Map<String, String> resources) { this.resources = resources; } public boolean isSubProcess() { return TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(this.taskType); } public boolean isDependTask() { return TASK_TYPE_DEPENDENT.equalsIgnoreCase(this.taskType); } public boolean isConditionsTask() { return TASK_TYPE_CONDITIONS.equalsIgnoreCase(this.taskType); } public boolean isSwitchTask() { return TASK_TYPE_SWITCH.equalsIgnoreCase(this.taskType); } public boolean isBlockingTask() { return TASK_TYPE_BLOCKING.equalsIgnoreCase(this.taskType); } /** * determine if a task instance can retry * if subProcess, * * @return can try result */ public boolean taskCanRetry() { if (this.isSubProcess()) { return false; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
if (this.getState() == ExecutionStatus.NEED_FAULT_TOLERANCE) { return true; } return this.getState() == ExecutionStatus.FAILURE && (this.getRetryTimes() < this.getMaxRetryTimes()); } /** * whether the retry interval is timed out * * @return Boolean */ public boolean retryTaskIntervalOverTime() { if (getState() != ExecutionStatus.FAILURE) { return true; } if (getMaxRetryTimes() == 0 || getRetryInterval() == 0) { return true; } Date now = new Date(); long failedTimeInterval = DateUtils.differSec(now, getEndTime()); return getRetryInterval() * SEC_2_MINUTES_TIME_UNIT < failedTimeInterval; } public Priority getTaskInstancePriority() { return taskInstancePriority; } public void setTaskInstancePriority(Priority taskInstancePriority) { this.taskInstancePriority = taskInstancePriority; } public Priority getProcessInstancePriority() { return processInstancePriority;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public void setProcessInstancePriority(Priority processInstancePriority) { this.processInstancePriority = processInstancePriority; } public String getWorkerGroup() { return workerGroup; } public void setWorkerGroup(String workerGroup) { this.workerGroup = workerGroup; } public String getDependentResult() { return dependentResult; } public void setDependentResult(String dependentResult) { this.dependentResult = dependentResult; } public int getDelayTime() { return delayTime; } public void setDelayTime(int delayTime) { this.delayTime = delayTime; } @Override public String toString() { return "TaskInstance{" + "id=" + id + ", name='" + name + '\'' + ", taskType='" + taskType + '\'' + ", processInstanceId=" + processInstanceId + ", processInstanceName='" + processInstanceName + '\''
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
+ ", state=" + state + ", firstSubmitTime=" + firstSubmitTime + ", submitTime=" + submitTime + ", startTime=" + startTime + ", endTime=" + endTime + ", host='" + host + '\'' + ", executePath='" + executePath + '\'' + ", logPath='" + logPath + '\'' + ", retryTimes=" + retryTimes + ", alertFlag=" + alertFlag + ", processInstance=" + processInstance + ", processDefine=" + processDefine + ", pid=" + pid + ", appLink='" + appLink + '\'' + ", flag=" + flag + ", dependency='" + dependency + '\'' + ", duration=" + duration + ", maxRetryTimes=" + maxRetryTimes + ", retryInterval=" + retryInterval + ", taskInstancePriority=" + taskInstancePriority + ", processInstancePriority=" + processInstancePriority + ", dependentResult='" + dependentResult + '\'' + ", workerGroup='" + workerGroup + '\'' + ", environmentCode=" + environmentCode + ", environmentConfig='" + environmentConfig + '\'' + ", executorId=" + executorId + ", executorName='" + executorName + '\'' + ", delayTime=" + delayTime + ", dryRun=" + dryRun + '}';
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public long getTaskCode() { return taskCode; } public void setTaskCode(long taskCode) { this.taskCode = taskCode; } public int getTaskDefinitionVersion() { return taskDefinitionVersion; } public void setTaskDefinitionVersion(int taskDefinitionVersion) { this.taskDefinitionVersion = taskDefinitionVersion; } public String getTaskParams() { return taskParams; } public void setTaskParams(String taskParams) { this.taskParams = taskParams; } public boolean isFirstRun() { return endTime == null; } public int getTaskGroupPriority() { return taskGroupPriority; } public void setTaskGroupPriority(int taskGroupPriority) { this.taskGroupPriority = taskGroupPriority; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.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.server.master.runner.task; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.remote.command.TaskKillRequestCommand; import org.apache.dolphinscheduler.remote.utils.Host; import org.apache.dolphinscheduler.server.master.dispatch.context.ExecutionContext; import org.apache.dolphinscheduler.server.master.dispatch.enums.ExecutorType; import org.apache.dolphinscheduler.server.master.dispatch.exceptions.ExecuteException; import org.apache.dolphinscheduler.server.master.dispatch.executor.NettyExecutorManager; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.queue.TaskPriority; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
import org.apache.dolphinscheduler.service.queue.TaskPriorityQueueImpl; import org.apache.commons.lang.StringUtils; import java.util.Date; import com.google.auto.service.AutoService; /** * common task processor */ @AutoService(ITaskProcessor.class) public class CommonTaskProcessor extends BaseTaskProcessor { private TaskPriorityQueue taskUpdateQueue; private NettyExecutorManager nettyExecutorManager = SpringApplicationContext.getBean(NettyExecutorManager.class); @Override protected boolean submitTask() { this.taskInstance = processService.submitTaskWithRetry(processInstance, taskInstance, maxRetryTimes, commitInterval); if (this.taskInstance == null) { return false; } int taskGroupId = taskInstance.getTaskGroupId(); if (taskGroupId > 0) { boolean acquireTaskGroup = processService.acquireTaskGroup(taskInstance.getId(), taskInstance.getName(), taskGroupId, taskInstance.getProcessInstanceId(), taskInstance.getTaskGroupPriority()); if (!acquireTaskGroup) { logger.info("submit task name :{}, but the first time to try to acquire task group failed", taskInstance.getName()); return true; } } dispatchTask();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
return true; } @Override public boolean runTask() { return true; } @Override protected boolean taskTimeout() { return true; } /** * common task cannot be paused */ @Override protected boolean pauseTask() { return true; } @Override public String getType() { return Constants.COMMON_TASK_TYPE; } @Override public boolean dispatchTask() { try { if (taskUpdateQueue == null) { this.initQueue(); } if (taskInstance.getState().typeIsFinished()) { logger.info(String.format("submit task , but task [%s] state [%s] is already finished. ", taskInstance.getName(), taskInstance.getState().toString())); return true;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
} if (taskInstance.getState() == ExecutionStatus.RUNNING_EXECUTION || taskInstance.getState() == ExecutionStatus.DELAY_EXECUTION) { logger.info("submit task, but the status of the task {} is already running or delayed.", taskInstance.getName()); return true; } logger.info("task ready to submit: {}", taskInstance); TaskPriority taskPriority = new TaskPriority(processInstance.getProcessInstancePriority().getCode(), processInstance.getId(), taskInstance.getProcessInstancePriority().getCode(), taskInstance.getId(), org.apache.dolphinscheduler.common.Constants.DEFAULT_WORKER_GROUP); TaskExecutionContext taskExecutionContext = getTaskExecutionContext(taskInstance); if (taskExecutionContext == null) { logger.error("task get taskExecutionContext fail: {}", taskInstance); return false; } taskPriority.setTaskExecutionContext(taskExecutionContext); taskUpdateQueue.put(taskPriority); logger.info(String.format("master submit success, task : %s", taskInstance.getName())); return true; } catch (Exception e) { logger.error("submit task error", e); return false; } } public void initQueue() { this.taskUpdateQueue = SpringApplicationContext.getBean(TaskPriorityQueueImpl.class); } @Override public boolean killTask() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
try { taskInstance = processService.findTaskInstanceById(taskInstance.getId()); if (taskInstance == null) { return true; } if (taskInstance.getState().typeIsFinished()) { return true; } if (StringUtils.isBlank(taskInstance.getHost())) { taskInstance.setState(ExecutionStatus.KILL); taskInstance.setEndTime(new Date()); processService.updateTaskInstance(taskInstance); return true; } TaskKillRequestCommand killCommand = new TaskKillRequestCommand(); killCommand.setTaskInstanceId(taskInstance.getId()); ExecutionContext executionContext = new ExecutionContext(killCommand.convert2Command(), ExecutorType.WORKER); Host host = Host.of(taskInstance.getHost()); executionContext.setHost(host); nettyExecutorManager.executeDirectly(executionContext); } catch (ExecuteException e) { logger.error("kill task error:", e); return false; } logger.info("master kill taskInstance name :{} taskInstance id:{}", taskInstance.getName(), taskInstance.getId()); return true; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.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.server.master.consumer; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.TimeoutFlag; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.dao.entity.DataSource; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
import org.apache.dolphinscheduler.dao.entity.TaskDefinition; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.server.master.dispatch.ExecutorDispatcher; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.queue.TaskPriority; import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue; import org.apache.dolphinscheduler.spi.enums.DbType; import java.util.Date; import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @Ignore public class TaskPriorityQueueConsumerTest { @Autowired private TaskPriorityQueue<TaskPriority> taskPriorityQueue; @Autowired private TaskPriorityQueueConsumer taskPriorityQueueConsumer; @Autowired private ProcessService processService; @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
private ExecutorDispatcher dispatcher; @Before public void init() { Tenant tenant = new Tenant(); tenant.setId(1); tenant.setTenantCode("journey"); tenant.setDescription("journey"); tenant.setQueueId(1); tenant.setCreateTime(new Date()); tenant.setUpdateTime(new Date()); Mockito.doReturn(tenant).when(processService).getTenantForProcess(1, 2); } @Test public void testSHELLTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(1); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); taskInstance.setProcessDefine(processDefinition);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
TaskPriority taskPriority = new TaskPriority(2, 1, 2, 1, "default"); taskPriorityQueue.put(taskPriority); TimeUnit.SECONDS.sleep(10); Assert.assertNotNull(taskInstance); } @Test public void testSQLTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SQL"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); taskInstance.setProcessDefine(processDefinition); TaskPriority taskPriority = new TaskPriority(2, 1, 2, 1, "default"); taskPriorityQueue.put(taskPriority); DataSource dataSource = new DataSource(); dataSource.setId(1); dataSource.setName("sqlDatasource"); dataSource.setType(DbType.MYSQL); dataSource.setUserId(2); dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\","
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
+ "\"database\":\"dolphinscheduler_qiaozhanwei\"," + "\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\"," + "\"user\":\"root\"," + "\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); Mockito.doReturn(dataSource).when(processService).findDataSourceById(1); TimeUnit.SECONDS.sleep(10); Assert.assertNotNull(taskInstance); } @Test public void testDataxTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("DATAX"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); taskInstance.setProcessDefine(processDefinition); TaskPriority taskPriority = new TaskPriority(2, 1, 2, 1, "default"); taskPriorityQueue.put(taskPriority); DataSource dataSource = new DataSource();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
dataSource.setId(80); dataSource.setName("datax"); dataSource.setType(DbType.MYSQL); dataSource.setUserId(2); dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\"," + "\"database\":\"dolphinscheduler_qiaozhanwei\"," + "\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\"," + "\"user\":\"root\"," + "\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); Mockito.doReturn(dataSource).when(processService).findDataSourceById(80); TimeUnit.SECONDS.sleep(10); Assert.assertNotNull(taskInstance); } @Test public void testSqoopTask() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SQOOP"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); ProcessDefinition processDefinition = new ProcessDefinition();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
processDefinition.setUserId(2); taskInstance.setProcessDefine(processDefinition); TaskPriority taskPriority = new TaskPriority(2, 1, 2, 1, "default"); taskPriorityQueue.put(taskPriority); DataSource dataSource = new DataSource(); dataSource.setId(1); dataSource.setName("datax"); dataSource.setType(DbType.MYSQL); dataSource.setUserId(2); dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\"," + "\"database\":\"dolphinscheduler_qiaozhanwei\"," + "\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\"," + "\"user\":\"root\"," + "\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); Mockito.doReturn(dataSource).when(processService).findDataSourceById(1); TimeUnit.SECONDS.sleep(10); Assert.assertNotNull(taskInstance); } @Test public void testTaskInstanceIsFinalState() { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("default"); taskInstance.setExecutorId(2);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
Mockito.doReturn(taskInstance).when(processService).findTaskInstanceById(1); Boolean state = taskPriorityQueueConsumer.taskInstanceIsFinalState(1); Assert.assertNotNull(state); } @Test public void testNotFoundWorkerGroup() throws Exception { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("NoWorkGroup"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(1); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); taskInstance.setState(ExecutionStatus.DELAY_EXECUTION); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); taskInstance.setProcessDefine(processDefinition); Mockito.doReturn(taskInstance).when(processService).findTaskInstanceById(1); TaskPriority taskPriority = new TaskPriority(2, 1, 2, 1, "NoWorkGroup"); taskPriorityQueue.put(taskPriority); TimeUnit.SECONDS.sleep(10); Assert.assertNotNull(taskInstance); } @Test
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
public void testDispatch() { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("NoWorkGroup"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(1); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); taskInstance.setState(ExecutionStatus.DELAY_EXECUTION); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); processDefinition.setProjectCode(1L); taskInstance.setProcessDefine(processDefinition); TaskDefinition taskDefinition = new TaskDefinition(); taskDefinition.setTimeoutFlag(TimeoutFlag.OPEN); taskInstance.setTaskDefine(taskDefinition); Mockito.doReturn(taskInstance).when(processService).findTaskInstanceById(1); TaskPriority taskPriority = new TaskPriority(); taskPriority.setTaskId(1); boolean res = taskPriorityQueueConsumer.dispatchTask(taskPriority); Assert.assertFalse(res); } @Test public void testRun() throws Exception {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java
TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setTaskType("SHELL"); taskInstance.setProcessInstanceId(1); taskInstance.setState(ExecutionStatus.KILL); taskInstance.setProcessInstancePriority(Priority.MEDIUM); taskInstance.setWorkerGroup("NoWorkGroup"); taskInstance.setExecutorId(2); ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(1); processInstance.setTenantId(1); processInstance.setCommandType(CommandType.START_PROCESS); taskInstance.setProcessInstance(processInstance); taskInstance.setState(ExecutionStatus.DELAY_EXECUTION); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setUserId(2); taskInstance.setProcessDefine(processDefinition); Mockito.doReturn(taskInstance).when(processService).findTaskInstanceById(1); TaskPriority taskPriority = new TaskPriority(2, 1, 2, 1, "NoWorkGroup"); taskPriorityQueue.put(taskPriority); taskPriorityQueueConsumer.run(); TimeUnit.SECONDS.sleep(10); Assert.assertNotEquals(-1, taskPriorityQueue.size()); } @After public void close() { Stopper.stop(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueue.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.service.queue; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.service.exceptions.TaskPriorityQueueException; import java.util.Comparator; import java.util.Iterator; import java.util.PriorityQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; /** * Task instances priority queue implementation * All the task instances are in the same process instance. */ public class PeerTaskInstancePriorityQueue implements TaskPriorityQueue<TaskInstance> {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueue.java
/** * queue size */ private static final Integer QUEUE_MAX_SIZE = 3000; /** * queue */ private PriorityQueue<TaskInstance> queue = new PriorityQueue<>(QUEUE_MAX_SIZE, new TaskInfoComparator()); /** * Lock used for all public operations */ private final ReentrantLock lock = new ReentrantLock(true); /** * put task instance to priority queue * * @param taskInstance taskInstance * @throws TaskPriorityQueueException */ @Override public void put(TaskInstance taskInstance) throws TaskPriorityQueueException { queue.add(taskInstance); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueue.java
* take task info * * @return task instance * @throws TaskPriorityQueueException */ @Override public TaskInstance take() throws TaskPriorityQueueException { return queue.poll(); } /** * poll task info with timeout * <p> * WARN: Please use PriorityBlockingQueue if you want to use poll(timeout, unit) * because this method of override interface used without considering accuracy of timeout * * @param timeout * @param unit * @return * @throws TaskPriorityQueueException * @throws InterruptedException */ @Override public TaskInstance poll(long timeout, TimeUnit unit) throws TaskPriorityQueueException { throw new TaskPriorityQueueException("This operation is not currently supported and suggest to use PriorityBlockingQueue if you want!"); } /** * peek taskInfo * * @return task instance */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueue.java
public TaskInstance peek() { return queue.peek(); } /** * queue size * * @return size */ @Override public int size() { return queue.size(); } /** * clear task * */ public void clear() { queue.clear(); } /** * whether contains the task instance * * @param taskInstance task instance * @return true is contains */ public boolean contains(TaskInstance taskInstance) { return this.contains(taskInstance.getTaskCode(), taskInstance.getTaskDefinitionVersion()); } public boolean contains(long taskCode, int taskVersion) { Iterator<TaskInstance> iterator = this.queue.iterator();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueue.java
while (iterator.hasNext()) { TaskInstance taskInstance = iterator.next(); if (taskCode == taskInstance.getTaskCode() && taskVersion == taskInstance.getTaskDefinitionVersion()) { return true; } } return false; } /** * remove task * * @param taskInstance task instance * @return true if remove success */ public boolean remove(TaskInstance taskInstance) { return queue.remove(taskInstance); } /** * get iterator * * @return Iterator */ public Iterator<TaskInstance> iterator() { return queue.iterator(); } /** * TaskInfoComparator */ private class TaskInfoComparator implements Comparator<TaskInstance> {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueue.java
/** * compare o1 o2 * * @param o1 o1 * @param o2 o2 * @return compare result */ @Override public int compare(TaskInstance o1, TaskInstance o2) { return o1.getTaskInstancePriority().compareTo(o2.getTaskInstancePriority()); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.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.service.queue; import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; import java.util.Map; import java.util.Objects; /** * task priority info */ public class TaskPriority implements Comparable<TaskPriority> {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.java
/** * processInstancePriority */ private int processInstancePriority; /** * processInstanceId */ private int processInstanceId; /** * taskInstancePriority */ private int taskInstancePriority; /** * taskId */ private int taskId; /** * taskExecutionContext */ private TaskExecutionContext taskExecutionContext; /** * groupName */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.java
private String groupName; /** * context */ private Map<String, String> context; /** * checkpoint */ private long checkpoint; public TaskPriority() { this.checkpoint = System.currentTimeMillis(); } public TaskPriority(int processInstancePriority, int processInstanceId, int taskInstancePriority, int taskId, String groupName) { this.processInstancePriority = processInstancePriority; this.processInstanceId = processInstanceId; this.taskInstancePriority = taskInstancePriority; this.taskId = taskId; this.groupName = groupName; this.checkpoint = System.currentTimeMillis(); } public int getProcessInstancePriority() { return processInstancePriority; } public void setProcessInstancePriority(int processInstancePriority) { this.processInstancePriority = processInstancePriority; } public int getProcessInstanceId() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.java
return processInstanceId; } public void setProcessInstanceId(int processInstanceId) { this.processInstanceId = processInstanceId; } public int getTaskInstancePriority() { return taskInstancePriority; } public void setTaskInstancePriority(int taskInstancePriority) { this.taskInstancePriority = taskInstancePriority; } public int getTaskId() { return taskId; } public Map<String, String> getContext() { return context; } public void setTaskId(int taskId) { this.taskId = taskId; } public String getGroupName() { return groupName; } public void setGroupName(String groupName) { this.groupName = groupName; } public void setContext(Map<String, String> context) { this.context = context; } public TaskExecutionContext getTaskExecutionContext() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.java
return taskExecutionContext; } public void setTaskExecutionContext(TaskExecutionContext taskExecutionContext) { this.taskExecutionContext = taskExecutionContext; } public long getCheckpoint() { return checkpoint; } public void setCheckpoint(long checkpoint) { this.checkpoint = checkpoint; } @Override public int compareTo(TaskPriority other) { if (this.getProcessInstancePriority() > other.getProcessInstancePriority()) { return 1; } if (this.getProcessInstancePriority() < other.getProcessInstancePriority()) { return -1; } if (this.getProcessInstanceId() > other.getProcessInstanceId()) { return 1; } if (this.getProcessInstanceId() < other.getProcessInstanceId()) { return -1; } if (this.getTaskInstancePriority() > other.getTaskInstancePriority()) { return 1; } if (this.getTaskInstancePriority() < other.getTaskInstancePriority()) { return -1;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.java
} if (this.getTaskId() > other.getTaskId()) { return 1; } if (this.getTaskId() < other.getTaskId()) { return -1; } return this.getGroupName().compareTo(other.getGroupName()); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TaskPriority that = (TaskPriority) o; return processInstancePriority == that.processInstancePriority && processInstanceId == that.processInstanceId && taskInstancePriority == that.taskInstancePriority && taskId == that.taskId && Objects.equals(groupName, that.groupName); } @Override public int hashCode() { return Objects.hash(processInstancePriority, processInstanceId, taskInstancePriority, taskId, groupName); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueueTest.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.service.queue; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.service.exceptions.TaskPriorityQueueException; import java.util.concurrent.TimeUnit; import org.junit.Assert; import org.junit.Test; public class PeerTaskInstancePriorityQueueTest {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueueTest.java
@Test public void put() throws TaskPriorityQueueException { PeerTaskInstancePriorityQueue queue = new PeerTaskInstancePriorityQueue(); TaskInstance taskInstanceHigPriority = createTaskInstance("high", Priority.HIGH); TaskInstance taskInstanceMediumPriority = createTaskInstance("medium", Priority.MEDIUM); queue.put(taskInstanceHigPriority); queue.put(taskInstanceMediumPriority); Assert.assertEquals(2, queue.size()); } @Test public void take() throws Exception { PeerTaskInstancePriorityQueue queue = getPeerTaskInstancePriorityQueue(); int peekBeforeLength = queue.size(); queue.take(); Assert.assertTrue(queue.size() < peekBeforeLength); } @Test public void poll() throws Exception { PeerTaskInstancePriorityQueue queue = getPeerTaskInstancePriorityQueue(); try { queue.poll(1000, TimeUnit.MILLISECONDS);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueueTest.java
} catch (TaskPriorityQueueException e) { e.printStackTrace(); } } @Test public void peek() throws Exception { PeerTaskInstancePriorityQueue queue = getPeerTaskInstancePriorityQueue(); int peekBeforeLength = queue.size(); queue.peek(); Assert.assertEquals(peekBeforeLength, queue.size()); } @Test public void size() throws Exception { Assert.assertEquals(2, getPeerTaskInstancePriorityQueue().size()); } @Test public void contains() throws Exception { PeerTaskInstancePriorityQueue queue = new PeerTaskInstancePriorityQueue(); TaskInstance taskInstanceMediumPriority = createTaskInstance("medium", Priority.MEDIUM); queue.put(taskInstanceMediumPriority); Assert.assertTrue(queue.contains(taskInstanceMediumPriority)); } @Test public void remove() throws Exception { PeerTaskInstancePriorityQueue queue = new PeerTaskInstancePriorityQueue(); TaskInstance taskInstanceMediumPriority = createTaskInstance("medium", Priority.MEDIUM); queue.put(taskInstanceMediumPriority); int peekBeforeLength = queue.size(); queue.remove(taskInstanceMediumPriority); Assert.assertNotEquals(peekBeforeLength, queue.size());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/PeerTaskInstancePriorityQueueTest.java
} /** * get queue * * @return queue * @throws Exception */ private PeerTaskInstancePriorityQueue getPeerTaskInstancePriorityQueue() throws Exception { PeerTaskInstancePriorityQueue queue = new PeerTaskInstancePriorityQueue(); TaskInstance taskInstanceHigPriority = createTaskInstance("high", Priority.HIGH); TaskInstance taskInstanceMediumPriority = createTaskInstance("medium", Priority.MEDIUM); queue.put(taskInstanceHigPriority); queue.put(taskInstanceMediumPriority); return queue; } /** * create task instance * * @param name name * @param priority priority * @return */ private TaskInstance createTaskInstance(String name, Priority priority) { TaskInstance taskInstance = new TaskInstance(); taskInstance.setName(name); taskInstance.setTaskInstancePriority(priority); return taskInstance; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/TaskPriorityQueueImplTest.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.service.queue; import org.apache.dolphinscheduler.common.enums.Priority; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; import org.junit.Assert; import org.junit.Test; public class TaskPriorityQueueImplTest {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/TaskPriorityQueueImplTest.java
@Test public void testSort() { TaskPriority priorityOne = new TaskPriority(1, 0, 0, 0, "default"); TaskPriority priorityTwo = new TaskPriority(2, 0, 0, 0, "default"); TaskPriority priorityThree = new TaskPriority(3, 0, 0, 0, "default"); List<TaskPriority> taskPrioritys = Arrays.asList(priorityOne, priorityThree, priorityTwo); Collections.sort(taskPrioritys); Assert.assertEquals( Arrays.asList(priorityOne, priorityTwo, priorityThree),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/TaskPriorityQueueImplTest.java
taskPrioritys ); priorityOne = new TaskPriority(0, 1, 0, 0, "default"); priorityTwo = new TaskPriority(0, 2, 0, 0, "default"); priorityThree = new TaskPriority(0, 3, 0, 0, "default"); taskPrioritys = Arrays.asList(priorityOne, priorityThree, priorityTwo); Collections.sort(taskPrioritys); Assert.assertEquals( Arrays.asList(priorityOne, priorityTwo, priorityThree), taskPrioritys ); priorityOne = new TaskPriority(0, 0, 1, 0, "default"); priorityTwo = new TaskPriority(0, 0, 2, 0, "default"); priorityThree = new TaskPriority(0, 0, 3, 0, "default"); taskPrioritys = Arrays.asList(priorityOne, priorityThree, priorityTwo); Collections.sort(taskPrioritys); Assert.assertEquals( Arrays.asList(priorityOne, priorityTwo, priorityThree), taskPrioritys ); priorityOne = new TaskPriority(0, 0, 0, 1, "default"); priorityTwo = new TaskPriority(0, 0, 0, 2, "default"); priorityThree = new TaskPriority(0, 0, 0, 3, "default"); taskPrioritys = Arrays.asList(priorityOne, priorityThree, priorityTwo); Collections.sort(taskPrioritys); Assert.assertEquals( Arrays.asList(priorityOne, priorityTwo, priorityThree), taskPrioritys ); priorityOne = new TaskPriority(0, 0, 0, 0, "default_1");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/TaskPriorityQueueImplTest.java
priorityTwo = new TaskPriority(0, 0, 0, 0, "default_2"); priorityThree = new TaskPriority(0, 0, 0, 0, "default_3"); taskPrioritys = Arrays.asList(priorityOne, priorityThree, priorityTwo); Collections.sort(taskPrioritys); Assert.assertEquals( Arrays.asList(priorityOne, priorityTwo, priorityThree), taskPrioritys ); } @Test public void put() throws Exception { TaskPriorityQueue queue = getPriorityQueue(); Assert.assertEquals(2, queue.size()); } @Test public void take() throws Exception { TaskPriorityQueue queue = getPriorityQueue(); int peekBeforeLength = queue.size(); queue.take(); Assert.assertTrue(queue.size() < peekBeforeLength); } @Test public void poll() throws Exception { TaskPriorityQueue queue = getPriorityQueue(); int peekBeforeLength = queue.size(); queue.poll(1000, TimeUnit.MILLISECONDS); queue.poll(1000, TimeUnit.MILLISECONDS); Assert.assertTrue(queue.size() == 0); queue.poll(1000, TimeUnit.MILLISECONDS); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,092
[Bug] [TaskGroup] Task group does not take effect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Detailed scenario: the task group configures three resources and creates a workflow. Six tasks in the workflow (all of which are executed for 30s) use this task group. The priority in the group is 1 to 6, which corresponds to the task name. The six tasks are in parallel relationship. After startup, 2, 3 and 4 run first, and 1, 5 and 6 run in the second batch. According to the description in the document, the higher the priority number, the higher the priority. The expectation should be 4, 5, 6 and then 1, 2 and 3 Task group does not take effect. ### What you expected to happen Submit higher priority tasks firstly. The order should be 4,5,6 and then 1,2,3 ### How to reproduce up ### 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/10092
https://github.com/apache/dolphinscheduler/pull/10093
63f835715f8ca8bff79c0e7177ebfa5917ebb3bd
ee2b855ced2e46bcdaf3ae7068941ac7e1c03c17
2022-05-18T07:08:16Z
java
2022-05-18T10:40:36Z
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/queue/TaskPriorityQueueImplTest.java
@Test public void size() throws Exception { Assert.assertTrue(getPriorityQueue().size() == 2); } /** * get queue * * @return queue * @throws Exception */ private TaskPriorityQueue getPriorityQueue() throws Exception { TaskPriorityQueue queue = new TaskPriorityQueueImpl(); TaskPriority taskInstanceHigPriority = createTaskPriority(Priority.HIGH.getCode(), 1); TaskPriority taskInstanceMediumPriority = createTaskPriority(Priority.MEDIUM.getCode(), 2); queue.put(taskInstanceHigPriority); queue.put(taskInstanceMediumPriority); return queue; } /** * create task priority * * @param priority * @param processInstanceId * @return */ private TaskPriority createTaskPriority(Integer priority, Integer processInstanceId) { TaskPriority priorityOne = new TaskPriority(priority, processInstanceId, 0, 0, "default"); return priorityOne; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,051
[Bug] [deploy on k8s ] worker server and alert server always crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### What you expected to happen [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### How to reproduce . ### Anything else . ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10051
https://github.com/apache/dolphinscheduler/pull/10111
9ab3bebc9011984ef8ec7165ae4c74425f1de9c0
844ae42ee4ba2b2423906891c5dba102aa89a0e3
2022-05-17T02:31:29Z
java
2022-05-19T02:51:37Z
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.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.alert;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,051
[Bug] [deploy on k8s ] worker server and alert server always crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### What you expected to happen [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### How to reproduce . ### Anything else . ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10051
https://github.com/apache/dolphinscheduler/pull/10111
9ab3bebc9011984ef8ec7165ae4c74425f1de9c0
844ae42ee4ba2b2423906891c5dba102aa89a0e3
2022-05-17T02:31:29Z
java
2022-05-19T02:51:37Z
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.thread.ThreadUtils; import org.apache.dolphinscheduler.dao.PluginDao; import org.apache.dolphinscheduler.remote.NettyRemotingServer; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.config.NettyServerConfig; import java.io.Closeable; import javax.annotation.PreDestroy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.event.EventListener; @SpringBootApplication @ComponentScan("org.apache.dolphinscheduler") public class AlertServer implements Closeable { private static final Logger logger = LoggerFactory.getLogger(AlertServer.class); private final PluginDao pluginDao; private final AlertSenderService alertSenderService; private final AlertRequestProcessor alertRequestProcessor; private final AlertConfig alertConfig; private NettyRemotingServer nettyRemotingServer; public AlertServer(PluginDao pluginDao, AlertSenderService alertSenderService, AlertRequestProcessor alertRequestProcessor, AlertConfig alertConfig) { this.pluginDao = pluginDao; this.alertSenderService = alertSenderService; this.alertRequestProcessor = alertRequestProcessor;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,051
[Bug] [deploy on k8s ] worker server and alert server always crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### What you expected to happen [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### How to reproduce . ### Anything else . ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10051
https://github.com/apache/dolphinscheduler/pull/10111
9ab3bebc9011984ef8ec7165ae4c74425f1de9c0
844ae42ee4ba2b2423906891c5dba102aa89a0e3
2022-05-17T02:31:29Z
java
2022-05-19T02:51:37Z
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
this.alertConfig = alertConfig; } /** * alert server startup, not use web service * * @param args arguments */ public static void main(String[] args) { Thread.currentThread().setName(Constants.THREAD_NAME_ALERT_SERVER); new SpringApplicationBuilder(AlertServer.class).web(WebApplicationType.NONE).run(args); } @EventListener public void run(ApplicationReadyEvent readyEvent) { logger.info("alert server starting..."); checkTable(); startServer(); alertSenderService.start(); } @Override @PreDestroy public void close() { destroy("alert server destroy"); } /** * gracefully stop * * @param cause stop cause */ public void destroy(String cause) { try {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,051
[Bug] [deploy on k8s ] worker server and alert server always crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### What you expected to happen [Bug] [deploy on k8s ] worker server and alert server always crash curl not found in worker Warning Unhealthy 33m (x641 over 14h) kubelet Readiness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown Warning BackOff 8m12s (x2238 over 14h) kubelet Back-off restarting failed container Warning Unhealthy 3m23s (x573 over 14h) kubelet Liveness probe failed: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown alert crash without log kubelet Back-off restarting failed container ### How to reproduce . ### Anything else . ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10051
https://github.com/apache/dolphinscheduler/pull/10111
9ab3bebc9011984ef8ec7165ae4c74425f1de9c0
844ae42ee4ba2b2423906891c5dba102aa89a0e3
2022-05-17T02:31:29Z
java
2022-05-19T02:51:37Z
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
if (Stopper.isStopped()) { return; } logger.info("alert server is stopping ..., cause : {}", cause); Stopper.stop(); ThreadUtils.sleep(3000L); this.nettyRemotingServer.close(); } catch (Exception e) { logger.error("alert server stop exception ", e); } } private void checkTable() { if (!pluginDao.checkPluginDefineTableExist()) { logger.error("Plugin Define Table t_ds_plugin_define Not Exist . Please Create it First !"); System.exit(1); } } private void startServer() { NettyServerConfig serverConfig = new NettyServerConfig(); serverConfig.setListenPort(alertConfig.getPort()); nettyRemotingServer = new NettyRemotingServer(serverConfig); nettyRemotingServer.registerProcessor(CommandType.ALERT_SEND_REQUEST, alertRequestProcessor); nettyRemotingServer.start(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.controller; import static org.apache.dolphinscheduler.api.enums.Status.BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.DELETE_PROCESS_INSTANCE_BY_ID_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_INSTANCE_BY_ID_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR; import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROCESS_INSTANCE_ERROR; import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.exceptions.ApiException; import org.apache.dolphinscheduler.api.service.ProcessInstanceService; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.utils.ParameterUtils; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
import org.apache.commons.lang.StringUtils; import java.io.IOException; import java.text.MessageFormat; import java.util.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.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.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import springfox.documentation.annotations.ApiIgnore; /** * process instance controller */ @Api(tags = "PROCESS_INSTANCE_TAG") @RestController @RequestMapping("/projects/{projectCode}/process-instances")
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
public class ProcessInstanceController extends BaseController { private static final Logger logger = LoggerFactory.getLogger(ProcessInstanceController.class); @Autowired ProcessInstanceService processInstanceService; /** * query process instance list paging * * @param loginUser login user * @param projectCode project code * @param pageNo page number * @param pageSize page size * @param processDefineCode process definition code * @param searchVal search value * @param stateType state type * @param host host * @param startTime start time * @param endTime end time * @return process instance list */ @ApiOperation(value = "queryProcessInstanceListPaging", notes = "QUERY_PROCESS_INSTANCE_LIST_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "processDefiniteCode", value = "PROCESS_DEFINITION_CODE", dataType = "Long", example = "100"), @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"), @ApiImplicitParam(name = "executorName", value = "EXECUTOR_NAME", type = "String"), @ApiImplicitParam(name = "stateType", value = "EXECUTION_STATUS", type = "ExecutionStatus"), @ApiImplicitParam(name = "host", value = "HOST", type = "String"), @ApiImplicitParam(name = "startDate", value = "START_DATE", type = "String"), @ApiImplicitParam(name = "endDate", value = "END_DATE", type = "String"), @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"), @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10")
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
}) @GetMapping() @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result queryProcessInstanceList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam(value = "processDefineCode", required = false, defaultValue = "0") long processDefineCode, @RequestParam(value = "searchVal", required = false) String searchVal, @RequestParam(value = "executorName", required = false) String executorName, @RequestParam(value = "stateType", required = false) ExecutionStatus stateType, @RequestParam(value = "host", required = false) String host, @RequestParam(value = "startDate", required = false) String startTime, @RequestParam(value = "endDate", required = false) String endTime, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize) { Result result = checkPageParams(pageNo, pageSize); if (!result.checkResult()) { return result; } searchVal = ParameterUtils.handleEscapes(searchVal); result = processInstanceService.queryProcessInstanceList(loginUser, projectCode, processDefineCode, startTime, endTime, searchVal, executorName, stateType, host, pageNo, pageSize); return result; } /** * query task list by process instance id * * @param loginUser login user * @param projectCode project code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
* @param id process instance id * @return task list for the process instance */ @ApiOperation(value = "queryTaskListByProcessId", notes = "QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/{id}/tasks") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result queryTaskListByProcessId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @PathVariable("id") Integer id) throws IOException { Map<String, Object> result = processInstanceService.queryTaskListByProcessId(loginUser, projectCode, id); return returnDataList(result); } /** * update process instance * * @param loginUser login user * @param projectCode project code * @param taskRelationJson process task relation json * @param taskDefinitionJson taskDefinitionJson * @param id process instance id * @param scheduleTime schedule time * @param syncDefine sync define * @param locations locations * @param tenantCode tenantCode * @return update result code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
*/ @ApiOperation(value = "updateProcessInstance", notes = "UPDATE_PROCESS_INSTANCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "taskRelationJson", value = "TASK_RELATION_JSON", type = "String"), @ApiImplicitParam(name = "taskDefinitionJson", value = "TASK_DEFINITION_JSON", type = "String"), @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "1"), @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", type = "String"), @ApiImplicitParam(name = "syncDefine", value = "SYNC_DEFINE", required = true, type = "Boolean", example = "false"), @ApiImplicitParam(name = "globalParams", value = "PROCESS_GLOBAL_PARAMS", type = "String", example = "[]"), @ApiImplicitParam(name = "locations", value = "PROCESS_INSTANCE_LOCATIONS", type = "String"), @ApiImplicitParam(name = "timeout", value = "PROCESS_TIMEOUT", type = "Int", example = "0"), @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", type = "String", example = "default") }) @PutMapping(value = "/{id}") @ResponseStatus(HttpStatus.OK) @ApiException(UPDATE_PROCESS_INSTANCE_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result updateProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam(value = "taskRelationJson", required = true) String taskRelationJson, @RequestParam(value = "taskDefinitionJson", required = true) String taskDefinitionJson, @PathVariable(value = "id") Integer id, @RequestParam(value = "scheduleTime", required = false) String scheduleTime, @RequestParam(value = "syncDefine", required = true) Boolean syncDefine, @RequestParam(value = "globalParams", required = false, defaultValue = "[]") String globalParams, @RequestParam(value = "locations", required = false) String locations, @RequestParam(value = "timeout", required = false, defaultValue = "0") int timeout, @RequestParam(value = "tenantCode", required = true) String tenantCode) { Map<String, Object> result = processInstanceService.updateProcessInstance(loginUser, projectCode, id, taskRelationJson, taskDefinitionJson, scheduleTime, syncDefine, globalParams, locations, timeout, tenantCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
return returnDataList(result); } /** * query process instance by id * * @param loginUser login user * @param projectCode project code * @param id process instance id * @return process instance detail */ @ApiOperation(value = "queryProcessInstanceById", notes = "QUERY_PROCESS_INSTANCE_BY_ID_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/{id}") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result queryProcessInstanceById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @PathVariable("id") Integer id) { Map<String, Object> result = processInstanceService.queryProcessInstanceById(loginUser, projectCode, id); return returnDataList(result); } /** * query top n process instance order by running duration * * @param loginUser login user * @param projectCode project code * @param size number of process instance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
* @param startTime start time * @param endTime end time * @return list of process instance */ @ApiOperation(value = "queryTopNLongestRunningProcessInstance", notes = "QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "size", value = "PROCESS_INSTANCE_SIZE", required = true, dataType = "Int", example = "10"), @ApiImplicitParam(name = "startTime", value = "PROCESS_INSTANCE_START_TIME", required = true, dataType = "String"), @ApiImplicitParam(name = "endTime", value = "PROCESS_INSTANCE_END_TIME", required = true, dataType = "String"), }) @GetMapping(value = "/top-n") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result<ProcessInstance> queryTopNLongestRunningProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam("size") Integer size, @RequestParam(value = "startTime", required = true) String startTime, @RequestParam(value = "endTime", required = true) String endTime) { Map<String, Object> result = processInstanceService.queryTopNLongestRunningProcessInstance(loginUser, projectCode, size, startTime, endTime); return returnDataList(result); } /** * delete process instance by id, at the same time, * delete task instance and their mapping relation data * * @param loginUser login user * @param projectCode project code * @param id process instance id * @return delete result code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
*/ @ApiOperation(value = "deleteProcessInstanceById", notes = "DELETE_PROCESS_INSTANCE_BY_ID_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100") }) @DeleteMapping(value = "/{id}") @ResponseStatus(HttpStatus.OK) @ApiException(DELETE_PROCESS_INSTANCE_BY_ID_ERROR) @AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result<ProcessInstance> deleteProcessInstanceById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @PathVariable("id") Integer id) { Map<String, Object> result = processInstanceService.deleteProcessInstanceById(loginUser, projectCode, id); return returnDataList(result); } /** * query sub process instance detail info by task id * * @param loginUser login user * @param projectCode project code * @param taskId task id * @return sub process instance detail */ @ApiOperation(value = "querySubProcessInstanceByTaskCode", notes = "QUERY_SUBPROCESS_INSTANCE_BY_TASK_CODE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataType = "Long", example = "100") }) @GetMapping(value = "/query-sub-by-parent") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") public Result querySubProcessInstanceByTaskId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam("taskId") Integer taskId) { Map<String, Object> result = processInstanceService.querySubProcessInstanceByTaskId(loginUser, projectCode, taskId); return returnDataList(result); } /** * query parent process instance detail info by sub process instance id * * @param loginUser login user * @param projectCode project code * @param subId sub process id * @return parent instance detail */ @ApiOperation(value = "queryParentInstanceBySubId", notes = "QUERY_PARENT_PROCESS_INSTANCE_BY_SUB_PROCESS_INSTANCE_ID_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "subId", value = "SUB_PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/query-parent-by-sub") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR) @AccessLogAnnotation public Result queryParentInstanceBySubId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @RequestParam("subId") Integer subId) { Map<String, Object> result = processInstanceService.queryParentInstanceBySubId(loginUser, projectCode, subId); return returnDataList(result); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
* query process instance global variables and local variables * * @param loginUser login user * @param id process instance id * @return variables data */ @ApiOperation(value = "viewVariables", notes = "QUERY_PROCESS_INSTANCE_GLOBAL_VARIABLES_AND_LOCAL_VARIABLES_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/{id}/view-variables") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR) @AccessLogAnnotation public Result viewVariables(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @PathVariable("id") Integer id) { Map<String, Object> result = processInstanceService.viewVariables(projectCode, id); return returnDataList(result); } /** * encapsulation gantt structure * * @param loginUser login user * @param projectCode project code * @param id process instance id * @return gantt tree data */ @ApiOperation(value = "vieGanttTree", notes = "VIEW_GANTT_NOTES") @ApiImplicitParams({
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
@ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/{id}/view-gantt") @ResponseStatus(HttpStatus.OK) @ApiException(ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR) @AccessLogAnnotation public Result viewTree(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode, @PathVariable("id") Integer id) throws Exception { Map<String, Object> result = processInstanceService.viewGantt(projectCode, id); return returnDataList(result); } /** * batch delete process instance by ids, at the same time, * delete task instance and their mapping relation data * * @param loginUser login user * @param projectCode project code * @param processInstanceIds process instance id * @return delete result code */ @ApiOperation(value = "batchDeleteProcessInstanceByIds", notes = "BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataType = "Int"), @ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataType = "String"), }) @PostMapping(value = "/batch-delete") @ResponseStatus(HttpStatus.OK) @ApiException(BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR) @AccessLogAnnotation
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,057
[Bug] [API] process-instances API parameter processDefiniteCode not work
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened API: queryProcessInstanceListPaging /dolphinscheduler/projects/{projectCode}/process-instances set processDefiniteCode=5545511993472, but result still contain processDefiniteCode=5025214719744 data. ![1652756148(1)](https://user-images.githubusercontent.com/5425689/168719016-f6ef5f47-ce36-4fbc-9eef-0ef1326908fd.png) ![image](https://user-images.githubusercontent.com/5425689/168719064-14448f63-3022-470f-9ba2-5c44b79cad2b.png) ### What you expected to happen Only return processDefiniteCode=5545511993472 data. ### How to reproduce query with processDefiniteCode ### Anything else Every time ### Version 2.0.5 ### 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/10057
https://github.com/apache/dolphinscheduler/pull/10063
cd1dcf1eba13cca5aa4e009a03f7d6e7656e82a0
2251876021dea09786c418dfb1325366358a0601
2022-05-17T03:00:42Z
java
2022-05-21T04:25:32Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
public Result batchDeleteProcessInstanceByIds(@RequestAttribute(value = Constants.SESSION_USER) User loginUser, @PathVariable long projectCode, @RequestParam("processInstanceIds") String processInstanceIds) { Map<String, Object> result = new HashMap<>(); List<String> deleteFailedIdList = new ArrayList<>(); if (!StringUtils.isEmpty(processInstanceIds)) { String[] processInstanceIdArray = processInstanceIds.split(Constants.COMMA); for (String strProcessInstanceId : processInstanceIdArray) { int processInstanceId = Integer.parseInt(strProcessInstanceId); try { Map<String, Object> deleteResult = processInstanceService.deleteProcessInstanceById(loginUser, projectCode, processInstanceId); if (!Status.SUCCESS.equals(deleteResult.get(Constants.STATUS))) { deleteFailedIdList.add((String) deleteResult.get(Constants.MSG)); logger.error((String) deleteResult.get(Constants.MSG)); } } catch (Exception e) { deleteFailedIdList.add(MessageFormat.format(Status.PROCESS_INSTANCE_ERROR.getMsg(), strProcessInstanceId)); } } } if (!deleteFailedIdList.isEmpty()) { putMsg(result, Status.BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR, String.join("\n", deleteFailedIdList)); } else { putMsg(result, Status.SUCCESS); } return returnDataList(result); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.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.interceptor; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.security.Authenticator; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.thread.ThreadLocalContext; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.UserMapper; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.lang.StringUtils; import javax.servlet.http.HttpServletRequest;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.java
import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; /** * login interceptor, must log in first */ public class LoginHandlerInterceptor implements HandlerInterceptor { private static final Logger logger = LoggerFactory.getLogger(LoginHandlerInterceptor.class); @Autowired private UserMapper userMapper; @Autowired private Authenticator authenticator; /** * Intercept the execution of a handler. Called after HandlerMapping determined * * @param request current HTTP request * @param response current HTTP response * @param handler chosen handler to execute, for type and/or instance evaluation * @return boolean true or false */ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { String token = request.getHeader("token"); User user; if (StringUtils.isEmpty(token)) { user = authenticator.getAuthUser(request);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.java
if (user == null) { response.setStatus(HttpStatus.SC_UNAUTHORIZED); logger.info("user does not exist"); return false; } } else { user = userMapper.queryUserByToken(token); if (user == null) { response.setStatus(HttpStatus.SC_UNAUTHORIZED); logger.info("user token has expired"); return false; } } if (user.getState() == Flag.NO.ordinal()) { response.setStatus(HttpStatus.SC_UNAUTHORIZED); logger.info(Status.USER_DISABLED.getMsg()); return false; } request.setAttribute(Constants.SESSION_USER, user); ThreadLocalContext.getTimezoneThreadLocal().set(user.getTimeZone()); return true; } @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { ThreadLocalContext.getTimezoneThreadLocal().remove(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptorTest.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.interceptor; import static org.mockito.Mockito.when; import org.apache.dolphinscheduler.api.ApiApplicationServer; import org.apache.dolphinscheduler.api.security.Authenticator;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptorTest.java
import org.apache.dolphinscheduler.common.enums.ProfileType; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.UserMapper; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; @ActiveProfiles(value = {ProfileType.H2}) @RunWith(SpringRunner.class) @SpringBootTest(classes = ApiApplicationServer.class) @Transactional @Rollback @DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) public class LoginHandlerInterceptorTest { private static final Logger logger = LoggerFactory.getLogger(LoginHandlerInterceptorTest.class); @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptorTest.java
LoginHandlerInterceptor interceptor; @MockBean(name = "authenticator") private Authenticator authenticator; @MockBean(name = "userMapper") private UserMapper userMapper; @Test public void testPreHandle() { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); HttpServletResponse response = Mockito.mock(HttpServletResponse.class); Assert.assertFalse(interceptor.preHandle(request, response, null)); User mockUser = new User(); mockUser.setId(1); mockUser.setUserType(UserType.GENERAL_USER); mockUser.setState(1); when(authenticator.getAuthUser(request)).thenReturn(mockUser); Assert.assertTrue(interceptor.preHandle(request, response, null)); String token = "123456"; when(request.getHeader("token")).thenReturn(token); when(userMapper.queryUserByToken(token)).thenReturn(mockUser); Assert.assertTrue(interceptor.preHandle(request, response, null)); mockUser.setState(0); when(authenticator.getAuthUser(request)).thenReturn(mockUser); Assert.assertFalse(interceptor.preHandle(request, response, null)); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UserMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.mapper; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.ibatis.annotations.Param; import java.util.List; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** * user mapper interface */ @CacheConfig(cacheNames = "user", keyGenerator = "cacheKeyGenerator")
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UserMapper.java
public interface UserMapper extends BaseMapper<User> { /** * select by user id */ @Cacheable(sync = true) User selectById(int id); /** * delete by id */ @CacheEvict int deleteById(int id); /** * update */ @CacheEvict(key = "#p0.id") int updateById(@Param("et") User user); /** * query all general user * * @return user list */ List<User> queryAllGeneralUser(); /** * query user by name * * @param userName userName * @return user */ User queryByUserNameAccurately(@Param("userName") String userName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UserMapper.java
/** * query user by userName and password * * @param userName userName * @param password password * @return user */ User queryUserByNamePassword(@Param("userName") String userName, @Param("password") String password); /** * user page * * @param page page * @param userName userName * @return user IPage */ IPage<User> queryUserPaging(Page page, @Param("userName") String userName); /** * query user detail by id * * @param userId userId * @return user */ User queryDetailsById(@Param("userId") int userId); /** * query user list by alertgroupId * * @param alertgroupId alertgroupId * @return user list */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UserMapper.java
List<User> queryUserListByAlertGroupId(@Param("alertgroupId") int alertgroupId); /** * query user list by tenantId * * @param tenantId tenantId * @return user list */ List<User> queryUserListByTenant(@Param("tenantId") int tenantId); /** * query user by userId * * @param userId userId * @return user */ User queryTenantCodeByUserId(@Param("userId") int userId); /** * query user by token * * @param token token * @return user */ User queryUserByToken(@Param("token") String token); /** * query user by queue name * * @param queueName queue name * @return user list */ List<User> queryUserListByQueue(@Param("queue") String queueName); /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UserMapper.java
* check the user exist * * @param queue queue name * @return true if exist else return null */ Boolean existUser(@Param("queue") String queue); /** * update user with old queue * * @param oldQueue old queue name * @param newQueue new queue name * @return update rows */ Integer updateUserQueue(@Param("oldQueue") String oldQueue, @Param("newQueue") String newQueue); /** * query user by ids * * @param ids id list * @return user list */ List<User> selectByIds(@Param("ids") List<Integer> ids); /** * query authed user list by projectId * * @param projectId projectId * @return user list */ List<User> queryAuthedUserListByProjectId(@Param("projectId") int projectId); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UserMapperTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.mapper; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.dao.BaseDaoTest; import org.apache.dolphinscheduler.dao.entity.AccessToken; import org.apache.dolphinscheduler.dao.entity.AlertGroup; import org.apache.dolphinscheduler.dao.entity.Queue; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import java.util.ArrayList; import java.util.Date; import java.util.List;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UserMapperTest.java
import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; public class UserMapperTest extends BaseDaoTest { @Autowired private UserMapper userMapper; @Autowired private AlertGroupMapper alertGroupMapper; @Autowired private AccessTokenMapper accessTokenMapper; @Autowired private TenantMapper tenantMapper; @Autowired private QueueMapper queueMapper; /** * insert one user * * @return User */ private User insertOne() { User user = new User(); user.setUserName("user1"); user.setUserPassword("1"); user.setEmail("[email protected]"); user.setUserType(UserType.GENERAL_USER); user.setCreateTime(new Date()); user.setTenantId(1); user.setUpdateTime(new Date());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UserMapperTest.java
user.setQueueName("test_queue"); user.setQueue("queue"); userMapper.insert(user); return user; } /** * insert one user * * @param tenant tenant * @return User */ private User insertOne(Tenant tenant) { User user = new User(); user.setUserName("user1"); user.setUserPassword("1"); user.setEmail("[email protected]"); user.setUserType(UserType.GENERAL_USER); user.setCreateTime(new Date()); user.setTenantId(tenant.getId()); user.setUpdateTime(new Date()); userMapper.insert(user); return user; } /** * insert one user * * @param queue queue * @param tenant tenant * @return User */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UserMapperTest.java
private User insertOne(Queue queue, Tenant tenant) { User user = new User(); user.setUserName("user1"); user.setUserPassword("1"); user.setEmail("[email protected]"); user.setUserType(UserType.GENERAL_USER); user.setCreateTime(new Date()); user.setTenantId(tenant.getId()); user.setQueue(queue.getQueueName()); user.setUpdateTime(new Date()); userMapper.insert(user); return user; } /** * insert one AlertGroup * * @return AlertGroup */ private AlertGroup insertOneAlertGroup() { AlertGroup alertGroup = new AlertGroup(); alertGroup.setGroupName("alert group 1"); alertGroup.setDescription("alert test1"); alertGroup.setCreateTime(new Date()); alertGroup.setUpdateTime(new Date()); alertGroupMapper.insert(alertGroup); return alertGroup; } /** * insert one AccessToken
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UserMapperTest.java
* * @param user user * @return AccessToken */ private AccessToken insertOneAccessToken(User user) { AccessToken accessToken = new AccessToken(); accessToken.setUserId(user.getId()); accessToken.setToken("secrettoken"); accessToken.setCreateTime(new Date()); accessToken.setUpdateTime(new Date()); accessToken.setExpireTime(DateUtils.getSomeHourOfDay(new Date(), 1)); accessTokenMapper.insert(accessToken); return accessToken; } /** * insert one Tenant * * @return Tenant */ private Tenant insertOneTenant() { Tenant tenant = new Tenant(); tenant.setTenantCode("dolphin"); tenant.setDescription("dolphin user use"); tenant.setQueue("1"); tenant.setCreateTime(new Date()); tenant.setUpdateTime(new Date()); tenantMapper.insert(tenant); return tenant; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,076
[Bug] [Api] token expire when different timezone between server and database
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Token expire when different timezone between server and database, and I found the sql use database timestamp. ``` <select id="queryUserByToken" resultType="org.apache.dolphinscheduler.dao.entity.User"> select <include refid="baseSqlV2"> <property name="alias" value="u"/> </include> from t_ds_user u ,t_ds_access_token t where u.id = t.user_id and token=#{token} and t.expire_time > NOW() </select> ``` It's better to use server timestamp. ### What you expected to happen The token is normal when the expiration time has not expired ### How to reproduce 1. database use default timezone like CST 2. ds api server timezone use Asia/Shanghai 3. then create a token, just hour + 1 than current time. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10076
https://github.com/apache/dolphinscheduler/pull/10177
d7d6699e22091896a9ea78c5a2e49c2a1f54a7e4
bd34e66b8a493a2aa14af5884f2f7c13819004f2
2022-05-17T11:13:41Z
java
2022-05-23T01:54:11Z
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UserMapperTest.java
/** * insert one Tenant * * @return Tenant */ private Tenant insertOneTenant(Queue queue) { Tenant tenant = new Tenant(); tenant.setTenantCode("dolphin"); tenant.setDescription("dolphin user use"); tenant.setQueueId(queue.getId()); tenant.setQueue(queue.getQueue()); tenant.setCreateTime(new Date()); tenant.setUpdateTime(new Date()); tenantMapper.insert(tenant); return tenant; } /** * insert one Queue * * @return Queue */ private Queue insertOneQueue() { Queue queue = new Queue(); queue.setQueue("dolphin"); queue.setQueueName("dolphin queue"); queue.setCreateTime(new Date()); queue.setUpdateTime(new Date()); queueMapper.insert(queue); return queue; }