Skip to content

Commit

Permalink
Fix outbound node metadata with retry nodes causing disconnected node…
Browse files Browse the repository at this point in the history
…s to be rendered in UI (issue #880)
  • Loading branch information
jessesuen committed Aug 4, 2018
1 parent c6ce48d commit 9168c59
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
* Update argo-cluster-role to work with OpenShift
- Fix issue where retryStrategy with DAGs fails, even if the step passes after retries (issue #885)
- Redundant verifyResolvedVariables check in controller precluded the ability to use {{ }} in other circumstances
- Fix issue where retryStrategy with DAGs fails, even if the step passes after retries (issue #885)
- Fix outbound node metadata with steps templates causing incorrect edges to be rendered in UI
- Fix outbound node metadata with retry nodes causing disconnected nodes to be rendered in UI (issue #880)

## 2.1.1 (2018-05-29)

Expand Down
50 changes: 50 additions & 0 deletions test/e2e/ui/ui-dag-retries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Visual UI test workflow which resulted orphaned children in UI (issue #880)
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: ui-dag-retries-
spec:
entrypoint: diamond
templates:
- name: echo
inputs:
parameters:
- name: message
container:
image: alpine:3.7
command: [echo, "{{inputs.parameters.message}}"]
retryStrategy:
limit: 1
- name: echo-thrice
inputs:
parameters:
- name: message
steps:
- - name: echo
template: echo
arguments:
parameters:
- {name: message, value: "{{inputs.parameters.message}}{{item}}"}
withItems: [1,2,3]
- name: diamond
dag:
tasks:
- name: A
template: echo-thrice
arguments:
parameters: [{name: message, value: A}]
- name: B
dependencies: [A]
template: echo-thrice
arguments:
parameters: [{name: message, value: B}]
- name: C
dependencies: [A]
template: echo-thrice
arguments:
parameters: [{name: message, value: C}]
- name: D
dependencies: [B, C]
template: echo-thrice
arguments:
parameters: [{name: message, value: D}]
File renamed without changes.
5 changes: 5 additions & 0 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,11 @@ func (woc *wfOperationCtx) getOutboundNodes(nodeID string) []string {
switch node.Type {
case wfv1.NodeTypePod, wfv1.NodeTypeSkipped, wfv1.NodeTypeSuspend:
return []string{node.ID}
case wfv1.NodeTypeRetry:
numChildren := len(node.Children)
if numChildren > 0 {
return []string{node.Children[numChildren-1]}
}
}
outbound := make([]string, 0)
for _, outboundNodeID := range node.OutboundNodes {
Expand Down

0 comments on commit 9168c59

Please sign in to comment.