Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: machichima <[email protected]>
  • Loading branch information
machichima committed Jan 19, 2025
1 parent 5edc331 commit a1edbdd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 10 additions & 10 deletions flyteplugins/go/tasks/plugins/k8s/spark/spark.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Check warning on line 209 in flyteplugins/go/tasks/plugins/k8s/spark/spark.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/k8s/spark/spark.go#L207-L209

Added lines #L207 - L209 were not covered by tests

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 {
Expand Down Expand Up @@ -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())
}

Check warning on line 262 in flyteplugins/go/tasks/plugins/k8s/spark/spark.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/k8s/spark/spark.go#L260-L262

Added lines #L260 - L262 were not covered by tests

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 {
Expand Down

0 comments on commit a1edbdd

Please sign in to comment.