jack-moseley 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_r406931193
 
 

 ##########
 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:
   I don't think it actually matters? They are both pointing to 
originalflowconfig, so it will just replace requester list with itself, it 
won't lose it.
   
   Either way moved it.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to