From 8a16a6a04ad081deac2f4907adda2326e62e5182 Mon Sep 17 00:00:00 2001 From: Iceber Gu Date: Wed, 26 Mar 2025 14:59:17 +0800 Subject: [PATCH] prefer task options for PluginInfo request Signed-off-by: Iceber Gu --- core/runtime/v2/task_manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/runtime/v2/task_manager.go b/core/runtime/v2/task_manager.go index 844070b71..f396ced52 100644 --- a/core/runtime/v2/task_manager.go +++ b/core/runtime/v2/task_manager.go @@ -266,12 +266,12 @@ func (m *TaskManager) validateRuntimeFeatures(ctx context.Context, opts runtime. return nil } - ropts := opts.RuntimeOptions - if ropts == nil || ropts.GetValue() == nil { - ropts = opts.TaskOptions + topts := opts.TaskOptions + if topts == nil || topts.GetValue() == nil { + 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 { return fmt.Errorf("runtime info: %w", err) }