Skip to content

Commit

Permalink
Move default execution name generation to flyteadmin (#5714)
Browse files Browse the repository at this point in the history
Signed-off-by: wayner0628 <[email protected]>
Signed-off-by: pmahindrakar-oss <[email protected]>
  • Loading branch information
wayner0628 authored and pmahindrakar-oss committed Sep 9, 2024
1 parent e9a4fa9 commit 82490e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions flytectl/cmd/create/execution_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion flytectl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 82490e4

Please sign in to comment.