fix: check hooked nodes in executeWfLifeCycleHook and executeTmplLifeCycleHook (#11113, #11117) #11176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: [email protected] [email protected]
Fixes #11113
Fixes #11117
Motivation
Modifications
executeWfLifeCycleHook
andexecuteTmplLifeCycleHook
Verification
Running
is completed #11113manifest
```yaml apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: generateName: example-steps-simple-mutex spec: entrypoint: maintemplates:
- name: main
steps:
- - name: job-1
template: sleep
arguments:
parameters:
- name: sleep_duration
value: 30
hooks:
running:
expression: steps['job-1'].status == "Running"
template: hook
arguments:
parameters:
- name: sleep_duration
value: 5
- name: context
value: "job-1"
success:
expression: steps['job-1'].status == "Succeeded"
template: hook
arguments:
parameters:
- name: sleep_duration
value: 5
- name: context
value: "job-1"
- name: job-2
template: sleep
arguments:
parameters:
- name: sleep_duration
value: 30
hooks:
running:
expression: steps['job-2'].status == "Running"
template: hook
arguments:
parameters:
- name: sleep_duration
value: 5
- name: context
value: "job-2"
success:
expression: steps['job-2'].status == "Succeeded"
template: hook
arguments:
parameters:
- name: sleep_duration
value: 5
- name: context
value: "job-2"
- name: job-3
template: sleep
arguments:
parameters:
- name: sleep_duration
value: 30
hooks:
running:
expression: steps['job-3'].status == "Running"
template: hook
arguments:
parameters:
- name: sleep_duration
value: 45
- name: context
value: "job-3"
success:
expression: steps['job-3'].status == "Succeeded"
template: hook
arguments:
parameters:
- name: sleep_duration
value: 5
- name: context
value: "job-3"
</details>