Merge pull request #4647 from katiewasnothere/task_update_annotations_upstream

Add annotations to task update request api
This commit is contained in:
Maksym Pavlenko
2020-11-18 14:44:19 -08:00
committed by GitHub
11 changed files with 566 additions and 179 deletions

View File

@@ -420,10 +420,11 @@ func (s *shim) Checkpoint(ctx context.Context, path string, options *ptypes.Any)
return nil
}
func (s *shim) Update(ctx context.Context, resources *ptypes.Any) error {
func (s *shim) Update(ctx context.Context, resources *ptypes.Any, annotations map[string]string) error {
if _, err := s.task.Update(ctx, &task.UpdateTaskRequest{
ID: s.ID(),
Resources: resources,
ID: s.ID(),
Resources: resources,
Annotations: annotations,
}); err != nil {
return errdefs.FromGRPC(err)
}