Project

General

Profile

Actions

Bug #10903

closed

Cancel button on jobs & pipeline instances should cancel all child jobs too

Added by Tom Morris almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Story points:
2.0

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.


Subtasks 2 (0 open2 closed)

Task #11036: Review 10903-api-cancel-cascadeResolvedRadhika Chippada01/17/2017Actions
Task #11073: Review 10903-wb-cancel-cascadeResolvedLucas Di Pentima02/08/2017Actions
Actions

Also available in: Atom PDF