-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure wftmplLifecycleHook wait for each dag task
Signed-off-by: toyamagu-2021 <toyamagu2021@gmail.com>
- Loading branch information
1 parent
a9dc033
commit 1a54ea4
Showing
5 changed files
with
123 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
workflow/controller/testdata/dag_wftmpl_hook_with_retry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# https://github.com/argoproj/argo-workflows/issues/12120 | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: dag-wftmpl-hook-with-retry | ||
namespace: argo | ||
spec: | ||
templates: | ||
- name: main | ||
dag: | ||
tasks: | ||
- name: task | ||
template: task | ||
hooks: | ||
failure: | ||
template: exit-handler | ||
expression: tasks["task"].status == "Failed" | ||
- name: finish | ||
template: finish | ||
dependencies: | ||
- task | ||
- name: task | ||
container: | ||
name: '' | ||
image: alpine:latest | ||
command: | ||
- sh | ||
- '-c' | ||
args: | ||
- exit 1; | ||
- name: exit-handler | ||
container: | ||
name: '' | ||
image: alpine:latest | ||
command: | ||
- sh | ||
- '-c' | ||
args: | ||
- exit 1; | ||
retryStrategy: | ||
limit: 1 | ||
retryPolicy: Always | ||
- name: finish | ||
container: | ||
name: '' | ||
image: alpine:latest | ||
command: | ||
- sh | ||
- '-c' | ||
args: | ||
- echo "Finished!"; | ||
entrypoint: main |