argo-workflows icon indicating copy to clipboard operation
argo-workflows copied to clipboard

`argo stop` option to respect `continueOn`

Open samath117 opened this issue 5 years ago • 0 comments

Summary

argo stop, possibly by default and possibly with an option, should still execute steps that would run subsequently upon failure of the currently-running steps to continue. This allows "manual exit handlers" to still function in addition to explicitly-specified exit handlers.

Motivation

argo stop provides a softer alternative to argo terminate by still running exit handlers, which is helpful if they are needed to perform cleanup tasks. However, it only does so for exit handlers explicitly defined as such, not those implemented with, say, continueOn: {failed: True}. This is problematic because exit handlers don't mesh well (#2831) with WorkflowTemplates. In my particular case, as I mentioned at the above issue, that incompatibility has led me to translate my explicit exit handlers into manual exit handlers. It would be nice to be able to continue using argo stop.

In general, I would shy away from building functionality like argo stop that depends on explicitly denoting exit handlers, given that it's "superfluous" and "essentially a convenience feature", especially as more continuation tools become available.

Proposal

There should be an option like argo stop --continue (don't love the name, please come up with a better one) which simply ends fails all currently running steps. If there are later steps that would continue upon failure of those steps, they continue as normal. Ideally this would be made the default behavior, so the option would be necessary if you wanted to not run the following steps.


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

samath117 avatar Apr 28 '20 08:04 samath117