prefer task options for PluginInfo request
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
This commit is contained in:
parent
a183b2d232
commit
8a16a6a04a
@ -266,12 +266,12 @@ func (m *TaskManager) validateRuntimeFeatures(ctx context.Context, opts runtime.
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
ropts := opts.RuntimeOptions
|
topts := opts.TaskOptions
|
||||||
if ropts == nil || ropts.GetValue() == nil {
|
if topts == nil || topts.GetValue() == nil {
|
||||||
ropts = opts.TaskOptions
|
topts = opts.RuntimeOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
pInfo, err := m.PluginInfo(ctx, &apitypes.RuntimeRequest{RuntimePath: opts.Runtime, Options: typeurl.MarshalProto(ropts)})
|
pInfo, err := m.PluginInfo(ctx, &apitypes.RuntimeRequest{RuntimePath: opts.Runtime, Options: typeurl.MarshalProto(topts)})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("runtime info: %w", err)
|
return fmt.Errorf("runtime info: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user