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

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

                Author: ASF GitHub Bot
            Created on: 26/Mar/24 06:26
            Start Date: 26/Mar/24 06:26
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3896:
URL: https://github.com/apache/gobblin/pull/3896#discussion_r1538641764


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaJobStatusMonitor.java:
##########
@@ -275,6 +279,7 @@ static void 
addJobStatusToStateStore(org.apache.gobblin.configuration.State jobS
       modifyStateIfRetryRequired(jobStatus);
       stateStore.put(storeName, tableName, jobStatus);
       if (isNewStateTransitionToFinal(jobStatus, states)) {
+        dagActionStore.addDagAction(flowGroup, flowName, flowExecutionId, 
jobName, DagActionStore.DagActionType.REEVALUATE);
         eventProducer.emitObservabilityEvent(jobStatus);

Review Comment:
   the fact that you must add mocking for the `DagActionStore` just to keep 
working existing tests that happen call this `static` method, suggests the 
method has too many concerns rolled into one.  instead, how about returning 
`Optional<JobStatus>` that would be present only in cases where 
`isNewStateTransitionToFinal`?
   
   that way `dagActionStore` and `eventProducer` are only called directly 
within `processMessage`





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

    Worklog Id:     (was: 911497)
    Time Spent: 5h 40m  (was: 5.5h)

> create dag proc for taking actions on job completion
> ----------------------------------------------------
>
>                 Key: GOBBLIN-2022
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2022
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 5h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to