Canceling a Pipeline Run Gracefully

Follow these steps to cancel a pipeline run gracefully. Pipelines enhance the cancel run method by introducing an optional parameter, terminateGracefully.

You can stop a pipeline run from any step without triggering errors or failures. Both the step and pipeline runs conclude in the 'succeeded' state. This functionality proves useful when a step logic identifies the next step as unnecessary or invalid, prompting the ending of the pipeline run. For example, if a transformation step detects insufficient or poor-quality data, the pipeline run can be stopped before proceeding to model training and deployment.

This starts custom logic within a pipeline run to halt execution and flag the run as SUCCEEDED. This distinction is crucial for monitoring purposes, enabling the differentiation between willingly ended runs and those canceled by the service, for example, because of resource limitations.

    1. On the Projects list page, select the project that contains the pipelines that you want to work with. If you need help finding the list page or the project, see Listing Projects.
    2. On the project details page, select Pipelines.
      All pipelines in the selected project are displayed in a table.
    3. Select the pipeline.
    4. On the pipeline details page, select Pipeline runs.
    5. Select the pipeline run.
    6. On the pipeline run details page, from Actions on the upper right, select Cancel.
    7. In the Cancel pipeline run dialog box, enter the name of the pipeline run exactly as it appears.
    8. Select Terminate gracefully.
    9. Select Confirm.
  • Use the PipelineRun Cancel command and required parameters to gracefully stop a job:

    oci data-science pipeline-run cancel --pipeline-run-id ocid1.datasciencepipelinerun.oc1.iad.amaaaaaay75uckqaqz3wv77m72wlfp6hzw7la22mzaysgz77j5vyynyqdwga --terminate-gracefully true ... [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CancelPipelineRun operation with the terminateGracefully parameter to stop the run gracefully. For example:

    /pipelineRuns/<pipeline-run-ocid>/actions/cancelPipelineRun?terminateGracefully=true