arjun4084346 commented on a change in pull request #2952: [GOBBLIN-1113] Carry 
forward requester list property when updating flowconfig
URL: https://github.com/apache/incubator-gobblin/pull/2952#discussion_r406663425
 
 

 ##########
 File path: 
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java
 ##########
 @@ -163,13 +163,17 @@ public UpdateResponse updateFlowConfig(FlowId flowId, 
FlowConfig flowConfig, boo
       throw new FlowConfigLoggedException(HttpStatus.S_400_BAD_REQUEST,
           "flowName and flowGroup cannot be changed in update", null);
     }
+    FlowConfig originalFlowConfig = getFlowConfig(flowId);
     if (isUnscheduleRequest(flowConfig)) {
       // flow config is not changed if it is just a request to un-schedule
-      FlowConfig originalFlowConfig = getFlowConfig(flowId);
+      originalFlowConfig = getFlowConfig(flowId);
       originalFlowConfig.setSchedule(NEVER_RUN_CRON_SCHEDULE);
       flowConfig = originalFlowConfig;
     }
 
+    // Carry forward the requester list property since it is added at time of 
creation
+    flowConfig.getProperties().put(RequesterService.REQUESTER_LIST, 
originalFlowConfig.getProperties().get(RequesterService.REQUESTER_LIST));
 
 Review comment:
   
   if it is an unscheduled request, flowConfig is pointing to 
originalFLowConfig and this line will make no sense then. so Line 175 should be 
at L167 (before the if condition). Otherwise requester list will be lost set in 
unscheduled specs.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to