Is this a BUG REPORT or FEATURE REQUEST?:
Feature request
When doing argo get ... I can see the exit code for failed workflows. It would be reasonable if the exit code for steps could be exposed as an output parameter and used for other parts in the workflow. E.g. to not retry a step for certain exit codes, or to use the exit code in conditionals.
Seems reasonable. Have you thought about contributing a fix?
Seems reasonable. Have you thought about contributing a fix?
Unfortunately I dont know go:-/
@epa095 - Thanks for using Argo and for the awesome suggestion.
@simster7 - I'm looking to pick this one. Quick clarification - Would this apply only for script type templates? Or do you see this working for a container type as well? if so, how do we handle multiple exitCodes in a Pod - say a template that has a sidecar?
Exitcode should be expose for script and container template types. Exitcode should be from main container.
@sarabala1979 roger that.
@cloud-on-prem are you still working on it ?
@rdigiorgio - sorry this fell off my radar. I did some initial digging around but haven't been to find time to get it work properly. Are you planning on picking this up? Feel free to do so.
I think this requires some more reflexion.
Do we really want the exit code to be exposed as an output ?
AFAIK, whenever a script / container template fails, there are no output and the whole template is marked as failed, so it does not feel right for me.
Also, any step that would come after a failed step (possibly using a script / container template with an exit code) will not be executed.
Should this exit code be only available to use with retry strategies ?
@rdigiorgio I think this is meant to add the exit code as an output _variable_. Something like steps.<STEPNAME>.outputs.exitcode and tasks.<TASKNAME>.outputs.exitcode.
AFAIK, whenever a script / container template fails, there are no output and the whole template is marked as failed, so it does not feel right for me.
Some output variables such as result still get filled after a step fails.
Also, any step that would come after a failed step (possibly using a script / container template with an exit code) will not be executed.
Not always true, a step or DAG task could have continueOn: failed: true. See example.
Should this exit code be only available to use with retry strategies ?
It should be available regardless of retryStrategy
Let me know if you want to take on this change and I can assign the issue to you!
Thanks for clarifying, I just have had a newborn so I am trying to work on it when I have spare time (do I really have some ? lol) because I might need this at work
@simster7 I created a pull request for this #2111
I just have had a newborn
Congratulations! 馃帄 馃帀
Most helpful comment
Exitcode should be expose for script and container template types. Exitcode should be from main container.