Skip to content

Commit 61f3fd4

Browse files
authored
refactor: use templateScope var instead of repeatedly retrieving it from function (argoproj#13345)
Signed-off-by: qingfeng777 <251098199@qq.com>
1 parent 8604148 commit 61f3fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workflow/controller/operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ func (woc *wfOperationCtx) executeTemplate(ctx context.Context, nodeName string,
18911891
defer func() { woc.currentStackDepth-- }()
18921892

18931893
if woc.currentStackDepth >= woc.controller.maxStackDepth && os.Getenv("DISABLE_MAX_RECURSION") != "true" {
1894-
return woc.initializeNodeOrMarkError(node, nodeName, tmplCtx.GetTemplateScope(), orgTmpl, opts.boundaryID, opts.nodeFlag, ErrMaxDepthExceeded), ErrMaxDepthExceeded
1894+
return woc.initializeNodeOrMarkError(node, nodeName, templateScope, orgTmpl, opts.boundaryID, opts.nodeFlag, ErrMaxDepthExceeded), ErrMaxDepthExceeded
18951895
}
18961896

18971897
newTmplCtx, resolvedTmpl, templateStored, err := tmplCtx.ResolveTemplate(orgTmpl)

0 commit comments

Comments
 (0)