Repository: argoproj/argo (go)

Issue:
Cron Backfill example doesn't work
## Summary

I was trying a functionality that is required for our use case: cron backfill. I took the examples from this page : https://argoproj.github.io/argo/cron-backfill/, but unfortunately it doesn't work. 

Here is the complete file
```
# This is an example of back-filling day for a daily cron workflow.
# See ../docs/cron-backfill.md
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: job
spec:
  arguments:
    parameters:
      - name: date
  templates:
    - name: main
      inputs:
        parameters:
          - name: date
            value: "{{inputs.parameters.date}}"
            # use "yesterday" is a magic value to tell the script it needs to determine the day to run
            default: yesterday
      script:
        image: docker/whalesay:latest
        command:
          - sh
        source: |
          date="{{inputs.parameters.date}}"
          if [ $date = yesterday ]; then
            date=$(date -d yesterday +%Y-%m-%d)
          fi
          echo "run for $date"
---
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
  name: daily-job
spec:
  # run daily at 2am
  schedule: "0 2 * * *"
  workflowSpec:
    workflowTemplateRef:
      name: job
---
# This version will create jobs as fast as it can - not waiting for
# each to complete. Use this when you really need each workflow separate.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: backfill-v1
spec:
  entrypoint: main
  # the backfill must use a service account which can create workflows
  # you should not - despite this example - use "argo-server"
  serviceAccountName: argo-server
  templates:
    - name: main
      steps:
        - - name: day
            template: create-job
            arguments:
              parameters:
                - name: date
                  value: "{{item}}"
            withSequence:
              # run for the 19th to the 21st
              start: "19"
              end: "21"
              format: "2020-05-%02X"
    - # this template creates each workflow
      name: create-job
      inputs:
        parameters:
          - name: date
      resource:
        action: apply
        manifest: |
          apiVersion: argoproj.io/v1alpha1
          kind: Workflow
          metadata:
            # using a name based on the date prevents re-creating resources,
            # making this more robust
            name: job-{{inputs.parameters.date}}
          spec:
            entrypoint: main
            templates:
              - name: main
                steps:
                  - - name: start-job
                      arguments:
                        parameters:
                          - name: date
                            value: "{{inputs.parameters.date}}"
                      templateRef:
                        name: job
                        template: main
---
# This version creates each job as part of the workflow, and limits concurrent jobs using
# `spec.parallelism`
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: backfill-v2
spec:
  entrypoint: main
  # limit to one job at a time
  parallelism: 1
  templates:
    - name: main
      steps:
        - - name: create-job
            templateRef:
              name: job
              template: main
            arguments:
              parameters:
                - name: date
                  value: "{{item}}"
            withSequence:
              # run for the 19th to the 21st
              start: "19"
              end: "21"
              format: "2020-05-%02X"
```

When I try to submit the WorkflowTemplate, I get this error :
```spec.arguments.date.value is required```


When I try to submit the cron workflow, it throws the following error:
```Invalid CronWorkflow: metadata.namespace cannot be blank```
I then add a namespace to it, but I get the following error :
```cannot validate Workflow: spec.entrypoint is required```

I am a complete beginner, so I did not dive into the details but I think you should know examples in your doc doesn't work.

## Diagnostics

What version of Argo Workflows are you running?
```
argo: v2.10.0-rc7+267da53.dirty
  BuildDate: 2020-08-14T00:41:49Z
  GitCommit: 267da535b66ed1dab8bcc90410260b7cf4b80e2c
  GitTreeState: dirty
  GitTag: v2.10.0-rc7
  GoVersion: go1.13.4
  Compiler: gc
  Platform: linux/amd64
```
---
<!-- Issue Author: Don't delete this message to encourage other users to support your issue! -->
**Message from the maintainers**:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.


Pull request description:
fix(docs): Add Entrypoint Cron Backfill example  Fixes #3807
Checklist:

