From fb870fc2a08dd39f5c81d4e8c7ee508b4b8ae0b9 Mon Sep 17 00:00:00 2001 From: Isitha Subasinghe Date: Tue, 1 Aug 2023 13:27:52 +1000 Subject: [PATCH] revert this --- cmd/workflow-controller/main.go | 1 + workflow/controller/hooks.go | 1 + workflow/controller/operator.go | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/workflow-controller/main.go b/cmd/workflow-controller/main.go index f9abfea003301..b73fefa4ff4d6 100644 --- a/cmd/workflow-controller/main.go +++ b/cmd/workflow-controller/main.go @@ -219,6 +219,7 @@ func initConfig() { } func main() { + log.SetReportCaller(true) if err := NewRootCommand().Execute(); err != nil { fmt.Println(err) os.Exit(1) diff --git a/workflow/controller/hooks.go b/workflow/controller/hooks.go index a296110b5de54..0a851036460ac 100644 --- a/workflow/controller/hooks.go +++ b/workflow/controller/hooks.go @@ -13,6 +13,7 @@ import ( ) func (woc *wfOperationCtx) executeWfLifeCycleHook(ctx context.Context, tmplCtx *templateresolution.Context) (bool, error) { + woc.log.Infof("DEBUG- executeWFLifeCycleHook") var hookNodes []*wfv1.NodeStatus for hookName, hook := range woc.execWf.Spec.Hooks { //exit hook will be executed in runOnExitNode diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index 7c242c8ec118d..802ff69ab2665 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -401,7 +401,7 @@ func (woc *wfOperationCtx) operate(ctx context.Context) { } // This strconv.Quote is necessary so that the escaped quotes are not removed during parameter substitution woc.globalParams[common.GlobalVarWorkflowFailures] = strconv.Quote(string(failedNodeBytes)) - + woc.log.Infof("Calling executeWfLifeCycleHook") hookCompleted, err := woc.executeWfLifeCycleHook(ctx, tmplCtx) if err != nil { woc.markNodeError(node.Name, err) @@ -1757,7 +1757,7 @@ type executeTemplateOpts struct { // nodeName is the name to be used as the name of the node, and boundaryID indicates which template // boundary this node belongs to. func (woc *wfOperationCtx) executeTemplate(ctx context.Context, nodeName string, orgTmpl wfv1.TemplateReferenceHolder, tmplCtx *templateresolution.Context, args wfv1.Arguments, opts *executeTemplateOpts) (*wfv1.NodeStatus, error) { - woc.log.Debugf("Evaluating node %s: template: %s, boundaryID: %s", nodeName, common.GetTemplateHolderString(orgTmpl), opts.boundaryID) + woc.log.Infof("Evaluating node %s: template: %s, boundaryID: %s", nodeName, common.GetTemplateHolderString(orgTmpl), opts.boundaryID) // Set templateScope from which the template resolution starts. templateScope := tmplCtx.GetTemplateScope()