Blueprints

Allow failure of a group of tasks

Source

yaml
id: allow-failure-demo
namespace: company.team

tasks:
  - id: allow_failure
    type: io.kestra.plugin.core.flow.AllowFailure
    tasks:
      - id: fail_silently
        type: io.kestra.plugin.scripts.shell.Commands
        taskRunner:
          type: io.kestra.plugin.core.runner.Process
        commands:
          - exit 1

  - id: print_to_console
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - echo "this will run since previous failure was allowed ✅"

About this blueprint

CLI

This flow demonstrates how to use the AllowFailure task to allow a task to fail without blocking downstream tasks.

The AllowFailure task is useful if you don't want to block downstream tasks when a specific task fails.

In this example, the task fail_silently will fail, but the flow will continue to run and the task print_to_console will run.

Allow Failure

Commands

Process

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra