From 9f630b8d2037eabbe90110900e8c9a8ea7319518 Mon Sep 17 00:00:00 2001 From: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:20:06 +0800 Subject: [PATCH] Move default execution name generation to flyteadmin (#5714) Signed-off-by: wayner0628 Signed-off-by: Bugra Gedik --- flytectl/cmd/create/execution_util.go | 5 ----- flytectl/go.mod | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 7ebb757a29..bcb5c5639f 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -4,14 +4,12 @@ import ( "context" "fmt" "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" ) @@ -149,9 +147,6 @@ func recoverExecution(ctx context.Context, executionName string, project string, func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, envs *admin.Envs, securityContext *core.SecurityContext, authRole *admin.AuthRole, targetExecName string, targetExecutionCluster string) *admin.ExecutionCreateRequest { - if len(targetExecName) == 0 { - targetExecName = "f" + strings.ReplaceAll(uuid.New().String(), "-", "")[:19] - } var clusterAssignment *admin.ClusterAssignment if executionConfig.ClusterPool != "" { clusterAssignment = &admin.ClusterAssignment{ClusterPoolName: executionConfig.ClusterPool} diff --git a/flytectl/go.mod b/flytectl/go.mod index 9e4baeea63..0298ad38f0 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -21,7 +21,6 @@ require ( github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.3 github.com/google/go-github/v42 v42.0.0 - github.com/google/uuid v1.6.0 github.com/hashicorp/go-version v1.3.0 github.com/hexops/gotextdiff v1.0.3 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 @@ -102,6 +101,7 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect