Skip to content

Commit

Permalink
fix linting issue
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Wu <[email protected]>
  • Loading branch information
popojk committed Jan 18, 2025
1 parent ca98e5b commit ab9dfd2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions flytepropeller/pkg/controller/nodes/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand All @@ -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,
},
}
}
}
}
36 changes: 18 additions & 18 deletions flytepropeller/pkg/controller/nodes/resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ab9dfd2

Please sign in to comment.