This is an automated email from the ASF dual-hosted git repository. wenjun pushed a commit to branch revert-17759-Fix-17758 in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit a414b8e1c14300936ab29827cd053cdd2f7fa04c Author: Wenjun Ruan <[email protected]> AuthorDate: Thu Dec 18 20:23:01 2025 +0800 Revert "[Fix-17758][Master] Mark task as failed if TaskExecutionContext initi…" This reverts commit 8c4d921c63ff4d91e50fc4549adfe50bee4464f5. --- .../master/engine/WorkflowEventBusFireWorker.java | 16 --- .../task/lifecycle/TaskLifecycleEventType.java | 4 - .../lifecycle/event/TaskFatalLifecycleEvent.java | 52 --------- .../handler/TaskFatalLifecycleEventHandler.java | 44 -------- .../task/statemachine/AbstractTaskStateAction.java | 33 ------ .../engine/task/statemachine/ITaskStateAction.java | 9 -- .../integration/cases/WorkflowStartTestCase.java | 103 ----------------- ...ition_task_with_one_fake_predecessor_fatal.yaml | 123 -------------------- .../start/workflow_with_one_fake_task_fatal.yaml | 62 ---------- ...tion_task_with_one_fake_predecessor_failed.yaml | 4 +- ...ition_task_with_one_fake_predecessor_fatal.yaml | 125 --------------------- 11 files changed, 2 insertions(+), 573 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEventBusFireWorker.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEventBusFireWorker.java index 4e2764c5d4..905f4b7842 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEventBusFireWorker.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEventBusFireWorker.java @@ -24,8 +24,6 @@ import org.apache.dolphinscheduler.common.thread.ThreadUtils; import org.apache.dolphinscheduler.dao.entity.WorkflowInstance; import org.apache.dolphinscheduler.plugin.task.api.utils.LogUtils; import org.apache.dolphinscheduler.server.master.engine.exceptions.WorkflowEventFireException; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.AbstractTaskLifecycleEvent; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFatalLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable; import org.apache.dolphinscheduler.server.master.runner.IWorkflowExecuteContext; import org.apache.dolphinscheduler.server.master.utils.ExceptionUtils; @@ -34,7 +32,6 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import java.util.Collections; -import java.util.Date; import java.util.List; import java.util.Map; import java.util.Optional; @@ -130,19 +127,6 @@ public class WorkflowEventBusFireWorker { workflowEventBus.publish(lifecycleEvent); ThreadUtils.sleep(5_000); return; - } else { - log.warn("exception occurred during event handling: {}", lifecycleEvent, ex); - // If other exceptions and the event is task-related, construct and publish a dedicated - // TaskFatalLifecycleEvent - // so that the event will be handled by TaskFatalLifecycleEventHandler - if (lifecycleEvent instanceof AbstractTaskLifecycleEvent) { - AbstractTaskLifecycleEvent taskLifecycleEvent = (AbstractTaskLifecycleEvent) lifecycleEvent; - final TaskFatalLifecycleEvent taskFatalEvent = TaskFatalLifecycleEvent.builder() - .taskExecutionRunnable(taskLifecycleEvent.getTaskExecutionRunnable()) - .endTime(new Date()) - .build(); - workflowEventBus.publish(taskFatalEvent); - } } workflowEventBus.getWorkflowEventBusSummary().decreaseFireSuccessEventCount(); workflowEventBus.getWorkflowEventBusSummary().increaseFireFailedEventCount(); diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/TaskLifecycleEventType.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/TaskLifecycleEventType.java index fb12ccb603..5ddcf13c89 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/TaskLifecycleEventType.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/TaskLifecycleEventType.java @@ -29,10 +29,6 @@ public enum TaskLifecycleEventType implements ILifecycleEventType { * Dispatch the task instance to target. */ DISPATCH, - /** - * Task instance encounters catastrophic failure(such as initialization failure), it will enter a failed state. - */ - FATAL, /** * The task instance is dispatched to the target executor server. */ diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/event/TaskFatalLifecycleEvent.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/event/TaskFatalLifecycleEvent.java deleted file mode 100644 index 88cfc9a478..0000000000 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/event/TaskFatalLifecycleEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.engine.task.lifecycle.event; - -import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.AbstractTaskLifecycleEvent; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.TaskLifecycleEventType; -import org.apache.dolphinscheduler.server.master.engine.task.runnable.ITaskExecutionRunnable; - -import java.util.Date; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; - -@Data -@Builder -@AllArgsConstructor -public class TaskFatalLifecycleEvent extends AbstractTaskLifecycleEvent { - - private final ITaskExecutionRunnable taskExecutionRunnable; - - private final Date endTime; - - @Override - public ILifecycleEventType getEventType() { - return TaskLifecycleEventType.FATAL; - } - - @Override - public String toString() { - return "TaskFatalLifecycleEvent{" + - "task=" + taskExecutionRunnable.getName() + - ", endTime=" + endTime + - '}'; - } -} diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/handler/TaskFatalLifecycleEventHandler.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/handler/TaskFatalLifecycleEventHandler.java deleted file mode 100644 index 8277d8b2ca..0000000000 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/lifecycle/handler/TaskFatalLifecycleEventHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.engine.task.lifecycle.handler; - -import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.TaskLifecycleEventType; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFatalLifecycleEvent; -import org.apache.dolphinscheduler.server.master.engine.task.runnable.ITaskExecutionRunnable; -import org.apache.dolphinscheduler.server.master.engine.task.statemachine.ITaskStateAction; -import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable; - -import org.springframework.stereotype.Component; - -@Component -public class TaskFatalLifecycleEventHandler extends AbstractTaskLifecycleEventHandler<TaskFatalLifecycleEvent> { - - @Override - public void handle(final ITaskStateAction taskStateAction, - final IWorkflowExecutionRunnable workflowExecutionRunnable, - final ITaskExecutionRunnable taskExecutionRunnable, - final TaskFatalLifecycleEvent taskFatalEvent) { - taskStateAction.onFatalEvent(workflowExecutionRunnable, taskExecutionRunnable, taskFatalEvent); - } - - @Override - public ILifecycleEventType matchEventType() { - return TaskLifecycleEventType.FATAL; - } -} diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/AbstractTaskStateAction.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/AbstractTaskStateAction.java index 738f284b9a..ad0e652d48 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/AbstractTaskStateAction.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/AbstractTaskStateAction.java @@ -36,7 +36,6 @@ import org.apache.dolphinscheduler.server.master.engine.task.client.ITaskExecuto import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskDispatchLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskDispatchedLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFailedLifecycleEvent; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFatalLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskKilledLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskPausedLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskRetryLifecycleEvent; @@ -100,38 +99,6 @@ public abstract class AbstractTaskStateAction implements ITaskStateAction { } } - @Override - public void onFatalEvent(final IWorkflowExecutionRunnable workflowExecutionRunnable, - final ITaskExecutionRunnable taskExecutionRunnable, - final TaskFatalLifecycleEvent taskFatalEvent) { - releaseTaskInstanceResourcesIfNeeded(taskExecutionRunnable); - persistentTaskInstanceFatalEventToDB(taskExecutionRunnable, taskFatalEvent); - - if (taskExecutionRunnable.isTaskInstanceCanRetry()) { - taskExecutionRunnable.getWorkflowEventBus().publish(TaskRetryLifecycleEvent.of(taskExecutionRunnable)); - return; - } - - // If all successors are condition tasks, then the task will not be marked as failure. - // And the DAG will continue to execute. - final IWorkflowExecutionGraph workflowExecutionGraph = taskExecutionRunnable.getWorkflowExecutionGraph(); - if (workflowExecutionGraph.isAllSuccessorsAreConditionTask(taskExecutionRunnable)) { - mergeTaskVarPoolToWorkflow(workflowExecutionRunnable, taskExecutionRunnable); - publishWorkflowInstanceTopologyLogicalTransitionEvent(taskExecutionRunnable); - return; - } - taskExecutionRunnable.getWorkflowExecutionGraph().markTaskExecutionRunnableChainFailure(taskExecutionRunnable); - publishWorkflowInstanceTopologyLogicalTransitionEvent(taskExecutionRunnable); - } - - private void persistentTaskInstanceFatalEventToDB(final ITaskExecutionRunnable taskExecutionRunnable, - final TaskFatalLifecycleEvent taskFatalEvent) { - final TaskInstance taskInstance = taskExecutionRunnable.getTaskInstance(); - taskInstance.setState(TaskExecutionStatus.FAILURE); - taskInstance.setEndTime(taskFatalEvent.getEndTime()); - taskInstanceDao.updateById(taskInstance); - } - @Override public void onDispatchedEvent(final IWorkflowExecutionRunnable workflowExecutionRunnable, final ITaskExecutionRunnable taskExecutionRunnable, diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/ITaskStateAction.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/ITaskStateAction.java index f60c3ae135..a041de5e3c 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/ITaskStateAction.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/ITaskStateAction.java @@ -22,7 +22,6 @@ import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.Tas import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskDispatchedLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFailedLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFailoverLifecycleEvent; -import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFatalLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskKillLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskKilledLifecycleEvent; import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskPauseLifecycleEvent; @@ -92,14 +91,6 @@ public interface ITaskStateAction { final ITaskExecutionRunnable taskExecutionRunnable, final TaskDispatchLifecycleEvent taskDispatchEvent); - /** - * Perform the necessary actions when the task in a certain state receive a {@link TaskFatalLifecycleEvent}. - * <p> This method is called when the task encounters catastrophic failure (e.g., initialization failure). - */ - void onFatalEvent(final IWorkflowExecutionRunnable workflowExecutionRunnable, - final ITaskExecutionRunnable taskExecutionRunnable, - final TaskFatalLifecycleEvent taskFatalEvent); - /** * Perform the necessary actions when the task in a certain state receive a {@link TaskDispatchedLifecycleEvent}. * <p> This method is called when the task has been dispatched to executor. diff --git a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java index fe5a497aa6..a2f0331f34 100644 --- a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java +++ b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java @@ -849,36 +849,6 @@ public class WorkflowStartTestCase extends AbstractMasterIntegrationTestCase { masterContainer.assertAllResourceReleased(); } - @Test - @DisplayName("Test start a workflow with one fake task(A) fatal") - public void testStartWorkflow_with_oneFatalTask() { - final String yaml = "/it/start/workflow_with_one_fake_task_fatal.yaml"; - final WorkflowTestCaseContext context = workflowTestCaseContextFactory.initializeContextFromYaml(yaml); - final WorkflowDefinition workflow = context.getOneWorkflow(); - - final WorkflowOperator.WorkflowTriggerDTO workflowTriggerDTO = WorkflowOperator.WorkflowTriggerDTO.builder() - .workflowDefinition(workflow) - .runWorkflowCommandParam(new RunWorkflowCommandParam()) - .build(); - workflowOperator.manualTriggerWorkflow(workflowTriggerDTO); - - await() - .atMost(Duration.ofMinutes(1)) - .untilAsserted(() -> { - Assertions - .assertThat(repository.queryWorkflowInstance(workflow)) - .satisfiesExactly(workflowInstance -> assertThat(workflowInstance.getState()) - .isEqualTo(WorkflowExecutionStatus.FAILURE)); - Assertions - .assertThat(repository.queryTaskInstance(workflow)) - .satisfiesExactly(taskInstance -> { - assertThat(taskInstance.getName()).isEqualTo("A"); - assertThat(taskInstance.getState()).isEqualTo(TaskExecutionStatus.FAILURE); - }); - }); - masterContainer.assertAllResourceReleased(); - } - @Test @DisplayName("Test start a workflow with one fake task(A) failed") public void testStartWorkflow_with_oneFailedTaskWithRetry() { @@ -1433,46 +1403,6 @@ public class WorkflowStartTestCase extends AbstractMasterIntegrationTestCase { masterContainer.assertAllResourceReleased(); } - @Test - @DisplayName("Test start a workflow with one condition task(B) when one fake predecessor task(A) run fatal") - void testStartWorkflow_with_oneConditionTaskWithOneFakePredecessor_runFatal() { - final String yaml = "/it/start/workflow_with_one_condition_task_with_one_fake_predecessor_fatal.yaml"; - final WorkflowTestCaseContext context = workflowTestCaseContextFactory.initializeContextFromYaml(yaml); - final WorkflowDefinition parentWorkflow = context.getOneWorkflow(); - - final WorkflowOperator.WorkflowTriggerDTO workflowTriggerDTO = WorkflowOperator.WorkflowTriggerDTO.builder() - .workflowDefinition(parentWorkflow) - .runWorkflowCommandParam(new RunWorkflowCommandParam()) - .build(); - final Integer workflowInstanceId = workflowOperator.manualTriggerWorkflow(workflowTriggerDTO); - - await() - .atMost(Duration.ofMinutes(1)) - .untilAsserted(() -> { - Assertions - .assertThat(repository.queryWorkflowInstance(workflowInstanceId)) - .matches( - workflowInstance -> workflowInstance.getState() == WorkflowExecutionStatus.SUCCESS); - - Assertions - .assertThat(repository.queryTaskInstance(workflowInstanceId)) - .hasSize(3) - .anySatisfy(taskInstance -> { - assertThat(taskInstance.getName()).isEqualTo("A"); - assertThat(taskInstance.getState()).isEqualTo(TaskExecutionStatus.FAILURE); - }) - .anySatisfy(taskInstance -> { - assertThat(taskInstance.getName()).isEqualTo("B"); - assertThat(taskInstance.getState()).isEqualTo(TaskExecutionStatus.SUCCESS); - }) - .anySatisfy(taskInstance -> { - assertThat(taskInstance.getName()).isEqualTo("D"); - assertThat(taskInstance.getState()).isEqualTo(TaskExecutionStatus.SUCCESS); - }); - }); - masterContainer.assertAllResourceReleased(); - } - @Test @DisplayName("Test start a workflow with one condition task(B) which is forbidden when one fake predecessor task(A) run failed") void testStartWorkflow_with_oneForbiddenConditionTaskWithOneFakePredecessor_runFailed() { @@ -1505,37 +1435,4 @@ public class WorkflowStartTestCase extends AbstractMasterIntegrationTestCase { }); masterContainer.assertAllResourceReleased(); } - - @Test - @DisplayName("Test start a workflow with one condition task(B) which is forbidden when one fake predecessor task(A) run fatal") - void testStartWorkflow_with_oneForbiddenConditionTaskWithOneFakePredecessor_runFatal() { - final String yaml = - "/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_fatal.yaml"; - final WorkflowTestCaseContext context = workflowTestCaseContextFactory.initializeContextFromYaml(yaml); - final WorkflowDefinition parentWorkflow = context.getOneWorkflow(); - - final WorkflowOperator.WorkflowTriggerDTO workflowTriggerDTO = WorkflowOperator.WorkflowTriggerDTO.builder() - .workflowDefinition(parentWorkflow) - .runWorkflowCommandParam(new RunWorkflowCommandParam()) - .build(); - final Integer workflowInstanceId = workflowOperator.manualTriggerWorkflow(workflowTriggerDTO); - - await() - .atMost(Duration.ofMinutes(1)) - .untilAsserted(() -> { - Assertions - .assertThat(repository.queryWorkflowInstance(workflowInstanceId)) - .matches( - workflowInstance -> workflowInstance.getState() == WorkflowExecutionStatus.FAILURE); - - Assertions - .assertThat(repository.queryTaskInstance(workflowInstanceId)) - .hasSize(1) - .satisfiesExactly(taskInstance -> { - assertThat(taskInstance.getName()).isEqualTo("A"); - assertThat(taskInstance.getState()).isEqualTo(TaskExecutionStatus.FAILURE); - }); - }); - masterContainer.assertAllResourceReleased(); - } } diff --git a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_condition_task_with_one_fake_predecessor_fatal.yaml b/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_condition_task_with_one_fake_predecessor_fatal.yaml deleted file mode 100644 index ef9df30238..0000000000 --- a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_condition_task_with_one_fake_predecessor_fatal.yaml +++ /dev/null @@ -1,123 +0,0 @@ -# -# 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. -# - -# A(fatal-failed) -> B(success) -> D(success) -project: - name: MasterIntegrationTest - code: 1 - description: This is a fake project - userId: 1 - userName: admin - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - -workflows: - - name: workflow_with_one_condition_task_with_one_fake_predecessor_fatal - code: 1 - version: 1 - projectCode: 1 - description: This is a fake workflow with one condition task which has one predecessor fatal - releaseState: ONLINE - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - userId: 1 - executionType: PARALLEL - -tasks: - - name: A - code: 1 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo success"}' - workerGroup: default - environmentCode: 144873539254368 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - - name: B - code: 2 - version: 1 - projectCode: 1 - userId: 1 - taskType: CONDITIONS - taskParams: '{"localParams":[],"resourceList":[],"dependence":{"relation":"AND","dependTaskList":[{"relation":"AND","dependItemList":[{"depTaskCode":1,"status":"SUCCESS"}]}]},"conditionResult":{"successNode":[3],"failedNode":[4]}},' - workerGroup: default - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - - name: C - code: 3 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo success"}' - workerGroup: default - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - - name: D - code: 4 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo failed"}' - workerGroup: default - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - -taskRelations: - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 0 - preTaskVersion: 0 - postTaskCode: 1 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 1 - preTaskVersion: 1 - postTaskCode: 2 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 2 - preTaskVersion: 1 - postTaskCode: 3 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 2 - preTaskVersion: 1 - postTaskCode: 4 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 diff --git a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_fake_task_fatal.yaml b/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_fake_task_fatal.yaml deleted file mode 100644 index bbd5adf848..0000000000 --- a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_fake_task_fatal.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# -# 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. -# - -project: - name: MasterIntegrationTest - code: 1 - description: This is a fake project - userId: 1 - userName: admin - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - -workflows: - - name: workflow_with_one_fake_task_fatal - code: 1 - version: 1 - projectCode: 1 - description: This is a fake workflow with single task - releaseState: ONLINE - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - userId: 1 - executionType: PARALLEL - -tasks: - - name: A - code: 1 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"sleep 5 && echo success"}' - workerGroup: default - environmentCode: 144873539254368 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - -taskRelations: - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 0 - preTaskVersion: 0 - postTaskCode: 1 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 diff --git a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_failed.yaml b/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_failed.yaml index bd5a9d360e..c312175c38 100644 --- a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_failed.yaml +++ b/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_failed.yaml @@ -27,11 +27,11 @@ project: updateTime: 2021-08-12 00:00:00 workflows: - - name: workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_failed + - name: workflow_with_one_condition_task_with_one_fake_predecessor_failed code: 1 version: 1 projectCode: 1 - description: This is a fake workflow with one condition task which is forbidden and has one predecessor failed + description: This is a fake workflow with one condition task which has one predecessor failed releaseState: ONLINE createTime: 2024-08-12 00:00:00 updateTime: 2021-08-12 00:00:00 diff --git a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_fatal.yaml b/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_fatal.yaml deleted file mode 100644 index 63039224c4..0000000000 --- a/dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_fatal.yaml +++ /dev/null @@ -1,125 +0,0 @@ -# -# 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. -# - -# A(failed) -> B(Condition)(forbidden) -> C(success) -# -> D(failed) -project: - name: MasterIntegrationTest - code: 1 - description: This is a fake project - userId: 1 - userName: admin - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - -workflows: - - name: workflow_with_one_forbidden_condition_task_with_one_fake_predecessor_fatal - code: 1 - version: 1 - projectCode: 1 - description: This is a fake workflow with one forbidden condition task which has one predecessor fatal - releaseState: ONLINE - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - userId: 1 - executionType: PARALLEL - -tasks: - - name: A - code: 1 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo success"}' - workerGroup: default - environmentCode: 144873539254368 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - - name: B - code: 2 - version: 1 - projectCode: 1 - userId: 1 - taskType: CONDITIONS - taskParams: '{"localParams":[],"resourceList":[],"dependence":{"relation":"AND","dependTaskList":[{"relation":"AND","dependItemList":[{"depTaskCode":1,"status":"SUCCESS"}]}]},"conditionResult":{"successNode":[3],"failedNode":[4]}},' - workerGroup: default - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - flag: NO - - name: C - code: 3 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo success"}' - workerGroup: default - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - - name: D - code: 4 - version: 1 - projectCode: 1 - userId: 1 - taskType: LogicFakeTask - taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo failed"}' - workerGroup: default - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - taskExecuteType: BATCH - -taskRelations: - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 0 - preTaskVersion: 0 - postTaskCode: 1 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 1 - preTaskVersion: 1 - postTaskCode: 2 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 2 - preTaskVersion: 1 - postTaskCode: 3 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00 - - projectCode: 1 - workflowDefinitionCode: 1 - workflowDefinitionVersion: 1 - preTaskCode: 2 - preTaskVersion: 1 - postTaskCode: 4 - postTaskVersion: 1 - createTime: 2024-08-12 00:00:00 - updateTime: 2024-08-12 00:00:00
