[ 
https://issues.apache.org/jira/browse/GOBBLIN-2181?focusedWorklogId=948014&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-948014
 ]

ASF GitHub Bot logged work on GOBBLIN-2181:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Dec/24 12:58
            Start Date: 12/Dec/24 12:58
    Worklog Time Spent: 10m 
      Work Description: vsinghal85 commented on code in PR #4084:
URL: https://github.com/apache/gobblin/pull/4084#discussion_r1882016505


##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtilsTest.java:
##########
@@ -0,0 +1,124 @@
+package org.apache.gobblin.service.modules.orchestration.proc;
+
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import com.typesafe.config.ConfigValueFactory;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import org.apache.gobblin.config.ConfigBuilder;
+import org.apache.gobblin.configuration.ConfigurationKeys;
+import org.apache.gobblin.metrics.event.EventSubmitter;
+import org.apache.gobblin.runtime.api.FlowSpec;
+import org.apache.gobblin.runtime.api.JobSpec;
+import org.apache.gobblin.runtime.api.Spec;
+import org.apache.gobblin.runtime.api.SpecExecutor;
+import org.apache.gobblin.runtime.api.SpecProducer;
+import org.apache.gobblin.runtime.spec_executorInstance.InMemorySpecExecutor;
+import org.apache.gobblin.runtime.spec_executorInstance.MockedSpecExecutor;
+import org.apache.gobblin.service.modules.flowgraph.Dag;
+import org.apache.gobblin.service.modules.flowgraph.FlowGraphConfigurationKeys;
+import 
org.apache.gobblin.service.modules.orchestration.DagManagementStateStore;
+import org.apache.gobblin.service.modules.orchestration.DagManagerMetrics;
+import org.apache.gobblin.service.modules.spec.JobExecutionPlan;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(EventSubmitter.class)
+public class DagProcUtilsTest {
+
+  DagManagementStateStore dagManagementStateStore;
+  SpecExecutor mockSpecExecutor;
+
+  @BeforeClass
+  public void setUp() {
+    dagManagementStateStore = Mockito.mock(DagManagementStateStore.class);
+    mockSpecExecutor = new MockedSpecExecutor(Mockito.mock(Config.class));
+  }
+
+  @Test
+  public void testSubmitNextNodesSuccess() throws URISyntaxException, 
IOException {
+    Dag.DagId dagId = new Dag.DagId("testFlowGroup", "testFlowName", 2345678);
+    List<Dag.DagNode<JobExecutionPlan>> dagNodeList = new ArrayList<>();
+    List<JobExecutionPlan> jobExecutionPlans = getJobExecutionPlans();
+    for(JobExecutionPlan jobExecutionPlan: jobExecutionPlans){
+      Dag.DagNode<JobExecutionPlan> dagNode = new 
Dag.DagNode<>(jobExecutionPlan);
+      dagNodeList.add(dagNode);
+    }
+    Dag<JobExecutionPlan> dag = new Dag<>(dagNodeList);
+    
Mockito.doNothing().when(dagManagementStateStore).addJobDagAction(Mockito.anyString(),
 Mockito.anyString(), Mockito.anyLong(), Mockito.anyString(), Mockito.any());
+    DagProcUtils.submitNextNodes(dagManagementStateStore, dag, dagId);

Review Comment:
   Sure makes sense, added in all tests





Issue Time Tracking
-------------------

    Worklog Id:     (was: 948014)
    Time Spent: 20m  (was: 10m)

> Non transient exception handling by flowspec removal
> ----------------------------------------------------
>
>                 Key: GOBBLIN-2181
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2181
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Vaibhav Singhal
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> - Many times we experience failures in flow initialization or processing due 
> to which flow could not be concluded properly
> - Azkaban client exceptions and SQLIntegrityViolation exceptions are examples 
> which have caused failures in recent history
> - Currently most of these failures are by default considered transient 
> exceptions and are retried infinitely
> - As a side effect, it causes flows not to conclude and causes failures in 
> future flow submissions which have caused incidents recently
> - More details on analysis and options explored can be referred here - 
> https://docs.google.com/document/d/1PeuuslIVSX6gQrX1J5d0HW0HbNuNhULCHQVjPxpDghs/edit?tab=t.0
> - As a first step we want to consider all exceptions as non transient and not 
> retry and remove conclude the flow by removing flowspec and dag action
> - This issue tracks the changes to conclude the flow for non transient 
> exceptions and also mark them as failure to reflect the correct status of the 
> flow



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to