From 358151e6fdd349a7f289b4e2c0cb150a9e9e0a1b Mon Sep 17 00:00:00 2001 From: Rafael Raposo Date: Mon, 30 Sep 2024 20:51:47 +0200 Subject: [PATCH] lint Signed-off-by: Rafael Raposo --- flyteadmin/pkg/rpc/adminservice/base.go | 2 +- .../pkg/workflowengine/impl/k8s_executor.go | 9 +++++---- .../workflowengine/impl/k8s_executor_test.go | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/flyteadmin/pkg/rpc/adminservice/base.go b/flyteadmin/pkg/rpc/adminservice/base.go index 651f170fd6..888729c652 100644 --- a/flyteadmin/pkg/rpc/adminservice/base.go +++ b/flyteadmin/pkg/rpc/adminservice/base.go @@ -82,7 +82,7 @@ func NewAdminServer(ctx context.Context, pluginRegistry *plugins.Registry, confi go func() { executionEventWriter.Run() }() - + workflowExecutor := workflowengineImpl.NewK8sWorkflowExecutor(configuration, execCluster, workflowBuilder, dataStorageClient, executionEventWriter) logger.Info(ctx, "Successfully created a workflow executor engine") pluginRegistry.RegisterDefault(plugins.PluginIDWorkflowExecutor, workflowExecutor) diff --git a/flyteadmin/pkg/workflowengine/impl/k8s_executor.go b/flyteadmin/pkg/workflowengine/impl/k8s_executor.go index b269f85957..8f79b30180 100644 --- a/flyteadmin/pkg/workflowengine/impl/k8s_executor.go +++ b/flyteadmin/pkg/workflowengine/impl/k8s_executor.go @@ -3,6 +3,11 @@ package impl import ( "context" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/types/known/timestamppb" + k8apierr "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + eventsInterfaces "github.com/flyteorg/flyte/flyteadmin/pkg/async/events/interfaces" "github.com/flyteorg/flyte/flyteadmin/pkg/errors" "github.com/flyteorg/flyte/flyteadmin/pkg/executioncluster" @@ -14,10 +19,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/event" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flyte/flytestdlib/storage" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/types/known/timestamppb" - k8apierr "k8s.io/apimachinery/pkg/api/errors" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) var deletePropagationBackground = v1.DeletePropagationBackground diff --git a/flyteadmin/pkg/workflowengine/impl/k8s_executor_test.go b/flyteadmin/pkg/workflowengine/impl/k8s_executor_test.go index 8017d1e473..458d2f02ba 100644 --- a/flyteadmin/pkg/workflowengine/impl/k8s_executor_test.go +++ b/flyteadmin/pkg/workflowengine/impl/k8s_executor_test.go @@ -3,6 +3,16 @@ package impl import ( "context" "errors" + "regexp" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + k8apierr "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + eventMock "github.com/flyteorg/flyte/flyteadmin/pkg/async/events/mocks" "github.com/flyteorg/flyte/flyteadmin/pkg/executioncluster" execClusterIfaces "github.com/flyteorg/flyte/flyteadmin/pkg/executioncluster/interfaces" @@ -18,14 +28,6 @@ import ( flyteclient "github.com/flyteorg/flyte/flytepropeller/pkg/client/clientset/versioned" v1alpha12 "github.com/flyteorg/flyte/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1" "github.com/flyteorg/flyte/flytestdlib/storage" - "github.com/golang/protobuf/proto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - k8apierr "k8s.io/apimachinery/pkg/api/errors" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - "regexp" - "testing" ) var fakeFlyteWF = FakeFlyteWorkflowV1alpha1{}