Core Plugins and tasks AllowFailure

Core Plugins and tasks AllowFailure

Certified

Let a block fail without stopping the rest of the flow.

Runs the nested tasks sequentially; if one fails, remaining siblings in the block are skipped but downstream tasks after AllowFailure continue.

Useful to mark best-effort sections. Combine with allowWarning to downgrade failures inside the block to warnings.

yaml
type: io.kestra.plugin.core.flow.AllowFailure
yaml
id: allow_failure
namespace: company.team

tasks:
  - id: sequential
    type: io.kestra.plugin.core.flow.AllowFailure
    tasks:
     - id: ko
       type: io.kestra.plugin.scripts.shell.Commands
       commands:
        - 'exit 1'

  - id: last
    type: io.kestra.plugin.core.debug.Return
    format: "{{ task.id }} > {{ taskrun.startDate }}"

Allow failure of a group of tasks

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 ✅"
Properties
Min items1

List of tasks to run if any tasks failed on this FlowableTask.

Reference (ref) of the pluginDefaults to apply to this task.