Skip to content

Commit c8e99bf

Browse files
authored
Merge pull request #8475 from Iceber/fix_checkpoint_options_1.7
[release/1.7] runtime/shim: fix the nil checkpoint options
2 parents 74ce87e + 3ef5b68 commit c8e99bf

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

runtime/v2/runc/container.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,12 @@ func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskReques
470470
if err != nil {
471471
return err
472472
}
473-
var opts *options.CheckpointOptions
473+
474+
var opts options.CheckpointOptions
474475
if r.Options != nil {
475-
v, err := typeurl.UnmarshalAny(r.Options)
476-
if err != nil {
476+
if err := typeurl.UnmarshalTo(r.Options, &opts); err != nil {
477477
return err
478478
}
479-
opts = v.(*options.CheckpointOptions)
480479
}
481480
return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{
482481
Path: r.Path,

0 commit comments

Comments
 (0)