Copilot commented on code in PR #4208:
URL: https://github.com/apache/gobblin/pull/4208#discussion_r4069156684


##########
gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java:
##########
@@ -86,6 +88,28 @@ public abstract Iterator<JobStatus> 
getJobStatusesForFlowExecution(String flowNa
   public abstract Iterator<JobStatus> getJobStatusesForFlowExecution(String 
flowName, String flowGroup,
       long flowExecutionId, String jobName, String jobGroup);
 
+  /**
+   * Read retained states without discarding backend metadata during 
conversion to {@link JobStatus}.
+   * Includes the flow-summary record, if present. Callers must validate the 
decoded identity before using
+   * execution handles: storage keys alone do not establish the identity of 
the serialized contents.
+   *
+   * <p>Unlike status-display APIs, read failures propagate rather than 
appearing as an empty result.</p>
+   */
+  public List<State> getJobStatusStatesForFlowExecution(String flowName, 
String flowGroup, long flowExecutionId)
+      throws IOException {
+    Objects.requireNonNull(flowName, "flowName");
+    Objects.requireNonNull(flowGroup, "flowGroup");
+    String separator = ServiceConfigKeys.STATE_STORE_KEY_SEPARATION_CHARACTER;
+    String storeName = flowGroup + separator + flowName;
+    String tablePrefix = flowExecutionId + separator;
+    StateStore<State> stateStore = getStateStore();

Review Comment:
   This default raw-state implementation assumes every `JobStatusRetriever` has 
a non-null `StateStore`, but `LocalFsJobStatusRetriever` explicitly returns 
`null` from `getStateStore()` (LocalFsJobStatusRetriever.java:161-165). If that 
configurable retriever is used with a force-kill handler, a missing-DAG KILL 
now fails with an unhandled `NullPointerException` instead of a controlled 
failure. Either override this method for LocalFs or reject the unsupported 
backend explicitly before dereferencing the store.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to