kestra icon indicating copy to clipboard operation
kestra copied to clipboard

Dynamic execution labels from triggers

Open loicmathieu opened this issue 8 months ago • 2 comments

Feature description

Currently, you can pass execution labels when starting an execution from the UI/API or a Webhook. But you cannot do that from a Trigger as triggers automatically start executions so the list of labels is static and not dynamic.

But there is interesting use case for that, for example to add some identifier in a label extracted from the trigger message.

What we can do is to allow to define dynamic labels in a trigger that will allow using Pebble expression so the trigger output will be available to create the labels.

For example:

id: trigger
type: io.kestra.plugin.jdbc.postgres.ReatimeTrigger
[...]
labels:
  key1: static value
  key2: "{{json(trigger.data).productId}}"

loicmathieu avatar May 30 '24 10:05 loicmathieu