As a user, I can cancel all running tasks using API
When trying to diagnose problems, a user often needs to be able to cancel all running tasks. This requires a user to look through the list of tasks and determine which ones are actually running or waiting. Only then can a user start issuing individual requests for each task. Affording a user to cancel all tasks in RUNNING or WAITING state with a single request would be a much better user experience. This story is only half of the work needed to make the experience truly better. The second story describes how pulp-admin needs to be extended to make use of the new API endpoint. The acceptance criteria for this story include the following:
- '/pulp/api/v2/tasks' API endpoint needs to accept a DELETE request. This action should cancel all tasks in RUNNING or WAITING state
- Documentation about the API
- Release notes about the new feature
Updated by bmbouter about 7 years ago
FYI, our upgrade instructions usually don't tell users to cancel all running tasks.
Also, this can be broken into two stories: first the API, then the CLI. Since it can be broken up I think it should. They should have a depends on relationship.
Lastly, using the DELETE sounds good, but having a DELETE on the generic task sound a little scary. What about a DELETE on /pulp/api/v2/tasks/* or /pulp/api/v2/tasks/all-tasks
Using either * or 'all-tasks' won't collide with any other task because all of our tasks are identified by uuid. I'm not 100% sure that this better. I'd like to have a third opinion given.