API update to support staggered updates prototype.

This commit is contained in:
Renan DelValle 2018-05-09 15:33:18 -07:00
parent 40153d5cb1
commit 77bb78927e
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
4 changed files with 191 additions and 73 deletions

View file

@ -680,9 +680,27 @@ struct JobUpdateKey {
2: string id
}
/** Job update thresholds and limits. */
/** Declaration of update strategy types available. **/
enum JobUpdateStrategyType {
/** An update strategy that will maintain a limited amount of updates running. */
QUEUE = 0,
/** An update strategy that will only add more work when the current active group is empty. */
BATCH = 1,
/**
* An update strategy that will only add more work when the current active group is empty.
* Unlike BatchUpdate, once an active group is empty, the size of the next active group
* is allowed to change using this strategy.
*/
VARIABLE_BATCH = 2
}
/** Job update thresholds and limits. **/
struct JobUpdateSettings {
/** Max number of instances being updated at any given moment. */
/**
* TODO(rdelvalle): determine if it's better to use updateGroupSizes for everything and capping
* updateGroupSizes at length=1 for BATCH and QUEUE.
* Max number of instances being updated at any given moment.
*/
1: i32 updateGroupSize
/** Max number of instance failures to tolerate before marking instance as FAILED. */
@ -700,13 +718,13 @@ struct JobUpdateSettings {
/** Instance IDs to act on. All instances will be affected if this is not set. */
7: set<Range> updateOnlyTheseInstances
/**
/** TODO(rdelvalle): Deprecated, please set updateStrategyType to BATCH instead
* If true, use updateGroupSize as strict batching boundaries, and avoid proceeding to another
* batch until the preceding batch finishes updating.
*/
8: bool waitForBatchCompletion
/**
/**
* If set, requires external calls to pulseJobUpdate RPC within the specified rate for the
* update to make progress. If no pulses received within specified interval the update will
* block. A blocked update is unable to continue but retains its current status. It may only get
@ -715,16 +733,16 @@ struct JobUpdateSettings {
9: optional i32 blockIfNoPulsesAfterMs
/**
* This list contains the number of instances that each batch will complete before moving on to
* the next. This field can only be used with waitForBatchCompletion set as true.
**/
10: optional list<i32> variableUpdateGroupSize
* Explicitly state which Update strategy type to use.
*/
10: optional JobUpdateStrategyType updateStrategyType
/**
* Pauses the deployment of further tasks after each batch completes
* until the user sends an resume call.
**/
11: bool autoPause}
* Limit for each update group during an update.
* This field should always be length of 1 for QUEUE and BATCH.
*/
11: optional list<i32> groupsSize
}
/** Event marking a state transition in job update lifecycle. */
struct JobUpdateEvent {