[
https://issues.apache.org/jira/browse/GOBBLIN-2022?focusedWorklogId=911498&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-911498
]
ASF GitHub Bot logged work on GOBBLIN-2022:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 26/Mar/24 06:27
Start Date: 26/Mar/24 06:27
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` (so no more mocking of either, except when testing
`processMessage`)
Issue Time Tracking
-------------------
Worklog Id: (was: 911498)
Time Spent: 5h 50m (was: 5h 40m)
> 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 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)