Skip to content

Commit

Permalink
update execution for state changes (flyteorg#267)
Browse files Browse the repository at this point in the history
Signed-off-by: Prafulla Mahindrakar <[email protected]>
  • Loading branch information
pmahindrakar-oss authored and austin362667 committed May 7, 2024
1 parent ab1371d commit 51e89db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions flytectl/cmd/update/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comm
return fmt.Errorf(clierrors.ErrInvalidStateUpdate)
}

var executionState admin.ExecutionStatus_ExecutionState
var executionState admin.ExecutionState
if activateExec {
executionState = admin.ExecutionStatus_EXECUTION_ACTIVE
executionState = admin.ExecutionState_EXECUTION_ACTIVE
} else if archiveExec {
executionState = admin.ExecutionStatus_EXECUTION_ARCHIVED
executionState = admin.ExecutionState_EXECUTION_ARCHIVED
}

if execution.UConfig.DryRun {
Expand All @@ -60,7 +60,7 @@ func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comm
Domain: domain,
Name: executionName,
},
Status: &admin.ExecutionStatus{State: executionState},
State: executionState,
})
if err != nil {
fmt.Printf(clierrors.ErrFailedExecutionUpdate, executionName, err)
Expand Down
4 changes: 1 addition & 3 deletions flytectl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/docker/docker v20.10.7+incompatible
github.com/docker/go-connections v0.4.0
github.com/enescakir/emoji v1.0.0
github.com/flyteorg/flyteidl v0.21.14
github.com/flyteorg/flyteidl v0.21.24
github.com/flyteorg/flytestdlib v0.4.0
github.com/ghodss/yaml v1.0.0
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
Expand Down Expand Up @@ -55,5 +55,3 @@ require (
k8s.io/client-go v0.21.3
sigs.k8s.io/yaml v1.2.0
)

replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330
4 changes: 2 additions & 2 deletions flytectl/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330 h1:pHiSSq3bVs9bKTc2SVnd7oLLuEn4uyXmx54bZqGZJ5M=
github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U=
github.com/flyteorg/flyteidl v0.21.24 h1:e2wPBK4aiLE+fw2zmhUDNg39QoJk6Lf5lQRvj8XgtFk=
github.com/flyteorg/flyteidl v0.21.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U=
github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220=
github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60=
github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q=
Expand Down

0 comments on commit 51e89db

Please sign in to comment.