Add annotations to task update request api
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
This commit is contained in:
5
task.go
5
task.go
@@ -503,6 +503,8 @@ func (t *task) Checkpoint(ctx context.Context, opts ...CheckpointTaskOpts) (Imag
|
||||
type UpdateTaskInfo struct {
|
||||
// Resources updates a tasks resource constraints
|
||||
Resources interface{}
|
||||
// Annotations allows arbitrary and/or experimental resource constraints for task update
|
||||
Annotations map[string]string
|
||||
}
|
||||
|
||||
// UpdateTaskOpts allows a caller to update task settings
|
||||
@@ -525,6 +527,9 @@ func (t *task) Update(ctx context.Context, opts ...UpdateTaskOpts) error {
|
||||
}
|
||||
request.Resources = any
|
||||
}
|
||||
if i.Annotations != nil {
|
||||
request.Annotations = i.Annotations
|
||||
}
|
||||
_, err := t.client.TaskService().Update(ctx, request)
|
||||
return errdefs.FromGRPC(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user