rdelval commented on a change in pull request #37: Staggered (Variable batch) Updates URL: https://github.com/apache/aurora/pull/37#discussion_r219608408
########## File path: src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java ########## @@ -792,9 +796,51 @@ public Response startJobUpdate(JobUpdateRequest mutableRequest, @Nullable String return invalidRequest(NON_SERVICE_TASK); } + int totalInstancesFromGroups; JobUpdateSettings settings = requireNonNull(mutableRequest.getSettings()); - if (settings.getUpdateGroupSize() <= 0) { - return invalidRequest(INVALID_GROUP_SIZE); + + // Gracefully handle a client sending an update with an older thrift schema + // TODO(rdelvalle): Remove after version 0.22.0 ships + if (!settings.isSetUpdateStrategy()) { + if (settings.isWaitForBatchCompletion()) { + settings.setUpdateStrategy( + JobUpdateStrategy.batchStrategy( + new BatchJobUpdateStrategy().setGroupSize(settings.getUpdateGroupSize()))); + } else { + settings.setUpdateStrategy( + JobUpdateStrategy.queueStrategy( + new QueueJobUpdateStrategy().setGroupSize(settings.getUpdateGroupSize()))); + } + } + + // Keep old job schema in case we want to revert to a lower version of Aurora that doesn't Review comment: That's actually a great point. I removed the code, ran the code, generated a variable batch update, and downgraded. Scheduler came up just fine. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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