-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for new graceful termination options from TEP-0058 #2094
Comments
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Still something we want to add |
TEP-0058 Graceful Termination deprecated the existing `PipelineRunCancelled` status. Instead, runs have the status reason `Cancelled`. The feature is still in alpha, so to test it out you can edit the `feature-flags` ConfigMap to set `enable-api-fields: alpha`, then use one of the following values when cancelling the PipelineRun: - `Cancelled` replaces the existing `PipelineRunCancelled`, interrupts any executing tasks and does not run finally tasks - `StoppedRunFinally` lets any executing tasks complete normally but does not start any new non-finally tasks, then runs finally tasks - `CancelledRunFinally` interrupts any executing non-finally tasks, then executes finally tasks In all 3 cases above, the PipelineRun status reason is `Cancelled` Update tests and storybook to include 'Cancelled' variants. The Dashboard API will still use `PipelineRunCancelled` to stop a PipelineRun. A future change once the feature has been promoted to beta will switch to the replacement `Cancelled` value. Some UI change may also be made to support the alternative behaviours, tracking this in tektoncd#2094
TEP-0058 Graceful Termination deprecated the existing `PipelineRunCancelled` status. Instead, runs have the status reason `Cancelled`. The feature is still in alpha, so to test it out you can edit the `feature-flags` ConfigMap to set `enable-api-fields: alpha`, then use one of the following values when cancelling the PipelineRun: - `Cancelled` replaces the existing `PipelineRunCancelled`, interrupts any executing tasks and does not run finally tasks - `StoppedRunFinally` lets any executing tasks complete normally but does not start any new non-finally tasks, then runs finally tasks - `CancelledRunFinally` interrupts any executing non-finally tasks, then executes finally tasks In all 3 cases above, the PipelineRun status reason is `Cancelled` Update tests and storybook to include 'Cancelled' variants. The Dashboard API will still use `PipelineRunCancelled` to stop a PipelineRun. A future change once the feature has been promoted to beta will switch to the replacement `Cancelled` value. Some UI change may also be made to support the alternative behaviours, tracking this in tektoncd#2094
TEP-0058 Graceful Termination deprecated the existing `PipelineRunCancelled` status. Instead, runs have the status reason `Cancelled`. The feature is still in alpha, so to test it out you can edit the `feature-flags` ConfigMap to set `enable-api-fields: alpha`, then use one of the following values when cancelling the PipelineRun: - `Cancelled` replaces the existing `PipelineRunCancelled`, interrupts any executing tasks and does not run finally tasks - `StoppedRunFinally` lets any executing tasks complete normally but does not start any new non-finally tasks, then runs finally tasks - `CancelledRunFinally` interrupts any executing non-finally tasks, then executes finally tasks In all 3 cases above, the PipelineRun status reason is `Cancelled` Update tests and storybook to include 'Cancelled' variants. The Dashboard API will still use `PipelineRunCancelled` to stop a PipelineRun. A future change once the feature has been promoted to beta will switch to the replacement `Cancelled` value. Some UI change may also be made to support the alternative behaviours, tracking this in #2094
Promotion of TEP-0058 fields to beta and deprecation of the Similar issue to this one tracking CLI plans: tektoncd/cli#1553 |
@AlanGreene what are your thoughts on a 3 option radio btn situation in the overlay that essentially offers a trimmed down version of the descriptions above? None of them are default and the submit btn is disabled until one is selected?
or is this ^^ to wordy? As for checking the version, would a simple switch on the pipeline version catch that? It also looks like there are a few other helper functions that can get resources if needed. Either way, it would benefit devs to display that there are more features available with an upgrade, by either having the other options disabled, or some kind of toast or messaging. |
Yes I think radio buttons make sense here, at least we have room to explain the difference between the options in the modal. With radio button groups one radio button should always be selected by default, in this case I think it would be the 'Cancel' option which is equivalent to our current behaviour. It probably makes sense to persist the user's choice in localStorage so we can remember it next time they open the modal. In terms of the labels, I think we'll have to play with this a bit to find the right balance of clarity vs. wordiness.
Is it important to clarify that no new tasks will be scheduled (apart from finally) or is this already apparent to the user? Should we use the status values in the labels, e.g. In terms of version support, we could try to detect the installed Pipelines version using the existing code ( |
So radio buttons and having "Cancel" as default, along with saving the user choice all sound good to me. Labeling is still a bit it of a head scratcher though. Is the intent of cancel+finally, and stop+finally to stop and cancel a pipeline gracefully? If so, it feels appropriate to use that wording. Perhaps something like
or even wording that is not as closely related to the actual statuses, but are potentially more descriptive to the users who are not familiar with tektons inner workings?
If I'm not mistaken the newest release of the pipelines has this implemented no? I'm happy to start messing with a pr and different versions of the pipelines to see what feels like the cleanest implementation of the version check/get unit testing in place, etc. while we hash out the labels. Once the wording is in place updating the labels on that pr or with a subsequent pr should be pretty low weight. |
Yes Graceful Termination is available in Pipelines v0.35 👍 Absolutely, changing the strings is cheap so go ahead with the rest and we can iterate on the labels / tooltips for the UI. My main problem at the moment is with 'cancel' vs. 'graceful' as both of the 'cancel' options interrupt any currently running non-finally tasks which I wouldn't consider 'graceful'. I'd also be hesitant to use language that's not reflected in the API / documentation for the feature or could be problematic for translation (e.g. stop / finish). Also using 'stop' in the UI for anything other than the 'StoppedRunFinally' option would be confusing as 'stop' has a specific meaning for this feature. For that reason I'm currently leaning towards 'Cancel with finally' with more info in a tooltip rather than 'Cancel gracefully'. It's still concise, while providing an indication that the default 'Cancel' just bails out and won't run finally tasks. Open to suggestions / feedback.
|
Add support for the new graceful termination feature added in Pipelines v0.25 (added as alpha) which provides three different ways to terminate a PipelineRun, differentiating between 'Stop' and 'Cancel'.
There are some additional considerations here:
feature detection - can we tell whether the feature is enabled or not? If not, should we wait for it to be promoted in a future Pipeline release?
action name - the TEP differentiates between 'Stop' and 'Cancel'
Using 'Cancel' as the action name was problematic in the past as it's the same as the option to dismiss the confirmation dialog, so that's why we originally went with 'Stop', otherwise we end up with something like this:
We could use something like 'Stop PipelineRun' and 'Cancel PipelineRun' as the action labels to reduce the ambiguity but this could still cause some confusion.
should we have a single action or separate them out? If we go with a single action in the overflow menu how do we allow the user to select between the different types of termination? Radio button selection in the confirmation dialog for example?
Originally posted by @AlanGreene in #2069 (comment)
The text was updated successfully, but these errors were encountered: