From f0166be746778aca82ff0e692cf42839013aa8de Mon Sep 17 00:00:00 2001 From: Jason Parraga Date: Mon, 17 Jun 2024 12:57:26 -0700 Subject: [PATCH] check in gci fixes on flytectl --- flytectl/cmd/config/config.go | 3 +-- .../file_config_test.go | 1 - .../executionclusterlabel/file_config_test.go | 1 - .../file_config_test.go | 1 - .../plugin_override/file_config_test.go | 1 - .../subcommand/project/project_config.go | 1 - .../subcommand/project/project_config_test.go | 1 - .../taskresourceattribute/file_config_test.go | 1 - .../file_config_test.go | 1 - flytectl/cmd/configuration/configuration.go | 6 ++---- .../cmd/configuration/configuration_test.go | 7 ++----- flytectl/cmd/core/cmd.go | 8 +++---- flytectl/cmd/core/cmd_ctx.go | 3 +-- flytectl/cmd/core/cmd_test.go | 1 - flytectl/cmd/create/create.go | 1 - flytectl/cmd/create/create_test.go | 3 +-- flytectl/cmd/create/execution.go | 5 ++--- flytectl/cmd/create/execution_test.go | 12 +++++------ flytectl/cmd/create/execution_util.go | 5 ++--- flytectl/cmd/create/execution_util_test.go | 4 +--- flytectl/cmd/create/project.go | 3 +-- flytectl/cmd/create/project_test.go | 3 --- flytectl/cmd/delete/delete.go | 1 - flytectl/cmd/delete/delete_test.go | 3 +-- flytectl/cmd/delete/execution_test.go | 1 - ...tchable_cluster_resource_attribute_test.go | 1 - .../matchable_execution_cluster_label_test.go | 1 - ...atchable_execution_queue_attribute_test.go | 1 - .../delete/matchable_plugin_override_test.go | 1 - .../matchable_task_resource_attribute_test.go | 1 - .../matchable_workflow_execution_config.go | 3 +-- ...atchable_workflow_execution_config_test.go | 4 +--- flytectl/cmd/demo/exec_test.go | 11 ++++------ flytectl/cmd/demo/start.go | 6 ++---- flytectl/cmd/demo/status.go | 3 +-- flytectl/cmd/demo/status_test.go | 3 +-- flytectl/cmd/demo/teardown.go | 5 ++--- flytectl/cmd/get/execution.go | 6 ++---- flytectl/cmd/get/execution_test.go | 4 +--- flytectl/cmd/get/execution_util.go | 6 ++---- flytectl/cmd/get/execution_util_test.go | 1 - flytectl/cmd/get/get.go | 1 - flytectl/cmd/get/get_test.go | 3 +-- flytectl/cmd/get/launch_plan_test.go | 16 +++++--------- ...tchable_cluster_resource_attribute_test.go | 4 +--- .../matchable_execution_cluster_label_test.go | 4 +--- ...atchable_execution_queue_attribute_test.go | 4 +--- .../cmd/get/matchable_plugin_override_test.go | 4 +--- .../matchable_task_resource_attribute_test.go | 4 +--- .../matchable_workflow_execution_config.go | 1 - ...atchable_workflow_execution_config_test.go | 4 +--- flytectl/cmd/get/node_execution.go | 3 +-- flytectl/cmd/get/node_execution_test.go | 4 +--- flytectl/cmd/get/project.go | 8 +++---- flytectl/cmd/get/project_test.go | 4 +--- flytectl/cmd/get/task_test.go | 12 +++-------- flytectl/cmd/get/workflow.go | 10 ++++----- flytectl/cmd/get/workflow_test.go | 17 ++++++--------- flytectl/cmd/register/examples.go | 1 - flytectl/cmd/register/files.go | 4 +--- flytectl/cmd/register/files_test.go | 8 +++---- flytectl/cmd/register/register.go | 1 - flytectl/cmd/register/register_util.go | 21 +++++++------------ flytectl/cmd/register/register_util_test.go | 16 +++++--------- flytectl/cmd/root.go | 1 - flytectl/cmd/sandbox/exec_test.go | 11 ++++------ flytectl/cmd/sandbox/status.go | 3 +-- flytectl/cmd/sandbox/status_test.go | 3 +-- flytectl/cmd/sandbox/teardown.go | 5 ++--- flytectl/cmd/testutils/test_utils.go | 3 +-- flytectl/cmd/update/execution_test.go | 1 - flytectl/cmd/update/launch_plan_meta_test.go | 1 - flytectl/cmd/update/launch_plan_test.go | 1 - ...tchable_cluster_resource_attribute_test.go | 5 ++--- .../matchable_execution_cluster_label_test.go | 5 ++--- ...atchable_execution_queue_attribute_test.go | 5 ++--- .../update/matchable_plugin_override_test.go | 5 ++--- .../matchable_task_resource_attribute_test.go | 5 ++--- .../matchable_workflow_execution_config.go | 5 ++--- ...atchable_workflow_execution_config_test.go | 5 ++--- flytectl/cmd/update/named_entity_test.go | 3 +-- flytectl/cmd/update/project.go | 3 +-- flytectl/cmd/update/project_test.go | 7 +++---- flytectl/cmd/update/task_meta_test.go | 1 - flytectl/cmd/update/update.go | 1 - flytectl/cmd/update/workflow_meta_test.go | 1 - flytectl/cmd/upgrade/upgrade.go | 12 ++++------- flytectl/cmd/upgrade/upgrade_test.go | 8 ++----- flytectl/cmd/version/version.go | 4 +--- flytectl/cmd/version/version_test.go | 7 ++----- .../pkg/bubbletea/bubbletea_pagination.go | 3 +-- .../bubbletea/bubbletea_pagination_util.go | 1 - flytectl/pkg/docker/docker_util.go | 5 ++--- flytectl/pkg/docker/docker_util_test.go | 11 ++++------ .../pkg/ext/attribute_match_deleter_test.go | 1 - flytectl/pkg/ext/attribute_match_fetcher.go | 3 +-- .../pkg/ext/attribute_match_fetcher_test.go | 1 - .../pkg/ext/attribute_match_updater_test.go | 1 - flytectl/pkg/ext/execution_fetcher_test.go | 1 - flytectl/pkg/ext/fetcher.go | 1 - flytectl/pkg/ext/launch_plan_fetcher.go | 1 - flytectl/pkg/ext/launch_plan_fetcher_test.go | 2 -- flytectl/pkg/ext/project_fetcher.go | 1 - flytectl/pkg/ext/task_fetcher.go | 1 - flytectl/pkg/ext/task_fetcher_test.go | 2 -- flytectl/pkg/ext/workflow_fetcher.go | 1 - flytectl/pkg/ext/workflow_fetcher_test.go | 2 -- flytectl/pkg/github/githubutil.go | 1 - flytectl/pkg/github/githubutil_test.go | 1 - flytectl/pkg/pkce/token_cache_keyring.go | 1 - flytectl/pkg/printer/printer.go | 1 - flytectl/pkg/printer/printer_test.go | 3 +-- flytectl/pkg/sandbox/start_test.go | 11 +++++----- flytectl/pkg/sandbox/status_test.go | 3 +-- flytectl/pkg/util/util.go | 3 +-- flytectl/pkg/util/util_test.go | 1 - flytectl/pkg/visualize/graphviz.go | 3 +-- flytectl/pkg/visualize/graphviz_test.go | 3 +-- 118 files changed, 142 insertions(+), 326 deletions(-) diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 4296d28b3b8..ff3b2e92192 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -4,9 +4,8 @@ import ( "fmt" "strings" - "github.com/flyteorg/flyte/flytestdlib/config" - "github.com/flyteorg/flyte/flytectl/pkg/printer" + "github.com/flyteorg/flyte/flytestdlib/config" ) var ( diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go index 92b791cf0a6..c9c003dc08f 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go index 79ea0599300..b45a5404b1f 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go index 191cabb023b..ac9dbc3d608 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go index 13037945af0..d66fe591410 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index e693e566c64..d76030faa72 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "gopkg.in/yaml.v3" ) diff --git a/flytectl/cmd/config/subcommand/project/project_config_test.go b/flytectl/cmd/config/subcommand/project/project_config_test.go index b848943f61b..bbaf5213755 100644 --- a/flytectl/cmd/config/subcommand/project/project_config_test.go +++ b/flytectl/cmd/config/subcommand/project/project_config_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go index cba5ea672b7..96e4f1bb887 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go index 45454f45367..a4fa81cbbb6 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index d3374233ba0..ecbedba7210 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -8,13 +8,11 @@ import ( "os" "strings" - "github.com/flyteorg/flyte/flytectl/pkg/util" - - "github.com/flyteorg/flyte/flytectl/pkg/configutil" - initConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/config" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" + "github.com/flyteorg/flyte/flytectl/pkg/configutil" + "github.com/flyteorg/flyte/flytectl/pkg/util" "github.com/flyteorg/flyte/flytestdlib/config/viper" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/spf13/cobra" diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 844d2ee6b7f..7438faeedbd 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -9,14 +9,11 @@ import ( "strings" "testing" - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - "github.com/flyteorg/flyte/flytectl/pkg/configutil" - initConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/configutil" "github.com/flyteorg/flyte/flytectl/pkg/util" - + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index b2bd77c3179..92e50f4e7d7 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -4,16 +4,14 @@ import ( "context" "fmt" - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/pkg/pkce" "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - + "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type PFlagProvider interface { diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 980d9ee395b..35e9945e596 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -3,9 +3,8 @@ package cmdcore import ( "io" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - "github.com/flyteorg/flyte/flytectl/pkg/ext" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) diff --git a/flytectl/cmd/core/cmd_test.go b/flytectl/cmd/core/cmd_test.go index 13737b4a611..e3a18431059 100644 --- a/flytectl/cmd/core/cmd_test.go +++ b/flytectl/cmd/core/cmd_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flyte/flytestdlib/config" - "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index eaecf4c8338..06b1ebe9394 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -3,7 +3,6 @@ package create import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index 5dbe6002549..b7b5a2c32c9 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -4,9 +4,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/stretchr/testify/assert" ) const testDataFolder = "../testdata/" diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 84b6e2dad93..5da311357bd 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -4,11 +4,10 @@ import ( "context" "fmt" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/flyteorg/flyte/flytectl/cmd/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" ) const ( diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index ce418df9e7c..4886e2e7b84 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -4,17 +4,15 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/flyteorg/flyte/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" ) type createSuite struct { diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 060d22dddf4..7ebb757a291 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -6,14 +6,13 @@ import ( "io/ioutil" "strings" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + cmdGet "github.com/flyteorg/flyte/flytectl/cmd/get" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/google/uuid" "sigs.k8s.io/yaml" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - cmdGet "github.com/flyteorg/flyte/flytectl/cmd/get" ) func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index ab6391c9839..000e3621d35 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -5,11 +5,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/flyteorg/flyte/flytectl/cmd/config" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 24d12f3533e..fa1046a2480 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -7,9 +7,8 @@ import ( "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/logger" ) diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 302efc8b5e2..1d63c0fceb3 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -6,12 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/clierrors" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 19a8107116c..26d930a8a6c 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 3d5df42dcb6..01844503050 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -4,9 +4,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/stretchr/testify/assert" ) const ( diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index 73d51a02aea..c883a4d4dff 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go index 26ddd8b468f..f2fe9ca49e5 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go index 9868b2045f4..7335bd67210 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go index d338bc529db..20402ee79be 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_plugin_override_test.go b/flytectl/cmd/delete/matchable_plugin_override_test.go index 80e519a32b5..623729fdd23 100644 --- a/flytectl/cmd/delete/matchable_plugin_override_test.go +++ b/flytectl/cmd/delete/matchable_plugin_override_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 867a38af6a0..484052b6abd 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index 65dabb5f207..ce778d714af 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -3,10 +3,9 @@ package delete import ( "context" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyte/flytectl/cmd/config" sconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go index fe0e76fdecf..88681a32d5b 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -4,11 +4,9 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyte/flytectl/cmd/config" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/demo/exec_test.go b/flytectl/cmd/demo/exec_test.go index ac6a82b8d0c..1d4fcea2144 100644 --- a/flytectl/cmd/demo/exec_test.go +++ b/flytectl/cmd/demo/exec_test.go @@ -8,16 +8,13 @@ import ( "strings" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/stretchr/testify/assert" - "github.com/docker/docker/api/types" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 153bae47bd0..fa3de391014 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -3,12 +3,10 @@ package demo import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/docker" - - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/demo/status.go b/flytectl/cmd/demo/status.go index 33063b04c27..8dc06e20a1a 100644 --- a/flytectl/cmd/demo/status.go +++ b/flytectl/cmd/demo/status.go @@ -3,10 +3,9 @@ package demo import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/demo/status_test.go b/flytectl/cmd/demo/status_test.go index 2e26a21a773..0f6dd68ad0e 100644 --- a/flytectl/cmd/demo/status_test.go +++ b/flytectl/cmd/demo/status_test.go @@ -3,9 +3,8 @@ package demo import ( "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/docker/docker/api/types" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/demo/teardown.go b/flytectl/cmd/demo/teardown.go index 9df954acfec..7bcba4fb79b 100644 --- a/flytectl/cmd/demo/teardown.go +++ b/flytectl/cmd/demo/teardown.go @@ -3,11 +3,10 @@ package demo import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/docker" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 4c11830c860..8bfcc36e004 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -7,13 +7,11 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/flyteorg/flyte/flytectl/pkg/bubbletea" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" - + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 51a1a1f8254..329211621a9 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -6,13 +6,11 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/execution" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 2123e885f5f..45214a7ac83 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -6,14 +6,12 @@ import ( "io/ioutil" "os" - structpb "github.com/golang/protobuf/ptypes/struct" - - "gopkg.in/yaml.v3" - cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + structpb "github.com/golang/protobuf/ptypes/struct" + "gopkg.in/yaml.v3" ) // ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. Only works with go-yaml. diff --git a/flytectl/cmd/get/execution_util_test.go b/flytectl/cmd/get/execution_util_test.go index ff316ca4e03..2c081950f2c 100644 --- a/flytectl/cmd/get/execution_util_test.go +++ b/flytectl/cmd/get/execution_util_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" - "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index b61273233bd..fbc820d8927 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index dc2522937ee..c40394c7850 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -5,9 +5,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/stretchr/testify/assert" ) const projectValue = "dummyProject" diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 8f67c64e335..c197ec111e6 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,23 +5,17 @@ import ( "os" "testing" - structpb "github.com/golang/protobuf/ptypes/struct" - - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - - "github.com/flyteorg/flyte/flytectl/pkg/printer" - - "github.com/flyteorg/flyte/flytectl/pkg/filters" - - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/launchplan" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" + "github.com/flyteorg/flyte/flytectl/pkg/filters" + "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - + structpb "github.com/golang/protobuf/ptypes/struct" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go index 25e7f31a670..43069edaa67 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go index cf0bac5b24e..3ac42a87de6 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionclusterlabel" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go index fd4a6ddb113..3dd8e235cfa 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionqueueattribute" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_plugin_override_test.go b/flytectl/cmd/get/matchable_plugin_override_test.go index 91bfedc7a7d..025267a4622 100644 --- a/flytectl/cmd/get/matchable_plugin_override_test.go +++ b/flytectl/cmd/get/matchable_plugin_override_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/plugin_override" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index d0e180fd2c4..b5e88875833 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 57589e0d3b0..6c1e3249d20 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -10,7 +10,6 @@ import ( cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/flytectl/cmd/get/matchable_workflow_execution_config_test.go b/flytectl/cmd/get/matchable_workflow_execution_config_test.go index 0011fe389eb..69b88ee9007 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go index 6c7e259d58d..7b2e7a9e882 100644 --- a/flytectl/cmd/get/node_execution.go +++ b/flytectl/cmd/get/node_execution.go @@ -7,13 +7,12 @@ import ( "sort" "strconv" + "github.com/disiqueira/gotree" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/disiqueira/gotree" "github.com/golang/protobuf/jsonpb" ) diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go index f4d6040513f..588ea6033cf 100644 --- a/flytectl/cmd/get/node_execution_test.go +++ b/flytectl/cmd/get/node_execution_test.go @@ -5,13 +5,11 @@ import ( "testing" "time" + "github.com/disiqueira/gotree" "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/event" - - "github.com/disiqueira/gotree" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/durationpb" diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 0b66055f65c..96b68c56fbf 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -3,15 +3,13 @@ package get import ( "context" + "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/golang/protobuf/proto" - - "github.com/flyteorg/flyte/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flytectl/pkg/printer" ) const ( diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go index a230cbb19fe..7bcc55a236b 100644 --- a/flytectl/cmd/get/project_test.go +++ b/flytectl/cmd/get/project_test.go @@ -4,10 +4,8 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" - + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index c5379ab4f91..27e65d3fef2 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -5,21 +5,15 @@ import ( "os" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" - taskConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/task" - - "github.com/flyteorg/flyte/flytectl/pkg/filters" - - "github.com/stretchr/testify/mock" - + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" + "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index c90d152f217..4fa8f93928d 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,16 +3,14 @@ package get import ( "context" - workflowconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" - "github.com/flyteorg/flyte/flytectl/pkg/ext" - "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/golang/protobuf/proto" - "github.com/flyteorg/flyte/flytectl/cmd/config" + workflowconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flytectl/pkg/printer" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/golang/protobuf/proto" ) const ( diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 32ef21a9382..118ad03521c 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -4,22 +4,17 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/cmd/config" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" - - "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - - "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflow" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/protobuf/types/known/timestamppb" ) var ( diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index ed90ba12539..6ede75beccd 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -9,7 +9,6 @@ import ( cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" g "github.com/flyteorg/flyte/flytectl/pkg/github" "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/google/go-github/v42/github" ) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b3311117a30..ae569942077 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -7,13 +7,11 @@ import ( "os" "github.com/flyteorg/flyte/flytectl/cmd/config" - - "github.com/flyteorg/flyte/flytestdlib/storage" - rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/storage" ) const ( diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index f5b221989a2..45827b7e137 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -4,16 +4,14 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flytectl/cmd/config" + rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytestdlib/contextutils" + "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" "github.com/flyteorg/flyte/flytestdlib/storage" - - rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 1de031fc519..bc4b2e8fed6 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -3,7 +3,6 @@ package register import ( rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" cmdcore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index c968623a8db..0bf5a23d490 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -18,29 +18,24 @@ import ( "strconv" "strings" - errors2 "github.com/flyteorg/flyte/flytestdlib/errors" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - - g "github.com/flyteorg/flyte/flytectl/pkg/github" - - "github.com/flyteorg/flyte/flytestdlib/contextutils" - "github.com/flyteorg/flyte/flytestdlib/promutils" - "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" - "github.com/flyteorg/flyte/flytestdlib/utils" - "github.com/flyteorg/flyte/flytectl/cmd/config" rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + g "github.com/flyteorg/flyte/flytectl/pkg/github" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flytestdlib/contextutils" + errors2 "github.com/flyteorg/flyte/flytestdlib/errors" "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/promutils" + "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" "github.com/flyteorg/flyte/flytestdlib/storage" - "github.com/google/go-github/v42/github" - + "github.com/flyteorg/flyte/flytestdlib/utils" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" + "github.com/google/go-github/v42/github" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 97148862f58..b6625c27dee 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -12,30 +12,24 @@ import ( "strings" "testing" + rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" ghMocks "github.com/flyteorg/flyte/flytectl/pkg/github/mocks" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - - "github.com/flyteorg/flyte/flytestdlib/utils" - - v1 "k8s.io/api/core/v1" - "github.com/flyteorg/flyte/flytestdlib/contextutils" "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" "github.com/flyteorg/flyte/flytestdlib/storage" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - - rconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - + "github.com/flyteorg/flyte/flytestdlib/utils" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/durationpb" + v1 "k8s.io/api/core/v1" ) type MockHTTPClient struct { diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 112fa4074c5..6806cae236e 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -22,7 +22,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flyte/flytestdlib/config" "github.com/flyteorg/flyte/flytestdlib/config/viper" - "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" diff --git a/flytectl/cmd/sandbox/exec_test.go b/flytectl/cmd/sandbox/exec_test.go index 828c47ba4eb..6646d39cd92 100644 --- a/flytectl/cmd/sandbox/exec_test.go +++ b/flytectl/cmd/sandbox/exec_test.go @@ -8,16 +8,13 @@ import ( "strings" "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/stretchr/testify/assert" - "github.com/docker/docker/api/types" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index 64dd5020656..e5a3fc46e72 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -3,10 +3,9 @@ package sandbox import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/sandbox/status_test.go b/flytectl/cmd/sandbox/status_test.go index 1bdae485613..ab2be170ed8 100644 --- a/flytectl/cmd/sandbox/status_test.go +++ b/flytectl/cmd/sandbox/status_test.go @@ -3,9 +3,8 @@ package sandbox import ( "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/docker/docker/api/types" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 6ee747f6379..8e68ffafb53 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -3,11 +3,10 @@ package sandbox import ( "context" - "github.com/flyteorg/flyte/flytectl/pkg/docker" - "github.com/flyteorg/flyte/flytectl/pkg/sandbox" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flytectl/pkg/docker" + "github.com/flyteorg/flyte/flytectl/pkg/sandbox" ) const ( diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 87b3b80044f..1e2bba1365a 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -12,14 +12,13 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/flyteorg/flyte/flytectl/cmd/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" extMocks "github.com/flyteorg/flyte/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flytestdlib/utils" + "github.com/stretchr/testify/assert" ) const projectValue = "dummyProject" diff --git a/flytectl/cmd/update/execution_test.go b/flytectl/cmd/update/execution_test.go index 3401d77d41b..d8e2db59e7a 100644 --- a/flytectl/cmd/update/execution_test.go +++ b/flytectl/cmd/update/execution_test.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/launch_plan_meta_test.go b/flytectl/cmd/update/launch_plan_meta_test.go index df6cd624d13..63d4ded7374 100644 --- a/flytectl/cmd/update/launch_plan_meta_test.go +++ b/flytectl/cmd/update/launch_plan_meta_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index 93a19b22417..5704702a2e4 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 3dad6643ee7..c9027946856 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index cdcc2f05b39..0bbccbc83b1 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index 3e536b99476..a88dc80717b 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index b0dc9bade03..3207951db6a 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - pluginoverride "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index d3119bcbaed..6e54b17e348 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 3e327c8e18d..b5647ede17e 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -4,11 +4,10 @@ import ( "context" "fmt" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - sconfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index 963dde4e73e..06e0996d375 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -4,13 +4,12 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const ( diff --git a/flytectl/cmd/update/named_entity_test.go b/flytectl/cmd/update/named_entity_test.go index 61303d5e65b..2dbb50fba5f 100644 --- a/flytectl/cmd/update/named_entity_test.go +++ b/flytectl/cmd/update/named_entity_test.go @@ -4,13 +4,12 @@ import ( "context" "fmt" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/mock" ) func testNamedEntityUpdate( diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index c89861741f1..38f959ba38a 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -5,13 +5,12 @@ import ( "fmt" "os" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 6bf8084cc8c..c5785e0a127 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -4,14 +4,13 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flyte/flytectl/cmd/config" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/ext" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) func TestProjectCanBeActivated(t *testing.T) { diff --git a/flytectl/cmd/update/task_meta_test.go b/flytectl/cmd/update/task_meta_test.go index a3550418bca..09cc5731151 100644 --- a/flytectl/cmd/update/task_meta_test.go +++ b/flytectl/cmd/update/task_meta_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 11c3183639d..4cf1b4f2087 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -11,7 +11,6 @@ import ( "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/update/workflow_meta_test.go b/flytectl/cmd/update/workflow_meta_test.go index 157b79bc934..05589ee6c79 100644 --- a/flytectl/cmd/update/workflow_meta_test.go +++ b/flytectl/cmd/update/workflow_meta_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/ext" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 5d91848720a..c4ad132c309 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -8,17 +8,13 @@ import ( "runtime" "strings" - "github.com/flyteorg/flyte/flytectl/pkg/util" - - stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" - + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/github" - + "github.com/flyteorg/flyte/flytectl/pkg/platformutil" + "github.com/flyteorg/flyte/flytectl/pkg/util" "github.com/flyteorg/flyte/flytestdlib/logger" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/mouuff/go-rocket-update/pkg/updater" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" - "github.com/flyteorg/flyte/flytectl/pkg/platformutil" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 5cb52f2e981..a8a955639ed 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -5,16 +5,12 @@ import ( "sort" "testing" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/flyteorg/flyte/flytectl/pkg/github" - "github.com/flyteorg/flyte/flytectl/pkg/util" - "github.com/flyteorg/flyte/flytectl/pkg/platformutil" - + "github.com/flyteorg/flyte/flytectl/pkg/util" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 7ff69cae291..38b61d55380 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -6,11 +6,9 @@ import ( "fmt" "runtime" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/pkg/github" - "github.com/flyteorg/flyte/flytectl/pkg/platformutil" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/logger" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index d9453f4063b..a1abbd7883d 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -8,16 +8,13 @@ import ( "sort" "testing" + cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flytectl/cmd/testutils" - admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" - - "github.com/spf13/cobra" - - cmdCore "github.com/flyteorg/flyte/flytectl/cmd/core" "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" + "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/bubbletea/bubbletea_pagination.go b/flytectl/pkg/bubbletea/bubbletea_pagination.go index 3b8f5319b50..01a4b7ea982 100644 --- a/flytectl/pkg/bubbletea/bubbletea_pagination.go +++ b/flytectl/pkg/bubbletea/bubbletea_pagination.go @@ -9,12 +9,11 @@ import ( "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbles/paginator" "github.com/charmbracelet/bubbles/spinner" + tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" "github.com/golang/protobuf/proto" - - tea "github.com/charmbracelet/bubbletea" ) var ( diff --git a/flytectl/pkg/bubbletea/bubbletea_pagination_util.go b/flytectl/pkg/bubbletea/bubbletea_pagination_util.go index 21e624ffede..dc6ddd735ba 100644 --- a/flytectl/pkg/bubbletea/bubbletea_pagination_util.go +++ b/flytectl/pkg/bubbletea/bubbletea_pagination_util.go @@ -10,7 +10,6 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/flyteorg/flyte/flytectl/pkg/filters" "github.com/flyteorg/flyte/flytectl/pkg/printer" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index f2c98da418a..c4751a0a0f9 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -9,17 +9,16 @@ import ( "os" "strings" - "github.com/docker/docker/client" - "github.com/enescakir/emoji" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/volume" + "github.com/docker/docker/client" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" + "github.com/enescakir/emoji" "github.com/flyteorg/flyte/flytectl/clierrors" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/docker" cmdUtil "github.com/flyteorg/flyte/flytectl/pkg/commandutils" diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index fa99e88c8ac..feae21352cf 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -12,18 +12,15 @@ import ( "testing" "time" - f "github.com/flyteorg/flyte/flytectl/pkg/filesystemutils" - + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/volume" - "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" - - "github.com/stretchr/testify/mock" - - "github.com/docker/docker/api/types" "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/docker" + "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" + f "github.com/flyteorg/flyte/flytectl/pkg/filesystemutils" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) var ( diff --git a/flytectl/pkg/ext/attribute_match_deleter_test.go b/flytectl/pkg/ext/attribute_match_deleter_test.go index 885eff05855..0655419e9e3 100644 --- a/flytectl/pkg/ext/attribute_match_deleter_test.go +++ b/flytectl/pkg/ext/attribute_match_deleter_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go index eca2ce8e157..0665f59e8e8 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher.go +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -3,10 +3,9 @@ package ext import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminFetcherExtClient) FetchWorkflowAttributes(ctx context.Context, project, domain, name string, diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go index b9ecff16d6b..43edba5ec18 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher_test.go +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/attribute_match_updater_test.go b/flytectl/pkg/ext/attribute_match_updater_test.go index 1fab0f67950..4525865e508 100644 --- a/flytectl/pkg/ext/attribute_match_updater_test.go +++ b/flytectl/pkg/ext/attribute_match_updater_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/execution_fetcher_test.go b/flytectl/pkg/ext/execution_fetcher_test.go index 304f9298803..2a5fb1c712d 100644 --- a/flytectl/pkg/ext/execution_fetcher_test.go +++ b/flytectl/pkg/ext/execution_fetcher_test.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 60bc32cd0f1..d62d58b8d18 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -4,7 +4,6 @@ import ( "context" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) diff --git a/flytectl/pkg/ext/launch_plan_fetcher.go b/flytectl/pkg/ext/launch_plan_fetcher.go index 53d0b692552..3c4ae965852 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher.go +++ b/flytectl/pkg/ext/launch_plan_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go index 2e882d6df9c..61b78efd249 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher_test.go +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -6,11 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/ext/project_fetcher.go b/flytectl/pkg/ext/project_fetcher.go index 7c2a53b2231..a1e83fdf70d 100644 --- a/flytectl/pkg/ext/project_fetcher.go +++ b/flytectl/pkg/ext/project_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) diff --git a/flytectl/pkg/ext/task_fetcher.go b/flytectl/pkg/ext/task_fetcher.go index 840a78d1726..53c0acccb07 100644 --- a/flytectl/pkg/ext/task_fetcher.go +++ b/flytectl/pkg/ext/task_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go index b39c1724d0f..ad903db1d5c 100644 --- a/flytectl/pkg/ext/task_fetcher_test.go +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -6,11 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go index 23d92af2309..7f3624f5122 100644 --- a/flytectl/pkg/ext/workflow_fetcher.go +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index c7992cc0c0e..114d6afea45 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -6,11 +6,9 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/filters" - "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index e439df44f86..5e639006e58 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -13,7 +13,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/util" "github.com/flyteorg/flyte/flytestdlib/logger" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" - "github.com/google/go-github/v42/github" "github.com/mouuff/go-rocket-update/pkg/provider" "github.com/mouuff/go-rocket-update/pkg/updater" diff --git a/flytectl/pkg/github/githubutil_test.go b/flytectl/pkg/github/githubutil_test.go index bd4001faa65..652e812e190 100644 --- a/flytectl/pkg/github/githubutil_test.go +++ b/flytectl/pkg/github/githubutil_test.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/platformutil" stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/google/go-github/v42/github" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "golang.org/x/text/cases" diff --git a/flytectl/pkg/pkce/token_cache_keyring.go b/flytectl/pkg/pkce/token_cache_keyring.go index afcfa74db50..7b79a09f888 100644 --- a/flytectl/pkg/pkce/token_cache_keyring.go +++ b/flytectl/pkg/pkce/token_cache_keyring.go @@ -8,7 +8,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/clients/go/admin/cache" "github.com/flyteorg/flyte/flytestdlib/logger" - "github.com/zalando/go-keyring" "golang.org/x/oauth2" ) diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 37df90ff75d..df7effd8a1f 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -14,7 +14,6 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/errors" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/kataras/tablewriter" diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index f66e29a2a50..afc5edb7b1f 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -11,9 +11,8 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" - "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/types/known/timestamppb" ) type Inner struct { diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index 82c8613126a..1cf42e471b0 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -9,6 +9,11 @@ import ( "strings" "testing" + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/volume" + sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" f "github.com/flyteorg/flyte/flytectl/pkg/filesystemutils" @@ -17,12 +22,6 @@ import ( "github.com/flyteorg/flyte/flytectl/pkg/k8s" k8sMocks "github.com/flyteorg/flyte/flytectl/pkg/k8s/mocks" "github.com/flyteorg/flyte/flytectl/pkg/util" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/volume" - sandboxCmdConfig "github.com/flyteorg/flyte/flytectl/cmd/config/subcommand/sandbox" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/sandbox/status_test.go b/flytectl/pkg/sandbox/status_test.go index 98080bf6424..264ae6196fe 100644 --- a/flytectl/pkg/sandbox/status_test.go +++ b/flytectl/pkg/sandbox/status_test.go @@ -3,9 +3,8 @@ package sandbox import ( "testing" - "github.com/flyteorg/flyte/flytectl/cmd/testutils" - "github.com/docker/docker/api/types" + "github.com/flyteorg/flyte/flytectl/cmd/testutils" "github.com/flyteorg/flyte/flytectl/pkg/docker" "github.com/flyteorg/flyte/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 8b052269f84..18067d17028 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -9,10 +9,9 @@ import ( "path/filepath" "strings" + "github.com/enescakir/emoji" "github.com/flyteorg/flyte/flytectl/pkg/configutil" "github.com/flyteorg/flyte/flytectl/pkg/docker" - - "github.com/enescakir/emoji" hversion "github.com/hashicorp/go-version" ) diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index b3c3f374971..d378b0d5c3e 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/flyteorg/flyte/flytectl/pkg/docker" - "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/visualize/graphviz.go b/flytectl/pkg/visualize/graphviz.go index d088a2515b4..745c7ad2481 100644 --- a/flytectl/pkg/visualize/graphviz.go +++ b/flytectl/pkg/visualize/graphviz.go @@ -4,9 +4,8 @@ import ( "fmt" "strings" - "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" - graphviz "github.com/awalterschulze/gographviz" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) diff --git a/flytectl/pkg/visualize/graphviz_test.go b/flytectl/pkg/visualize/graphviz_test.go index fd56f8748e2..72dcd3a69b4 100644 --- a/flytectl/pkg/visualize/graphviz_test.go +++ b/flytectl/pkg/visualize/graphviz_test.go @@ -6,11 +6,10 @@ import ( "io/ioutil" "testing" + graphviz "github.com/awalterschulze/gographviz" "github.com/flyteorg/flyte/flytectl/pkg/visualize/mocks" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytestdlib/utils" - - graphviz "github.com/awalterschulze/gographviz" "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock"