From bb579138c6104baab70f859e8ed05954718c5ee8 Mon Sep 17 00:00:00 2001 From: Saravanan Balasubramanian <33908564+sarabala1979@users.noreply.github.com> Date: Thu, 3 Oct 2019 17:40:42 -0700 Subject: [PATCH] Fix regression where global outputs were unresolveable in DAGs (#1640) --- workflow/validate/validate.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflow/validate/validate.go b/workflow/validate/validate.go index fde4512b032a..d2010f6b45ae 100644 --- a/workflow/validate/validate.go +++ b/workflow/validate/validate.go @@ -874,6 +874,8 @@ func (ctx *templateValidationCtx) validateDAG(scope map[string]interface{}, tmpl // Verify dependencies for all tasks can be resolved as well as template names for _, task := range tmpl.DAG.Tasks { resolvedTmpl, err := ctx.validateTemplateHolder(&task, tmplCtx, &FakeArguments{}, map[string]interface{}{}) + prefix := fmt.Sprintf("tasks.%s", task.Name) + ctx.addOutputsToScope(resolvedTmpl, prefix, scope, false) if err != nil { return errors.Errorf(errors.CodeBadRequest, "templates.%s.tasks.%s %s", tmpl.Name, task.Name, err.Error()) }