You are viewing the docs for v1.3, which is not the latest release.
View latest

Input Default Values Now Support Dynamic Rendering in 1.0.0

For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append .md to any kestra.io/docs/* URL for plain Markdown.

Input defaults are now dynamic

The defaults property of all inputs is now dynamic. This change has implications for users who use a Pebble expression as a default value. Consider this use case:

yamlid: session
namespace: company.team

inputs:
  - id: sessionId
    type: STRING
    defaults: "{{ execution.id }}"

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "This is my session id: {{render(inputs.sessionId)}}"

Given that the defaults are now dynamically rendered, the above flow will fail in Kestra 0.24 and higher, unless you move the expression to the tasks as follows:

yamlid: session
namespace: company.team

inputs:
  - id: sessionId
    type: STRING
    required: false

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "This is my session id: {{ inputs.sessionId ?? execution.id }}"