diff --git a/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go b/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go index e477be798f5..0a5d20005c3 100644 --- a/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/core/execution.pb.go @@ -407,10 +407,6 @@ func (m *ExecutionError) GetMessage() string { return "" } -func (m *ExecutionError) ClearMessage() { - m.Message = "" -} - func (m *ExecutionError) GetErrorUri() string { if m != nil { return m.ErrorUri diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go index ae8fa505c8c..b3d744bd77e 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go @@ -369,7 +369,6 @@ type ExecutableNodeStatus interface { GetOutputDir() DataReference GetMessage() string GetExecutionError() *core.ExecutionError - PopExecutionError() *core.ExecutionError GetAttempts() uint32 GetSystemFailures() uint32 GetWorkflowNodeStatus() ExecutableWorkflowNodeStatus diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go index 952e05103eb..cb447e06fc6 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNodeStatus.go @@ -1157,40 +1157,6 @@ func (_m *ExecutableNodeStatus) IsDirty() bool { return r0 } -type ExecutableNodeStatus_PopExecutionError struct { - *mock.Call -} - -func (_m ExecutableNodeStatus_PopExecutionError) Return(_a0 *core.ExecutionError) *ExecutableNodeStatus_PopExecutionError { - return &ExecutableNodeStatus_PopExecutionError{Call: _m.Call.Return(_a0)} -} - -func (_m *ExecutableNodeStatus) OnPopExecutionError() *ExecutableNodeStatus_PopExecutionError { - c_call := _m.On("PopExecutionError") - return &ExecutableNodeStatus_PopExecutionError{Call: c_call} -} - -func (_m *ExecutableNodeStatus) OnPopExecutionErrorMatch(matchers ...interface{}) *ExecutableNodeStatus_PopExecutionError { - c_call := _m.On("PopExecutionError", matchers...) - return &ExecutableNodeStatus_PopExecutionError{Call: c_call} -} - -// PopExecutionError provides a mock function with given fields: -func (_m *ExecutableNodeStatus) PopExecutionError() *core.ExecutionError { - ret := _m.Called() - - var r0 *core.ExecutionError - if rf, ok := ret.Get(0).(func() *core.ExecutionError); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*core.ExecutionError) - } - } - - return r0 -} - // ResetDirty provides a mock function with given fields: func (_m *ExecutableNodeStatus) ResetDirty() { _m.Called() diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go index ffb95e9e800..a889846383b 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go @@ -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 } diff --git a/flytepropeller/pkg/controller/nodes/executor.go b/flytepropeller/pkg/controller/nodes/executor.go index 638dee38f44..fef0f79a9f5 100644 --- a/flytepropeller/pkg/controller/nodes/executor.go +++ b/flytepropeller/pkg/controller/nodes/executor.go @@ -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.") diff --git a/flytepropeller/pkg/controller/nodes/executor_test.go b/flytepropeller/pkg/controller/nodes/executor_test.go index 316b66e01d6..222e0a05d50 100644 --- a/flytepropeller/pkg/controller/nodes/executor_test.go +++ b/flytepropeller/pkg/controller/nodes/executor_test.go @@ -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) @@ -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},