* [ ] Either (a) I've created an [enhancement proposal](https://github.com/argoproj/argo/issues/new/choose) and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
* [ ] The title of the PR is (a) [conventional](https://www.conventionalcommits.org/en/v1.0.0/), (b) states what changed, and (c) suffixes the related issues number. E.g. `"fix(controller): Updates such and such. Fixes #1234"`.  
* [ ] I've signed the CLA.
* [ ] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
* [ ] My builds are green. Try syncing with master if they are not. 
* [ ] My organization is added to [USERS.md](https://github.com/argoproj/argo/blob/master/USERS.md).
Fixes #3807 

Patch:
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 14bd0143d..e22b5bb54 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -56,6 +56,7 @@ jobs:
         env:
           GOPATH: /home/runner/go
           PROFILE: mysql
+          STATIC_FILES: false
         run: |
           echo '127.0.0.1 dex'      | sudo tee -a /etc/hosts
           echo '127.0.0.1 minio'    | sudo tee -a /etc/hosts
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index ea234e7e4..1d07d3ae9 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -32,16 +32,16 @@ jobs:
       - name: Build & Push Linux Docker Images
         env:
           DOCKERIO_ORG: ${{ secrets.DOCKERIO_ORG }}
+        # https://github.com/marketplace/actions/docker-buildx#build-and-push-to-dockerhub
         run: |
           tag=$(basename $GITHUB_REF)
           if [ $tag = "master" ]; then
             tag="latest"
           fi
-
           targets="workflow-controller argoexec argocli"
           for target in $targets; do
             docker buildx build \
-              --push \
+              --output "type=image,push=true" \
               --platform="linux/amd64,linux/arm64,linux/ppc64le,linux/s390x" \
               --target $target \
               --tag "${DOCKERIO_ORG}/${target}:${tag}-linux" .
diff --git a/.gitignore b/.gitignore
index 022d165ce..1b95c1db3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@ git-ask-pass.sh
 /pkg/apiclient/workflowtemplate/workflow-template.swagger.json
 /site/
 /node_modules/
+/.brew_home
diff --git a/Makefile b/Makefile
index 8a16d3fc7..6d8ed7963 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ CONTROLLER_IMAGE_FILE  := dist/controller-image.marker
 
 # perform static compilation
 STATIC_BUILD          ?= true
-CI                    ?= false
+STATIC_FILES          ?= true
 PROFILE               ?= minimal
 # whether or not to start the Argo Service in TLS mode
 SECURE                := false
@@ -51,7 +51,7 @@ AUTH_MODE             := hybrid
 ifeq ($(PROFILE),sso)
 AUTH_MODE             := sso
 endif
-ifeq ($(CI),true)
+ifeq ($(STATIC_FILES),false)
 AUTH_MODE             := client
 endif
 K3D                   := $(shell if [ "`which kubectl`" != '' ] && [ "`kubectl config current-context`" = "k3s-default" ]; then echo true; else echo false; fi)
@@ -66,7 +66,7 @@ ifeq ($(PROFILE),postgres)
 ALWAYS_OFFLOAD_NODE_STATUS := true
 endif
 
-ifeq ($(CI),true)
+ifeq ($(STATIC_FILES),false)
 TEST_OPTS := -coverprofile=coverage.out
 else
 TEST_OPTS :=
@@ -140,7 +140,7 @@ cli: dist/argo argo-server.crt argo-server.key
 ui/dist/node_modules.marker: ui/package.json ui/yarn.lock
 	# Get UI dependencies
 	@mkdir -p ui/node_modules
-ifeq ($(CI),false)
+ifeq ($(STATIC_FILES),true)
 	yarn --cwd ui install
 endif
 	@mkdir -p ui/dist
@@ -149,7 +149,7 @@ endif
 ui/dist/app/index.html: ui/dist/node_modules.marker $(UI_FILES)
 	# Build UI
 	@mkdir -p ui/dist/app
-ifeq ($(CI),false)
+ifeq ($(STATIC_FILES),true)
 	yarn --cwd ui build
 else
 	echo "Built without static files" > ui/dist/app/index.html
@@ -314,7 +314,7 @@ lint: server/static/files.go $(GOPATH)/bin/golangci-lint
 	# Lint Go files
 	golangci-lint run --fix --verbose --concurrency 4 --timeout 5m
 	# Lint UI files
-ifeq ($(CI),false)
+ifeq ($(STATIC_FILES),true)
 	yarn --cwd ui lint
 endif
 
diff --git a/docs/resource-duration.md b/docs/resource-duration.md
index 0351acdbf..f14926b12 100644
--- a/docs/resource-duration.md
+++ b/docs/resource-duration.md
@@ -20,7 +20,7 @@ Each indicator is divided by a common denominator depending on resource type.
 Each resource type has a denominator used to make large values smaller.
 
  * CPU: `1`
- * Memory: `100Mi`
+ * Memory: `1Gi`
  * Storage: `10Gi`
  * Ephemeral Storage: `10Gi`
  * All others: `1` 
diff --git a/examples/cron-backfill.yaml b/examples/cron-backfill.yaml
index 5f35e2115..681cc15f1 100644
--- a/examples/cron-backfill.yaml
+++ b/examples/cron-backfill.yaml
@@ -5,6 +5,7 @@ kind: WorkflowTemplate
 metadata:
   name: job
 spec:
+  entrypoint: main
   arguments:
     parameters:
       - name: date
diff --git a/ui/src/app/shared/components/inline-table/inline-table.scss b/ui/src/app/shared/components/inline-table/inline-table.scss
new file mode 100644
index 000000000..b0336fbdc
--- /dev/null
+++ b/ui/src/app/shared/components/inline-table/inline-table.scss
@@ -0,0 +1,21 @@
+@import 'node_modules/argo-ui/src/styles/config';
+
+.it {
+  padding: 1em 0;
+  &--row {
+    display: flex;
+  }
+
+  &--col {
+    line-height: 2em;
+  }
+
+  &--key {
+    display: flex;
+    align-items: center;
+    border-right: 1px solid $argo-color-gray-3;
+    min-width: 150px;
+    padding-right: 10px;
+    margin-right: 10px;
+  }
+}
diff --git a/ui/src/app/shared/components/inline-table/inline-table.tsx b/ui/src/app/shared/components/inline-table/inline-table.tsx
new file mode 100644
index 000000000..be075827d
--- /dev/null
+++ b/ui/src/app/shared/components/inline-table/inline-table.tsx
@@ -0,0 +1,29 @@
+import * as React from 'react';
+import {ReactChild} from 'react';
+require('./inline-table.scss');
+
+interface TableProps {
+    rows: Row[];
+}
+
+interface Row {
+    left: ReactChild;
+    right: ReactChild;
+}
+
+export class InlineTable extends React.Component<TableProps> {
+    public render() {
+        return (
+            <div className='it'>
+                {this.props.rows.map((row, i) => {
+                    return (
+                        <div key={i} className='it--row'>
+                            <div className='it--col it--key'>{row.left}</div>
+                            <div className='it--col'>{row.right}</div>
+                        </div>
+                    );
+                })}
+            </div>
+        );
+    }
+}
diff --git a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.scss b/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.scss
index feff08472..1d5d7c8ac 100644
--- a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.scss
+++ b/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.scss
@@ -86,25 +86,10 @@
   }
 
   &__resourcesDuration {
-    display: flex;
-    align-items: center;
-
-    $gutter: 2em;
-
-    &--label {
-      margin-left: 0.5em;
-    }
-
     &--value {
-      font-weight: 600; 
-    }
-
-    &--container {
-      padding-left: $gutter / 2; 
-      margin-left: $gutter / 2; 
-      border-left: 1px solid $argo-color-gray-3;
+      font-weight: 600;
+      margin-right: 0.5em;
     }
-
   }
 
   &__conditions {
diff --git a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx b/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx
index dc23aef7b..80bf48fe5 100644
--- a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx
+++ b/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx
@@ -1,6 +1,7 @@
 import * as React from 'react';
 import {Workflow} from '../../../../models';
 
+import {InlineTable} from '../../../shared/components/inline-table/inline-table';
 import {Loading} from '../../../shared/components/loading';
 import {ConditionsPanel} from '../../../shared/conditions-panel';
 import {formatDuration} from '../../../shared/duration';
@@ -55,23 +56,33 @@ export class WorkflowDrawer extends React.Component<WorkflowDrawerProps, Workflo
                 )}
                 {!wf.status.resourcesDuration ? null : (
                     <div className='workflow-drawer__section'>
-                        <div className='workflow-drawer__resourcesDuration'>
-                            <div className='workflow-drawer__title'>
-                                RESOURCES DURATION&nbsp;
-                                <a href='https://argoproj.github.io/argo/resource-duration/' target='_blank'>
-                                    <i className='fas fa-info-circle' />
-                                </a>
-                            </div>
-                            <div className='workflow-drawer__resourcesDuration--container'>
-                                <div>
-                                    <span className='workflow-drawer__resourcesDuration--value'>{formatDuration(wf.status.resourcesDuration.cpu, 1)}</span>
-                                    <span className='workflow-drawer__resourcesDuration--label'>(*1 CPU)</span>
-                                </div>
-                                <div>
-                                    <span className='workflow-drawer__resourcesDuration--value'>{formatDuration(wf.status.resourcesDuration.memory, 1)}</span>
-                                    <span className='workflow-drawer__resourcesDuration--label'>(*100Mi Memory)</span>
-                                </div>
-                            </div>
+                        <div>
+                            <InlineTable
+                                rows={[
+                                    {
+                                        left: (
+                                            <div className='workflow-drawer__title'>
+                                                RESOURCES DURATION&nbsp;
+                                                <a href='https://github.com/argoproj/argo/blob/master/docs/resource-duration.md' target='_blank'>
+                                                    <i className='fas fa-info-circle' />
+                                                </a>
+                                            </div>
+                                        ),
+                                        right: (
+                                            <div>
+                                                <div>
+                                                    <span className='workflow-drawer__resourcesDuration--value'>{formatDuration(wf.status.resourcesDuration.cpu, 1)}</span>
+                                                    <span>(*1 CPU)</span>
+                                                </div>
+                                                <div>
+                                                    <span className='workflow-drawer__resourcesDuration--value'>{formatDuration(wf.status.resourcesDuration.memory, 1)}</span>
+                                                    <span>(*100Mi Memory)</span>
+                                                </div>
+                                            </div>
+                                        )
+                                    }
+                                ]}
+                            />
                         </div>
                     </div>
                 )}
