Closed toyamagu-2021 closed 1 year ago
Thanks for finding root cause! Please consider contributing a PR.
By the way, there are some other open issues related to hooks. I wonder if any of them are the same root cause.
Good point. I'm not sure, but lastChileNode
might be problematic when using hook
Is this a regression?
I think it's not a regression. Works wrong when we use a hook which is introduced as of v3.3
Appendix: Originally I reported for WorkflowLevelHook, but I can reproduce this issue for WorkflowTemplateLevelHook
spec:
templates:
- name: main
steps:
- - name: s1
template: argosay
hooks:
failed:
template: hook
arguments: {}
expression: steps.s1.status == "Failed"
running:
template: hook
arguments: {}
expression: steps.s1.status == "Running"
succeed:
template: hook
arguments: {}
expression: steps.s1.status == "Succeeded"
- name: argosay
inputs: {}
outputs: {}
metadata: {}
container:
name: ''
image: argoproj/argosay:v2
command:
- /bin/sh
- '-c'
args:
- /bin/sleep 2; exit 1; /argosay
resources: {}
retryStrategy:
limit: 3
- name: hook
inputs: {}
outputs: {}
metadata: {}
container:
name: ''
image: argoproj/argosay:v2
command:
- /bin/sh
- '-c'
args:
- /bin/sleep 2; /argosay
resources: {}
entrypoint: main
arguments: {}
hooks:
failed:
template: hook
arguments: {}
expression: workflow.status == "Failed"
running:
template: hook
arguments: {}
expression: workflow.status == "Running"
succeed:
template: hook
arguments: {}
expression: workflow.status == "Succeeded"
Pre-requisites
:latest
What happened/what you expected to happen?
Abstract
Root cause
lastChiledNode
lastChiledNode
= Running Node is succeeded. This node is retried node usually.How to fix
lastChiledNode
is last retried node.Version
latest
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container