This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Support cancelling running tasks #18
Milestone
Comments
To make this a bit more clear to the person running a task, I think we should also do the following:
|
JeanMertz
added a commit
that referenced
this issue
Jul 8, 2019
The goal of this rewrite is to make the code more composable to make it easier to add new functionality in the future. Here's a list of the most relevant changes: * Use a declarative component-based UI with a virtual DOM to separate rendering logic from the business logic. * Add a router to support deep-linking to specific tasks. * Reduce Wasm binary from ~2 MB to ~450 kB (uncompressed). * Add local session caching to reduce the number of network requests. * Remove atomic-based CSS classes in favor of semantic classes. * Rename all occurrences of "task" with "job" and "pipeline" with "task" (this change will be applied to the other crates as well). * Minor visual changes. This commit (partially) resolves the following issues: * #14 * #15 * #18 * #27
I've changed the above list into a checklist, and removed the You can no longer exit a task while its running (unless you reload your browser or hit the browser's back button, but that won't break anything). There isn't a way to cancel a running task yet, but the infrastructure to support this is there, and this is now a regular feature request, instead of a bug. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When starting a long-running task, and then closing the pipeline details view in the web client, the task will continue to run on the server, and the client will continue polling for results in the background.
While some kind of "background tasks with notifications" system might be nice to have in the future, the web client currently isn't build to support this use-case, and the above will result in weird errors.
For now, three things need to happen:
when a task is started, and the pipeline details view is closed, the web client should stop polling for the results of this taskSupport cancelling running tasks #18 (comment).Steps 2 and 3 are more involved, and less of a priority for immutable tasks, but when running a task that performs some destructive action, you might want to be able to quickly cancel a task when you accidentally started one with the wrong variables.
For 2 and 3, the most straightforward solution would be to:
Task
to statusCancelling
.Cancelled
(tasks and task steps have their own statuses in the database).For supporting the "cancel accidental run" case, some additional changes need to happen:
Run
button needs to change toCancel
.Task
object, after it was cancelled, so the client can show which task steps ran, and which got cancelled.In the case of step 3, we might actually want to make the cancellation asynchronous, since a long-running step still in progress might block the response for a significant time. So instead, we should immediately return an acknowledgement that the task will be cancelled, and let the client poll until cancellation happened.
The text was updated successfully, but these errors were encountered: