Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Nov 16, 2023
1 parent f9f313b commit a364764
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 50 deletions.
4 changes: 0 additions & 4 deletions flyteidl/gen/pb-go/flyteidl/core/execution.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ type ExecutableNodeStatus interface {
GetOutputDir() DataReference
GetMessage() string
GetExecutionError() *core.ExecutionError
PopExecutionError() *core.ExecutionError
GetAttempts() uint32
GetSystemFailures() uint32
GetWorkflowNodeStatus() ExecutableWorkflowNodeStatus
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,6 @@ func (in *NodeStatus) ClearArrayNodeStatus() {
in.SetDirty()
}

func (in *NodeStatus) PopExecutionError() *core.ExecutionError {
executionError := in.GetExecutionError()
in.Error = nil
return executionError
}

func (in *NodeStatus) GetLastUpdatedAt() *metav1.Time {
return in.LastUpdatedAt
}
Expand Down
1 change: 1 addition & 0 deletions flytepropeller/pkg/controller/nodes/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func (c *recursiveNodeExecutor) RecursiveNodeHandler(ctx context.Context, execCo
if err != nil {
return interfaces.NodeStatusUndefined, err
}

return interfaces.NodeStatusFailed(nodeStatus.GetExecutionError()), nil
} else if nodePhase == v1alpha1.NodePhaseTimedOut {
logger.Debugf(currentNodeCtx, "Node has timed out, traversing downstream.")
Expand Down
5 changes: 0 additions & 5 deletions flytepropeller/pkg/controller/nodes/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ func TestNodeExecutor_RecursiveNodeHandler_Recurse(t *testing.T) {
mockN0Status.OnGetPhase().Return(n0Phase)
mockN0Status.OnGetAttempts().Return(uint32(0))
mockN0Status.OnGetExecutionError().Return(nil)
mockN0Status.OnPopExecutionError().Return(&core.ExecutionError{Code: "code", Message: "message"})

mockN0Status.OnIsDirty().Return(false)
mockN0Status.OnGetParentTaskID().Return(nil)
Expand Down Expand Up @@ -737,10 +736,6 @@ func TestNodeExecutor_RecursiveNodeHandler_Recurse(t *testing.T) {
return handler.UnknownTransition, fmt.Errorf("error")
}, false, false, false, core.NodeExecution_FAILED},

{"failing->failed", v1alpha1.NodePhaseFailed, v1alpha1.NodePhaseFailed, interfaces.NodePhaseFailed, func() (handler.Transition, error) {
return handler.UnknownTransition, fmt.Errorf("error")
}, false, false, false, core.NodeExecution_FAILED},

{"failing->failed(error)", v1alpha1.NodePhaseFailing, v1alpha1.NodePhaseFailing, interfaces.NodePhaseUndefined, func() (handler.Transition, error) {
return handler.UnknownTransition, fmt.Errorf("error")
}, true, true, false, core.NodeExecution_FAILING},
Expand Down

0 comments on commit a364764

Please sign in to comment.