Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
Signed-off-by: shuangkun <tsk2013uestc@163.com>
  • Loading branch information
shuangkun committed Mar 29, 2024
1 parent 03ba127 commit ca25e6a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 60 deletions.
3 changes: 2 additions & 1 deletion test/e2e/argo_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,7 @@ func (s *ArgoServerSuite) TestRetryWorkflowWithContinueOn() {
Then().
ExpectWorkflow(func(t *testing.T, metadata *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
workflowName = metadata.Name
assert.Equal(t, 6, len(status.Nodes))
})

s.Run("Retry", func() {
Expand All @@ -1603,7 +1604,7 @@ func (s *ArgoServerSuite) TestRetryWorkflowWithContinueOn() {
assert.Equal(t, 6, len(status.Nodes))
}).
ExpectWorkflowNode(func(status wfv1.NodeStatus) bool {
return strings.Contains(status.Name, "dag-to-retry.success")
return strings.Contains(status.Name, "retry-workflow-with-continueon.success")
}, func(t *testing.T, status *wfv1.NodeStatus, pod *corev1.Pod) {
assert.Equal(t, 2, len(status.Children))
})
Expand Down
44 changes: 19 additions & 25 deletions test/e2e/testdata/retry-workflow-with-continueon.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,55 @@
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: "dag-to-retry"
name: retry-workflow-with-continueon
spec:
podMetadata:
annotations:
sidecar.istio.io/inject: "false"
entrypoint: dag
templates:
- name: step
inputs:
parameters:
- name: exitCode
container:
image: alpine:3.7
command: [ sh, "-c", "exit {{inputs.parameters.exitCode}}" ]
- name: dag
dag:
failFast: false
tasks:
- name: success
template: step
template: node-to-exit
arguments:
parameters:
- name: exitCode
value: 0
- name: failure
template: step
dependencies:
- success
template: node-to-exit
dependencies: [success]
arguments:
parameters:
- name: exitCode
value: 1
- name: task-after-failure
template: step
dependencies:
- failure
template: node-to-exit
dependencies: [failure]
arguments:
parameters:
- name: exitCode
value: 0
- name: continue
template: step
template: node-to-exit
continueOn:
failed: true
dependencies:
- success
dependencies: [success]
arguments:
parameters:
- name: exitCode
value: 2
- name: task-after-continue
template: step
dependencies:
- continue
template: node-to-exit
dependencies: [continue]
arguments:
parameters:
- name: exitCode
value: 0
value: 0

- name: node-to-exit
inputs:
parameters:
- name: exitCode
container:
image: alpine:3.7
command: [ sh, "-c", "exit {{inputs.parameters.exitCode}}" ]
36 changes: 2 additions & 34 deletions workflow/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2129,21 +2129,8 @@ status:
artifactGCStatus:
notSpecified: true
artifactRepositoryRef:
artifactRepository:
archiveLogs: true
s3:
accessKeySecret:
key: accesskey
name: my-minio-cred
bucket: my-bucket
endpoint: minio:9000
insecure: true
secretKeySecret:
key: secretkey
name: my-minio-cred
configMap: artifact-repositories
key: default-v1
namespace: argo
artifactRepository: {}
default: true
conditions:
- status: "False"
type: PodRunning
Expand Down Expand Up @@ -2185,10 +2172,6 @@ status:
message: Error (exit code 1)
name: dag-to-retry-tb7r7.failure
outputs:
artifacts:
- name: main-logs
s3:
key: dag-to-retry-tb7r7/dag-to-retry-tb7r7-step-1325528633/main.log
exitCode: "1"
phase: Failed
progress: 0/1
Expand All @@ -2214,10 +2197,6 @@ status:
message: Error (exit code 2)
name: dag-to-retry-tb7r7.continue
outputs:
artifacts:
- name: main-logs
s3:
key: dag-to-retry-tb7r7/dag-to-retry-tb7r7-step-1670055836/main.log
exitCode: "2"
phase: Failed
progress: 0/1
Expand All @@ -2243,10 +2222,6 @@ status:
value: "0"
name: dag-to-retry-tb7r7.success
outputs:
artifacts:
- name: main-logs
s3:
key: dag-to-retry-tb7r7/dag-to-retry-tb7r7-step-1819567448/main.log
exitCode: "0"
phase: Succeeded
progress: 1/1
Expand All @@ -2269,10 +2244,6 @@ status:
value: "0"
name: dag-to-retry-tb7r7.task-after-continue
outputs:
artifacts:
- name: main-logs
s3:
key: dag-to-retry-tb7r7/dag-to-retry-tb7r7-step-1987291523/main.log
exitCode: "0"
phase: Succeeded
progress: 1/1
Expand Down Expand Up @@ -2370,9 +2341,6 @@ status:
activeDeadlineSeconds: 300
arguments: {}
entrypoint: dag
podMetadata:
annotations:
sidecar.istio.io/inject: "false"
podSpecPatch: |
terminationGracePeriodSeconds: 3
templates:
Expand Down

0 comments on commit ca25e6a

Please sign in to comment.