Skip to content

Commit

Permalink
Use the SecurityContext and Error wrappers
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Jun 8, 2024
1 parent c3abe42 commit c70d923
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flyteadmin/pkg/workflowengine/impl/prepare_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func addPermissions(securityCtx *core.SecurityContext, roleNameKey string, flyte
if securityCtx == nil || securityCtx.RunAs == nil {
return
}
flyteWf.SecurityContext = *securityCtx
flyteWf.SecurityContext = v1alpha1.SecurityContext{*securityCtx}
if len(securityCtx.RunAs.IamRole) > 0 {
if flyteWf.Annotations == nil {
flyteWf.Annotations = map[string]string{}
Expand Down
5 changes: 4 additions & 1 deletion flytepropeller/pkg/compiler/transformers/k8s/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ func buildBranchNodeSpec(branch *core.BranchNode, tasks []*core.CompiledTask, er
childNodes = append(childNodes, ns...)
res.Else = refStr(branch.IfElse.GetElseNode().Id)
case *core.IfElseBlock_Error:
res.ElseFail = branch.IfElse.GetError()
coreError := branch.IfElse.GetError()
res.ElseFail = &v1alpha1.Error{
coreError,
}
}

other := make([]*v1alpha1.IfBlock, 0, len(branch.IfElse.Other))
Expand Down

0 comments on commit c70d923

Please sign in to comment.