From 5deb093171480dec4e4c5625f45cd95317f370a8 Mon Sep 17 00:00:00 2001 From: Miguel Toledo Date: Tue, 21 Jan 2020 10:16:48 -0800 Subject: [PATCH] use args instead of cmd --- flyteplugins/go/tasks/plugins/array/k8s/launcher.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flyteplugins/go/tasks/plugins/array/k8s/launcher.go b/flyteplugins/go/tasks/plugins/array/k8s/launcher.go index 48a8cc5d01..c58c673f80 100644 --- a/flyteplugins/go/tasks/plugins/array/k8s/launcher.go +++ b/flyteplugins/go/tasks/plugins/array/k8s/launcher.go @@ -68,10 +68,10 @@ func LaunchSubTasks(ctx context.Context, tCtx core.TaskExecutionContext, kubeCli return currentState, errors2.Wrapf(ErrBuildPodTemplate, err, "Failed to convert task template to a pod template for task") } - var command []string + var args []string if len(podTemplate.Spec.Containers) > 0 { - command = append(podTemplate.Spec.Containers[0].Command, podTemplate.Spec.Containers[0].Args...) - podTemplate.Spec.Containers[0].Args = []string{} + args = append(podTemplate.Spec.Containers[0].Command, podTemplate.Spec.Containers[0].Args...) + podTemplate.Spec.Containers[0].Command = []string{} } size := currentState.GetExecutionArraySize() @@ -87,7 +87,7 @@ func LaunchSubTasks(ctx context.Context, tCtx core.TaskExecutionContext, kubeCli pod.Spec.Containers[0].Env = append(pod.Spec.Containers[0].Env, arrayJobEnvVars...) - pod.Spec.Containers[0].Command, err = utils.ReplaceTemplateCommandArgs(ctx, command, arrayJobInputReader{tCtx.InputReader()}, tCtx.OutputWriter()) + pod.Spec.Containers[0].Args, err = utils.ReplaceTemplateCommandArgs(ctx, args, arrayJobInputReader{tCtx.InputReader()}, tCtx.OutputWriter()) if err != nil { return currentState, errors2.Wrapf(ErrReplaceCmdTemplate, err, "Failed to replace cmd args") }