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

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

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