You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/09/01 22:38:51 UTC

[GitHub] [gobblin] jack-moseley commented on a change in pull request #3381: [GOBBLIN-1530] Add error reporting for missing source nodes that may not exist

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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org