use typeurl funcs for marshalling anypb.Any
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
@@ -363,7 +363,7 @@ func (t *task) Exec(ctx context.Context, id string, spec *specs.Process, ioCreat
|
||||
i.Close()
|
||||
}
|
||||
}()
|
||||
pSpec, err := protobuf.MarshalAnyToProto(spec)
|
||||
pSpec, err := typeurl.MarshalAnyToProto(spec)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -463,7 +463,7 @@ func (t *task) Checkpoint(ctx context.Context, opts ...CheckpointTaskOpts) (Imag
|
||||
}
|
||||
request.ParentCheckpoint = i.ParentCheckpoint.String()
|
||||
if i.Options != nil {
|
||||
o, err := protobuf.MarshalAnyToProto(i.Options)
|
||||
o, err := typeurl.MarshalAnyToProto(i.Options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -552,7 +552,7 @@ func (t *task) Update(ctx context.Context, opts ...UpdateTaskOpts) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
request.Resources = protobuf.FromAny(r)
|
||||
request.Resources = typeurl.MarshalProto(r)
|
||||
}
|
||||
if i.Annotations != nil {
|
||||
request.Annotations = i.Annotations
|
||||
|
Reference in New Issue
Block a user