Rerun Pipeline until success

Hi guys,
Would you know if it is possible, in case of scheduled pipeline run failure, to rerun it until it’s successful?
A Kind of retry until completes successful.
Thanks,

1 Like

Yes. what you described can be done by a couple of pipelines utilizing Pipeline Monitoring API

The basic idea is to capture parameters in runtime history and rerun the failed pipeline with the captured parameters. This solution only work for a subset of the pipelines that meet following pre-requisites:

Pre-requisites:

  1. The pipeline in question is parameterizable
  2. You need to check the Capture checkbox for the pipeline in question. Selecting this checkbox will send the value of the parameter to the pipeline runtime history if the pipeline is run through a task or another pipeline with PipeExecute or ForEach This means that the existing way that you schedule this pipeline will need to be changed a little bit.

Sample pipelines:

  1. Example pipeline in question with pipeline parameters image
  2. The pipeline used to discovery one or many failed pipelines within a given folder within last given hours. Output is a list of ruuids. In you case, you may use “Failed” as the state.
    image
  3. The pipeline that takes a ruuid, read the captured the parameters from the runtime history and rerun the same pipeline with the captured parameters.

Here’s what you would see in the Dashboard for the testing:

As a general discussion, I am not going into the detail of how do you define successfulness.

Job-DoSomething_2017_09_19 (1).slp (2.4 KB)
Runtime-List_2017_09_19.slp (4.6 KB)
pipeRerunByRuuid_2017_09_19.slp (5.7 KB)

3 Likes

Thanks eguo, another good and well described answer from your side.
Let me review this.
Thanks,