diff --git a/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx b/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx
index 831cd1713..6dd4ec357 100644
--- a/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx
+++ b/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx
@@ -3,6 +3,7 @@ import * as moment from 'moment';
 import * as React from 'react';
 
 import * as models from '../../../../models';
+import {InlineTable} from '../../../shared/components/inline-table/inline-table';
 import {Phase} from '../../../shared/components/phase';
 import {Timestamp} from '../../../shared/components/timestamp';
 import {ResourcesDuration} from '../../../shared/resources-duration';
@@ -64,6 +65,27 @@ export const WorkflowNodeSummary = (props: Props) => {
                     {now => <Duration durationMs={nodeDuration(props.node, now)} />}
                 </Ticker>
             )
+        },
+        {
+            title: 'MEMOIZATION',
+            value: (
+                <InlineTable
+                    rows={[
+                        {
+                            left: <div> KEY </div>,
+                            right: <div> {props.node.memoizationStatus.key} </div>
+                        },
+                        {
+                            left: <div> CACHE NAME </div>,
+                            right: <div> {props.node.memoizationStatus.cacheName} </div>
+                        },
+                        {
+                            left: <div> HIT? </div>,
+                            right: <div> {props.node.memoizationStatus.hit ? 'YES' : 'NO'} </div>
+                        }
+                    ]}
+                />
+            )
         }
     ];
     if (props.node.type === 'Pod') {
diff --git a/ui/src/models/workflows.ts b/ui/src/models/workflows.ts
index 2d1ba4ad6..663148d38 100644
--- a/ui/src/models/workflows.ts
+++ b/ui/src/models/workflows.ts
@@ -520,6 +520,11 @@ export interface NodeStatus {
      * HostNodeName name of the Kubernetes node on which the Pod is running, if applicable.
      */
     hostNodeName: string;
+
+    /**
+     * Memoization
+     */
+    memoizationStatus: MemoizationStatus;
 }
 
 export interface TemplateRef {
@@ -777,6 +782,25 @@ export interface WorkflowStep {
     templateRef?: TemplateRef;
 }
 
+/**
+ * MemoizationStatus holds information about a node with memoization enabled.
+ */
+
+export interface MemoizationStatus {
+    /**
+     * Hit is true if there was a previous cache entry and false otherwise
+     */
+    hit: boolean;
+    /**
+     * Key is the value used to query the cache for an entry
+     */
+    key: string;
+    /**
+     * Cache name stores the identifier of the cache used for this node
+     */
+    cacheName: string;
+}
+
 export type NodePhase = 'Pending' | 'Running' | 'Succeeded' | 'Skipped' | 'Failed' | 'Error' | 'Omitted';
 
 export const NODE_PHASE = {
diff --git a/workflow/controller/dag.go b/workflow/controller/dag.go
index 7e7a31e94..b627f4869 100644
--- a/workflow/controller/dag.go
+++ b/workflow/controller/dag.go
@@ -158,12 +158,9 @@ func (d *dagContext) assessDAGPhase(targetTasks []string, nodes wfv1.Nodes) wfv1
 			}
 		}
 
-		if node.Type == wfv1.NodeTypeRetry || node.Type == wfv1.NodeTypeTaskGroup {
+		if node.Type == wfv1.NodeTypeRetry {
 			// A fulfilled Retry node will always reflect the status of its last child node, so its individual attempts don't interest us.
 			// To resume the traversal, we look at the children of the last child node.
-			// A TaskGroup node will always reflect the status of its expanded tasks (mainly it will be Succeeded if and only if all of its
-			// expanded tasks have succeeded), so each individual expanded task doesn't interest us. To resume the traversal, we look at the
-			// children of its last child node (note that this is arbitrary, since all expanded tasks will have the same children).
 			if childNode := getChildNodeIndex(&node, nodes, -1); childNode != nil {
 				uniqueQueue.add(generatePhaseNodes(childNode.Children, branchPhase)...)
 			}


Test patch:
diff --git a/test/e2e/cli_test.go b/test/e2e/cli_test.go
index f017ee300..69fc4dbd6 100644
--- a/test/e2e/cli_test.go
+++ b/test/e2e/cli_test.go
@@ -998,6 +998,7 @@ func (s *CLIWithServerSuite) TestTemplateLevelSemaphore() {
 }
 
 func (s *CLISuite) TestRetryOmit() {
+	s.T().Skip("flaky - see https://github.com/argoproj/argo/issues/3540")
 	s.testNeedsOffloading()
 	s.Given().
 		Workflow("@testdata/retry-omit.yaml").
diff --git a/test/e2e/functional_test.go b/test/e2e/functional_test.go
index ef755dad4..4d10d81bf 100644
--- a/test/e2e/functional_test.go
+++ b/test/e2e/functional_test.go
@@ -438,6 +438,7 @@ func (s *FunctionalSuite) TestGlobalScope() {
 }
 
 func (s *FunctionalSuite) TestStopBehavior() {
+	s.T().Skip("flaky - see https://github.com/argoproj/argo/issues/2833")
 	s.Given().
 		Workflow("@functional/stop-terminate.yaml").
 		When().
diff --git a/workflow/controller/dag_test.go b/workflow/controller/dag_test.go
index c29c90d40..d7f9e9f2f 100644
--- a/workflow/controller/dag_test.go
+++ b/workflow/controller/dag_test.go
@@ -2030,3 +2030,827 @@ func TestDagTargetTaskOnExit(t *testing.T) {
 		assert.Equal(t, wfv1.NodePending, onExitNode.Phase)
 	}
 }
+
+var testEmptyWithParamDAG = `
+apiVersion: argoproj.io/v1alpha1
+kind: Workflow
+metadata:
+  name: dag-hang-pcwmr
+spec:
+  arguments: {}
+  entrypoint: dag
+  templates:
+  - arguments: {}
+    dag:
+      tasks:
+      - arguments: {}
+        name: scheduler
+        template: job-scheduler
+      - arguments:
+          parameters:
+          - name: job_name
+            value: '{{item.job_name}}'
+        dependencies:
+        - scheduler
+        name: children
+        template: whalesay
+        withParam: '{{tasks.scheduler.outputs.parameters.scheduled-jobs}}'
+      - arguments: {}
+        dependencies:
+        - children
+        name: postprocess
+        template: whalesay
+    inputs: {}
+    metadata: {}
+    name: dag
+    outputs: {}
+  - arguments: {}
+    container:
+      args:
+      - echo Decided not to schedule any jobs
+      command:
+      - sh
+      - -c
+      image: alpine:latest
+      name: ""
+      resources: {}
+    inputs: {}
+    metadata: {}
+    name: job-scheduler
+    outputs:
+      parameters:
+      - name: scheduled-jobs
+        value: '[]'
+  - arguments: {}
+    container:
+      args:
+      - hello world
+      command:
+      - cowsay
+      image: docker/whalesay
+      name: ""
+      resources: {}
+    inputs: {}
+    metadata: {}
+    name: whalesay
+    outputs: {}
+status:
+  finishedAt: null
+  nodes:
+    dag-hang-pcwmr:
+      children:
+      - dag-hang-pcwmr-1789179473
+      displayName: dag-hang-pcwmr
+      finishedAt: null
+      id: dag-hang-pcwmr
+      name: dag-hang-pcwmr
+      phase: Running
+      startedAt: "2020-08-11T18:19:28Z"
+      templateName: dag
+      templateScope: local/dag-hang-pcwmr
+      type: DAG
+    dag-hang-pcwmr-1415348083:
+      boundaryID: dag-hang-pcwmr
+      displayName: postprocess
+      finishedAt: "2020-08-11T18:19:40Z"
+      hostNodeName: dech117
+      id: dag-hang-pcwmr-1415348083
+      name: dag-hang-pcwmr.postprocess
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 3
+        memory: 3
+      startedAt: "2020-08-11T18:19:36Z"
+      templateName: whalesay
+      templateScope: local/dag-hang-pcwmr
+      type: Pod
+    dag-hang-pcwmr-1738428083:
+      boundaryID: dag-hang-pcwmr
+      children:
+      - dag-hang-pcwmr-1415348083
+      displayName: children
+      finishedAt: "2020-08-11T18:19:35Z"
+      id: dag-hang-pcwmr-1738428083
+      name: dag-hang-pcwmr.children
+      phase: Succeeded
+      startedAt: "2020-08-11T18:19:35Z"
+      templateName: whalesay
+      templateScope: local/dag-hang-pcwmr
+      type: TaskGroup
+    dag-hang-pcwmr-1789179473:
+      boundaryID: dag-hang-pcwmr
+      children:
+      - dag-hang-pcwmr-1738428083
+      displayName: scheduler
+      finishedAt: "2020-08-11T18:19:33Z"
+      hostNodeName: dech113
+      id: dag-hang-pcwmr-1789179473
+      name: dag-hang-pcwmr.scheduler
+      outputs:
+        exitCode: "0"
+        parameters:
+        - name: scheduled-jobs
+          value: '[]'
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 4
+        memory: 4
+      startedAt: "2020-08-11T18:19:28Z"
+      templateName: job-scheduler
+      templateScope: local/dag-hang-pcwmr
+      type: Pod
+  phase: Running
+  startedAt: "2020-08-11T18:19:28Z"
+`
+
+func TestEmptyWithParamDAG(t *testing.T) {
+	cancel, controller := newController()
+	defer cancel()
+	wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
+
+	wf := unmarshalWF(testEmptyWithParamDAG)
+	wf, err := wfcset.Create(wf)
+	assert.NoError(t, err)
+	woc := newWorkflowOperationCtx(wf, controller)
+
+	woc.operate()
+	assert.Equal(t, wfv1.NodeSucceeded, woc.wf.Status.Phase)
+}
+
+var testFailsWithParamDAG = `
+apiVersion: argoproj.io/v1alpha1
+kind: Workflow
+metadata:
+  name: reproduce-bug-9tpfr
+spec:
+  arguments: {}
+  entrypoint: start
+  serviceAccountName: argo-workflow
+  templates:
+  - arguments: {}
+    dag:
+      tasks:
+      - arguments: {}
+        name: gen-tasks
+        template: gen-tasks
+      - arguments:
+          parameters:
+          - name: chunk
+            value: '{{item}}'
+        dependencies:
+        - gen-tasks
+        name: process-tasks
+        template: process-tasks
+        withParam: '{{tasks.gen-tasks.outputs.result}}'
+      - arguments: {}
+        dependencies:
+        - process-tasks
+        name: finish
+        template: finish
+    inputs: {}
+    metadata: {}
+    name: start
+    outputs: {}
+  - activeDeadlineSeconds: 300
+    arguments: {}
+    inputs: {}
+    metadata: {}
+    name: gen-tasks
+    outputs: {}
+    retryStrategy:
+      backoff:
+        duration: 15s
+        factor: 2
+      limit: 5
+      retryPolicy: Always
+    script:
+      command:
+      - bash
+      image: python:3
+      name: ""
+      resources:
+        requests:
+          cpu: 250m
+      source: |
+        set -e
+        python3 -c 'import os, json; print(json.dumps([str(i) for i in range(10)]))'
+  - activeDeadlineSeconds: 1800
+    arguments: {}
+    inputs:
+      parameters:
+      - name: chunk
+    metadata: {}
+    name: process-tasks
+    outputs: {}
+    retryStrategy:
+      backoff:
+        duration: 15s
+        factor: 2
+      limit: 2
+      retryPolicy: Always
+    script:
+      command:
+      - bash
+      image: python:3
+      name: ""
+      resources:
+        requests:
+          cpu: 100m
+      source: |
+        set -e
+        chunk="{{inputs.parameters.chunk}}"
+        if [[ $chunk == "3" ]]; then
+          echo "failed"
+          exit 1
+        fi
+        echo "process $chunk"
+  - activeDeadlineSeconds: 300
+    arguments: {}
+    inputs: {}
+    metadata: {}
+    name: finish
+    outputs: {}
+    script:
+      command:
+      - sh
+      image: busybox
+      name: ""
+      resources:
+        requests:
+          cpu: 100m
+      source: |
+        echo fin
+status:
+  nodes:
+    reproduce-bug-9tpfr:
+      children:
+      - reproduce-bug-9tpfr-1525049382
+      displayName: reproduce-bug-9tpfr
+      finishedAt: "2020-08-14T03:49:42Z"
+      id: reproduce-bug-9tpfr
+      name: reproduce-bug-9tpfr
+      outboundNodes:
+      - reproduce-bug-9tpfr-247809182
+      phase: Running
+      startedAt: "2020-08-14T03:47:23Z"
+      templateName: start
+      templateScope: local/reproduce-bug-9tpfr
+      type: DAG
+    reproduce-bug-9tpfr-247809182:
+      boundaryID: reproduce-bug-9tpfr
+      displayName: finish
+      finishedAt: "2020-08-14T03:49:42Z"
+      id: reproduce-bug-9tpfr-247809182
+      message: 'omitted: depends condition not met'
+      name: reproduce-bug-9tpfr.finish
+      phase: Omitted
+      startedAt: "2020-08-14T03:49:42Z"
+      templateName: finish
+      templateScope: local/reproduce-bug-9tpfr
+      type: Skipped
+    reproduce-bug-9tpfr-546685502:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-3207714925
+      displayName: process-tasks(6:6)
+      finishedAt: "2020-08-14T03:47:37Z"
+      id: reproduce-bug-9tpfr-546685502
+      inputs:
+        parameters:
+        - name: chunk
+          value: "6"
+      name: reproduce-bug-9tpfr.process-tasks(6:6)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-585646929:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(7:7)(0)
+      finishedAt: "2020-08-14T03:47:33Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-c3910e16-nb0l
+      id: reproduce-bug-9tpfr-585646929
+      inputs:
+        parameters:
+        - name: chunk
+          value: "7"
+      name: reproduce-bug-9tpfr.process-tasks(7:7)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 1
+        memory: 1
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-600389385:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(5:5)(0)
+      finishedAt: "2020-08-14T03:47:33Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-c3910e16-nb0l
+      id: reproduce-bug-9tpfr-600389385
+      inputs:
+        parameters:
+        - name: chunk
+          value: "5"
+      name: reproduce-bug-9tpfr.process-tasks(5:5)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 1
+        memory: 1
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-850457006:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-3450100829
+      displayName: process-tasks(2:2)
+      finishedAt: "2020-08-14T03:47:36Z"
+      id: reproduce-bug-9tpfr-850457006
+      inputs:
+        parameters:
+        - name: chunk
+          value: "2"
+      name: reproduce-bug-9tpfr.process-tasks(2:2)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-988357889:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(1:1)(0)
+      finishedAt: "2020-08-14T03:47:34Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-3779d805-hkcv
+      id: reproduce-bug-9tpfr-988357889
+      inputs:
+        parameters:
+        - name: chunk
+          value: "1"
+      name: reproduce-bug-9tpfr.process-tasks(1:1)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 2
+        memory: 2
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-1384515437:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(8:8)(0)
+      finishedAt: "2020-08-14T03:47:42Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-2e8afe0d-km90
+      id: reproduce-bug-9tpfr-1384515437
+      inputs:
+        parameters:
+        - name: chunk
+          value: "8"
+      name: reproduce-bug-9tpfr.process-tasks(8:8)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 6
+        memory: 6
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-1525049382:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-3595395365
+      displayName: gen-tasks
+      finishedAt: "2020-08-14T03:47:29Z"
+      id: reproduce-bug-9tpfr-1525049382
+      name: reproduce-bug-9tpfr.gen-tasks
+      outputs:
+        exitCode: "0"
+        result: '["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]'
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:23Z"
+      templateName: gen-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-1602779214:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-3522592509
+      displayName: process-tasks(4:4)
+      finishedAt: "2020-08-14T03:47:45Z"
+      id: reproduce-bug-9tpfr-1602779214
+      inputs:
+        parameters:
+        - name: chunk
+          value: "4"
+      name: reproduce-bug-9tpfr.process-tasks(4:4)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-1670762753:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-2788826366
+      - reproduce-bug-9tpfr-3412607194
+      - reproduce-bug-9tpfr-850457006
+      - reproduce-bug-9tpfr-3505932898
+      - reproduce-bug-9tpfr-1602779214
+      - reproduce-bug-9tpfr-4143798034
+      - reproduce-bug-9tpfr-546685502
+      - reproduce-bug-9tpfr-3415721642
+      - reproduce-bug-9tpfr-3221614398
+      - reproduce-bug-9tpfr-3518128714
+      displayName: process-tasks
+      finishedAt: "2020-08-14T03:49:42Z"
+      id: reproduce-bug-9tpfr-1670762753
+      name: reproduce-bug-9tpfr.process-tasks
+      phase: Failed
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: TaskGroup
+    reproduce-bug-9tpfr-2008331609:
+      boundaryID: reproduce-bug-9tpfr
+      displayName: process-tasks(3:3)(0)
+      finishedAt: "2020-08-14T03:47:42Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-2e8afe0d-km90
+      id: reproduce-bug-9tpfr-2008331609
+      inputs:
+        parameters:
+        - name: chunk
+          value: "3"
+      message: failed with exit code 1
+      name: reproduce-bug-9tpfr.process-tasks(3:3)(0)
+      outputs:
+        exitCode: "1"
+      phase: Failed
+      resourcesDuration:
+        cpu: 6
+        memory: 6
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-2475724017:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(9:9)(0)
+      finishedAt: "2020-08-14T03:47:34Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-3779d805-hkcv
+      id: reproduce-bug-9tpfr-2475724017
+      inputs:
+        parameters:
+        - name: chunk
+          value: "9"
+      name: reproduce-bug-9tpfr.process-tasks(9:9)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 1
+        memory: 1
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-2612472988:
+      boundaryID: reproduce-bug-9tpfr
+      displayName: process-tasks(3:3)(1)
+      finishedAt: "2020-08-14T03:48:05Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-2e8afe0d-km90
+      id: reproduce-bug-9tpfr-2612472988
+      inputs:
+        parameters:
+        - name: chunk
+          value: "3"
+      message: failed with exit code 1
+      name: reproduce-bug-9tpfr.process-tasks(3:3)(1)
+      outputs:
+        exitCode: "1"
+      phase: Failed
+      resourcesDuration:
+        cpu: 2
+        memory: 2
+      startedAt: "2020-08-14T03:48:00Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-2788826366:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-3662458541
+      displayName: process-tasks(0:0)
+      finishedAt: "2020-08-14T03:47:44Z"
+      id: reproduce-bug-9tpfr-2788826366
+      inputs:
+        parameters:
+        - name: chunk
+          value: "0"
+      name: reproduce-bug-9tpfr.process-tasks(0:0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-3207714925:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(6:6)(0)
+      finishedAt: "2020-08-14T03:47:34Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-3779d805-hkcv
+      id: reproduce-bug-9tpfr-3207714925
+      inputs:
+        parameters:
+        - name: chunk
+          value: "6"
+      name: reproduce-bug-9tpfr.process-tasks(6:6)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 2
+        memory: 2
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-3221614398:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-1384515437
+      displayName: process-tasks(8:8)
+      finishedAt: "2020-08-14T03:47:44Z"
+      id: reproduce-bug-9tpfr-3221614398
+      inputs:
+        parameters:
+        - name: chunk
+          value: "8"
+      name: reproduce-bug-9tpfr.process-tasks(8:8)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-3412607194:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-988357889
+      displayName: process-tasks(1:1)
+      finishedAt: "2020-08-14T03:47:36Z"
+      id: reproduce-bug-9tpfr-3412607194
+      inputs:
+        parameters:
+        - name: chunk
+          value: "1"
+      name: reproduce-bug-9tpfr.process-tasks(1:1)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-3415721642:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-585646929
+      displayName: process-tasks(7:7)
+      finishedAt: "2020-08-14T03:47:36Z"
+      id: reproduce-bug-9tpfr-3415721642
+      inputs:
+        parameters:
+        - name: chunk
+          value: "7"
+      name: reproduce-bug-9tpfr.process-tasks(7:7)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-3450100829:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(2:2)(0)
+      finishedAt: "2020-08-14T03:47:33Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-3779d805-hkcv
+      id: reproduce-bug-9tpfr-3450100829
+      inputs:
+        parameters:
+        - name: chunk
+          value: "2"
+      name: reproduce-bug-9tpfr.process-tasks(2:2)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 1
+        memory: 1
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-3505932898:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-2008331609
+      - reproduce-bug-9tpfr-2612472988
+      - reproduce-bug-9tpfr-4222579959
+      displayName: process-tasks(3:3)
+      finishedAt: "2020-08-14T03:49:42Z"
+      id: reproduce-bug-9tpfr-3505932898
+      inputs:
+        parameters:
+        - name: chunk
+          value: "3"
+      message: No more retries left
+      name: reproduce-bug-9tpfr.process-tasks(3:3)
+      phase: Failed
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-3518128714:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-2475724017
+      displayName: process-tasks(9:9)
+      finishedAt: "2020-08-14T03:47:37Z"
+      id: reproduce-bug-9tpfr-3518128714
+      inputs:
+        parameters:
+        - name: chunk
+          value: "9"
+      name: reproduce-bug-9tpfr.process-tasks(9:9)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:30Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-3522592509:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(4:4)(0)
+      finishedAt: "2020-08-14T03:47:42Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-2e8afe0d-km90
+      id: reproduce-bug-9tpfr-3522592509
+      inputs:
+        parameters:
+        - name: chunk
+          value: "4"
+      name: reproduce-bug-9tpfr.process-tasks(4:4)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 6
+        memory: 6
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-3595395365:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-1670762753
+      displayName: gen-tasks(0)
+      finishedAt: "2020-08-14T03:47:26Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-3779d805-hkcv
+      id: reproduce-bug-9tpfr-3595395365
+      name: reproduce-bug-9tpfr.gen-tasks(0)
+      outputs:
+        exitCode: "0"
+        result: '["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]'
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 1
+        memory: 1
+      startedAt: "2020-08-14T03:47:23Z"
+      templateName: gen-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-3662458541:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(0:0)(0)
+      finishedAt: "2020-08-14T03:47:42Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-2e8afe0d-km90
+      id: reproduce-bug-9tpfr-3662458541
+      inputs:
+        parameters:
+        - name: chunk
+          value: "0"
+      name: reproduce-bug-9tpfr.process-tasks(0:0)(0)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      resourcesDuration:
+        cpu: 6
+        memory: 6
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+    reproduce-bug-9tpfr-4143798034:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-600389385
+      displayName: process-tasks(5:5)
+      finishedAt: "2020-08-14T03:47:36Z"
+      id: reproduce-bug-9tpfr-4143798034
+      inputs:
+        parameters:
+        - name: chunk
+          value: "5"
+      name: reproduce-bug-9tpfr.process-tasks(5:5)
+      outputs:
+        exitCode: "0"
+      phase: Succeeded
+      startedAt: "2020-08-14T03:47:29Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Retry
+    reproduce-bug-9tpfr-4222579959:
+      boundaryID: reproduce-bug-9tpfr
+      children:
+      - reproduce-bug-9tpfr-247809182
+      displayName: process-tasks(3:3)(2)
+      finishedAt: "2020-08-14T03:48:40Z"
+      hostNodeName: gke-dotdb3-dotdb-pool-3779d805-hkcv
+      id: reproduce-bug-9tpfr-4222579959
+      inputs:
+        parameters:
+        - name: chunk
+          value: "3"
+      message: failed with exit code 1
+      name: reproduce-bug-9tpfr.process-tasks(3:3)(2)
+      outputs:
+        exitCode: "1"
+      phase: Failed
+      resourcesDuration:
+        cpu: 1
+        memory: 1
+      startedAt: "2020-08-14T03:48:37Z"
+      templateName: process-tasks
+      templateScope: local/reproduce-bug-9tpfr
+      type: Pod
+  phase: Running
+  resourcesDuration:
+    cpu: 36
+    memory: 36
+  startedAt: "2020-08-14T03:47:23Z"
+`
+
+func TestFailsWithParamDAG(t *testing.T) {
+	cancel, controller := newController()
+	defer cancel()
+	wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
+
+	wf := unmarshalWF(testFailsWithParamDAG)
+	wf, err := wfcset.Create(wf)
+	assert.NoError(t, err)
+	woc := newWorkflowOperationCtx(wf, controller)
+
+	woc.operate()
+	assert.Equal(t, wfv1.NodeFailed, woc.wf.Status.Phase)
+}