From a1edbdd7706fdbc4a61187c1d1c27fe723c8ae9e Mon Sep 17 00:00:00 2001 From: machichima Date: Sun, 19 Jan 2025 21:35:25 +0800 Subject: [PATCH] fix: lint Signed-off-by: machichima --- .../pluginmachinery/flytek8s/pod_helper.go | 2 +- .../go/tasks/plugins/k8s/spark/spark.go | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go index 4467469e44..f5a617ba81 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go @@ -280,7 +280,7 @@ func BuildRawPod(ctx context.Context, tCtx pluginsCore.TaskExecutionContext) (*v return nil, nil, "", err } - primaryContainerName = c.Name + primaryContainerName = c.Name podSpec = &v1.PodSpec{ Containers: []v1.Container{ *c, diff --git a/flyteplugins/go/tasks/plugins/k8s/spark/spark.go b/flyteplugins/go/tasks/plugins/k8s/spark/spark.go index f49b86aef0..40204526b5 100644 --- a/flyteplugins/go/tasks/plugins/k8s/spark/spark.go +++ b/flyteplugins/go/tasks/plugins/k8s/spark/spark.go @@ -208,11 +208,11 @@ func createDriverSpec(ctx context.Context, taskCtx pluginsCore.TaskExecutionCont "Unable to unmarshal driver pod spec [%v], Err: [%v]", driverPod.GetPodSpec(), err.Error()) } - if len(customPodSpec.Containers) != 0 { - // As only the container with the name of primary container set in driver pod will be passed into - // here, we can directly take the container name here as the primaryContainerName - primaryContainerName = customPodSpec.Containers[0].Name - } + if len(customPodSpec.Containers) != 0 { + // As only the container with the name of primary container set in driver pod will be passed into + // here, we can directly take the container name here as the primaryContainerName + primaryContainerName = customPodSpec.Containers[0].Name + } podSpec, err = flytek8s.MergePodSpecs(podSpec, customPodSpec, primaryContainerName, "") if err != nil { @@ -261,11 +261,11 @@ func createExecutorSpec(ctx context.Context, taskCtx pluginsCore.TaskExecutionCo "Unable to unmarshal executor pod spec [%v], Err: [%v]", executorPod.GetPodSpec(), err.Error()) } - if len(customPodSpec.Containers) != 0 { - // As only the container with the name of primary container set in executor pod will be passed into - // here, we can directly take the container name here as the primaryContainerName - primaryContainerName = customPodSpec.Containers[0].Name - } + if len(customPodSpec.Containers) != 0 { + // As only the container with the name of primary container set in executor pod will be passed into + // here, we can directly take the container name here as the primaryContainerName + primaryContainerName = customPodSpec.Containers[0].Name + } podSpec, err = flytek8s.MergePodSpecs(podSpec, customPodSpec, primaryContainerName, "") if err != nil {