jack-moseley commented on a change in pull request #3381:
URL: https://github.com/apache/gobblin/pull/3381#discussion_r700620378



##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java
##########
@@ -190,6 +190,11 @@ public void awaitHealthy() throws InterruptedException {
     String destination = ConfigUtils.getString(flowSpec.getConfig(), 
ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY, "");
 
     DataNode sourceNode = this.flowGraph.getNode(source);
+    if (sourceNode == null) {
+      flowSpec.getCompilationErrors()
+          .add(String.format("Flowgraph does not have a node with id %s", 
source));
+      return null;
+    }
     List<String> destNodeIds = ConfigUtils.getStringList(flowSpec.getConfig(), 
ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY);
     List<DataNode> destNodes = 
destNodeIds.stream().map(this.flowGraph::getNode).collect(Collectors.toList());

Review comment:
       The same error happens if the destination node is invalid, so we should 
have validation on this one as well.




-- 
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