Skip to content

Commit 8a16a6a

Browse files
Iceberk8s-infra-cherrypick-robot
authored andcommitted
prefer task options for PluginInfo request
Signed-off-by: Iceber Gu <[email protected]>
1 parent a183b2d commit 8a16a6a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

core/runtime/v2/task_manager.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ func (m *TaskManager) validateRuntimeFeatures(ctx context.Context, opts runtime.
266266
return nil
267267
}
268268

269-
ropts := opts.RuntimeOptions
270-
if ropts == nil || ropts.GetValue() == nil {
271-
ropts = opts.TaskOptions
269+
topts := opts.TaskOptions
270+
if topts == nil || topts.GetValue() == nil {
271+
topts = opts.RuntimeOptions
272272
}
273273

274-
pInfo, err := m.PluginInfo(ctx, &apitypes.RuntimeRequest{RuntimePath: opts.Runtime, Options: typeurl.MarshalProto(ropts)})
274+
pInfo, err := m.PluginInfo(ctx, &apitypes.RuntimeRequest{RuntimePath: opts.Runtime, Options: typeurl.MarshalProto(topts)})
275275
if err != nil {
276276
return fmt.Errorf("runtime info: %w", err)
277277
}

0 commit comments

Comments
 (0)