Repository: argoproj/argo (go)

Issue:
DOCKER_BUILD_OPTS does not work as intended
https://github.com/argoproj/argo/blob/af9f61ea7ce53f629a284a44f0106b9ed73f24e2/Makefile#L16

When running `make build` in a release branch, `--no-cache` is not added for some reason.


Pull request:
fix: Naming error in Makefile
Fixes #2770

Typo in variable declaration

Patch:
diff --git a/Makefile b/Makefile
index 87e86c929..fb267df9a 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ GIT_TREE_STATE         = $(shell if [ -z "`git status --porcelain`" ]; then echo
 export DOCKER_BUILDKIT = 1
 
 # To allow you to build with cache for debugging purposes.
-DOCKER_BUILDS_OPTS     := --no-cache
+DOCKER_BUILD_OPTS     := --no-cache
 
 # docker image publishing options
 IMAGE_NAMESPACE       ?= argoproj
diff --git a/workflow/validate/validate.go b/workflow/validate/validate.go
index 492974806..15a4522e7 100644
--- a/workflow/validate/validate.go
+++ b/workflow/validate/validate.go
@@ -923,8 +923,13 @@ func (ctx *templateValidationCtx) validateBaseImageOutputs(tmpl *wfv1.Template)
 			}
 		}
 		for _, out := range tmpl.Outputs.Parameters {
-			if out.ValueFrom != nil && common.FindOverlappingVolume(tmpl, out.ValueFrom.Path) == nil {
-				return errors.Errorf(errors.CodeBadRequest, "templates.%s.outputs.parameters.%s: %s", tmpl.Name, out.Name, errMsg)
+			if out.ValueFrom == nil {
+				continue
+			}
+			if out.ValueFrom.Path != "" {
+				if common.FindOverlappingVolume(tmpl, out.ValueFrom.Path) == nil {
+					return errors.Errorf(errors.CodeBadRequest, "templates.%s.outputs.parameters.%s: %s", tmpl.Name, out.Name, errMsg)
+				}
 			}
 		}
 	}


Test patch:
diff --git a/workflow/validate/validate_test.go b/workflow/validate/validate_test.go
index 87d6a2787..ec5a552de 100644
--- a/workflow/validate/validate_test.go
+++ b/workflow/validate/validate_test.go
@@ -1496,6 +1496,41 @@ spec:
         path: /mnt
 `
 
+var nonPathOutputParameter = `
+apiVersion: argoproj.io/v1alpha1
+kind: Workflow
+metadata:
+  generateName: non-path-out-param-
+spec:
+  entrypoint: non-path-out-param
+  templates:
+  - name: non-path-out-param
+    steps:
+    - - name: non-path-resource-out-param
+        template: non-path-resource-out-param
+    outputs:
+      parameters:
+      - name: param
+        valueFrom:
+          parameter: "{{steps.non-path-resource-out-param.outputs.parameters.json}}"
+  - name: non-path-resource-out-param
+    resource:
+      action: create
+      manifest: |
+        apiVersion: v1
+        kind: ConfigMap
+        metadata:
+          name: whalesay-cm
+    outputs:
+      parameters:
+      - name: json
+        valueFrom:
+          jsonPath: '{.metadata.name}'
+      - name: jqfliter
+        valueFrom:
+          jqFilter: .
+`
+
 // TestBaseImageOutputVerify verifies we error when we detect the condition when the container
 // runtime executor doesn't support output artifacts from a base image layer, and fails validation
 func TestBaseImageOutputVerify(t *testing.T) {
@@ -1503,6 +1538,7 @@ func TestBaseImageOutputVerify(t *testing.T) {
 	wfBaseOutParam := unmarshalWf(baseImageOutputParameter)
 	wfEmptyDirOutArt := unmarshalWf(volumeMountOutputArtifact)
 	wfBaseWithEmptyDirOutArt := unmarshalWf(baseImageDirWithEmptyDirOutputArtifact)
+	wfNonPathOutputParam := unmarshalWf(nonPathOutputParameter)
 	var err error
 
 	for _, executor := range []string{common.ContainerRuntimeExecutorK8sAPI, common.ContainerRuntimeExecutorKubelet, common.ContainerRuntimeExecutorPNS, common.ContainerRuntimeExecutorDocker, ""} {
@@ -1514,6 +1550,8 @@ func TestBaseImageOutputVerify(t *testing.T) {
 			assert.Error(t, err)
 			_, err = ValidateWorkflow(wftmplGetter, cwftmplGetter, wfBaseWithEmptyDirOutArt, ValidateOpts{ContainerRuntimeExecutor: executor})
 			assert.Error(t, err)
+			_, err = ValidateWorkflow(wftmplGetter, cwftmplGetter, wfNonPathOutputParam, ValidateOpts{ContainerRuntimeExecutor: executor})
+			assert.NoError(t, err)
 		case common.ContainerRuntimeExecutorPNS:
 			_, err = ValidateWorkflow(wftmplGetter, cwftmplGetter, wfBaseOutArt, ValidateOpts{ContainerRuntimeExecutor: executor})
 			assert.NoError(t, err)