Merge pull request #10133 from AkihiroSuda/fix-10062
cri: introspectRuntimeFeatures: fix nil panic
This commit is contained in:
commit
0426e3c2eb
@ -409,9 +409,11 @@ func introspectRuntimeFeatures(ctx context.Context, intro introspection.Service,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
rr.Options, err = protobuf.MarshalAnyToProto(options)
|
if options != nil {
|
||||||
if err != nil {
|
rr.Options, err = protobuf.MarshalAnyToProto(options)
|
||||||
return nil, fmt.Errorf("failed to marshal %T: %w", options, err)
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to marshal %T: %w", options, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
infoResp, err := intro.PluginInfo(ctx, string(plugins.RuntimePluginV2), "task", rr)
|
infoResp, err := intro.PluginInfo(ctx, string(plugins.RuntimePluginV2), "task", rr)
|
||||||
|
Loading…
Reference in New Issue
Block a user