diff --git a/flytepropeller/pkg/controller/nodes/resolve.go b/flytepropeller/pkg/controller/nodes/resolve.go index 2cb7aef5c2..9e11f3bd72 100644 --- a/flytepropeller/pkg/controller/nodes/resolve.go +++ b/flytepropeller/pkg/controller/nodes/resolve.go @@ -117,7 +117,7 @@ func ResolveOnFailureNodeInput(ctx context.Context, nodeInputs *core.LiteralMap, Scalar: &core.Scalar{ Value: &core.Scalar_Error{ Error: &core.Error{ - Message: execErr.GetMessage(), + Message: execErr.GetMessage(), FailedNodeId: nodeID, }, }, @@ -135,9 +135,9 @@ func ResolveOnFailureNodeInput(ctx context.Context, nodeInputs *core.LiteralMap, }, } literal.Value = &core.Literal_Scalar{ - Scalar: &core.Scalar{ + Scalar: &core.Scalar{ Value: errorUnion, }, - } + } } } diff --git a/flytepropeller/pkg/controller/nodes/resolve_test.go b/flytepropeller/pkg/controller/nodes/resolve_test.go index ff7af5278e..5b2733311b 100644 --- a/flytepropeller/pkg/controller/nodes/resolve_test.go +++ b/flytepropeller/pkg/controller/nodes/resolve_test.go @@ -500,29 +500,29 @@ func TestResolveErrorInput(t *testing.T) { Message: "node failure", } expectedLiterals := make(map[string]*core.Literal, 1) - errorLiteral, _ := coreutils.MakeLiteral(&core.Error{Message: execErr.Message, FailedNodeId: nID,}) - expectedLiterals["err"] = &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Union{ - Union: &core.Union{ - Value: errorLiteral, - Type: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_ERROR, - }, - Structure: &core.TypeStructure{ - Tag: "FlyteError", - }, + errorLiteral, _ := coreutils.MakeLiteral(&core.Error{Message: execErr.Message, FailedNodeId: nID}) + expectedLiterals["err"] = &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Union{ + Union: &core.Union{ + Value: errorLiteral, + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_ERROR, + }, + Structure: &core.TypeStructure{ + Tag: "FlyteError", }, }, }, }, }, - } - expectedLiteralMap := &core.LiteralMap{ - Literals: expectedLiterals, - } + }, + } + expectedLiteralMap := &core.LiteralMap{ + Literals: expectedLiterals, + } // Execute resolve ResolveOnFailureNodeInput(ctx, inputLiteralMap, nID, execErr) flyteassert.EqualLiteralMap(t, expectedLiteralMap, inputLiteralMap)