Bug #10903
closedCancel button on jobs & pipeline instances should cancel all child jobs too
Description
Extend the Job#cancel method to accept a "cascade: true" parameter.
Extend the jobs.cancel API to accept a "cascade=true" parameter.
Add a PipelineInstance#cancel method that accepts a "cascade: true" parameter (change to state=Paused if state is RunningOnServer or RunningOnClient; no-op if state is Paused; otherwise fail).
Add a pipeline_instances.cancel API that accepts a "cascade: true" parameter.
Update workbench to use the cascade=true flag when calling the jobs.cancel API.
Add a confirmation dialog which includes text warning that all unfinished child jobs will be canceled as well, even if they're also being used in another job/pipeline.
Update Workbench to use the pipeline_instances.cancel API with cascade=true, instead of updating state to Paused. Add a confirmation dialog as with jobs.
In the model methods, if cascade: true is given, cancel any jobs listed in the pipeline instance's / job's components hash (subject to permissions), and propagate the cascade:true
flag so an arbitrary number of generations of descendants can be cancelled.
Ensure the code cannot fall into an infinite loop or recursion (for example, make a test case where job A has job B in its components hash, and job B has job A in its components hash).
This is crunch1 only. Crunch2 already takes care of this.