Merge pull request #8393 from Iceber/fix_checkpoint_options

runtime/shim: fix the nil checkpoint options
This commit is contained in:
Derek McGowan 2023-04-24 21:22:39 -07:00 committed by GitHub
commit 7d7aac7dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -470,13 +470,12 @@ func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskReques
if err != nil { if err != nil {
return err return err
} }
var opts *options.CheckpointOptions
var opts options.CheckpointOptions
if r.Options != nil { if r.Options != nil {
v, err := typeurl.UnmarshalAny(r.Options) if err := typeurl.UnmarshalTo(r.Options, &opts); err != nil {
if err != nil {
return err return err
} }
opts = v.(*options.CheckpointOptions)
} }
return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{ return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{
Path: r.Path, Path: r.Path,