From 4809692d7c6fb8a083579f8ede54499b15920353 Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Sun, 20 Oct 2024 11:27:21 +0200 Subject: [PATCH 1/7] fix: flow trigger docs --- .../io/kestra/plugin/core/trigger/Flow.java | 22 +++++++++---------- .../valids/trigger-flow-listener-invalid.yaml | 6 ++--- ...ger-flow-listener-namespace-condition.yaml | 2 +- .../flows/valids/trigger-flow-listener.yaml | 6 ++--- .../trigger-multiplecondition-listener.yaml | 4 ++-- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java index 805aed820bf..645c8ce4d52 100644 --- a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java +++ b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java @@ -43,10 +43,10 @@ @Plugin( examples = @Example( title = "This flow will be triggered after each successful execution of flow `company.team.trigger_flow` " + - "and forward the `uri` of `my_task` taskId outputs.", + "and it will pass the `uri` output of `parent_task` to the `from_parent` input of the child flow.", full = true, code = """ - id: trigger_flow_listener + id: child_flow namespace: company.team inputs: @@ -59,10 +59,10 @@ format: "v1: {{ trigger.executionId }}" triggers: - - id: listen_flow + - id: parent_flow type: io.kestra.plugin.core.trigger.Flow inputs: - from-parent: '{{ outputs.my_task.uri }}' + from_parent: "{{ outputs.parent_task.uri }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: company.team @@ -81,12 +81,11 @@ public class Flow extends AbstractTrigger implements TriggerOutput @Nullable @Schema( - title = "Fill input of this flow based on output of current flow.", + title = "Pass upstream flow's outputs to inputs of the current flow.", description = """ - Fill input of this flow based on output of current flow, allowing to pass data or file to the triggered flow + The inputs allow you to pass data object or a file to the downstream flow. ::alert{type="warning"} - If you provide invalid input, the flow will not be created! Since there is no task started, you can't log any reason that's visible on the Execution UI. - So you will need to go to the Logs tabs on the UI to understand the error. + Make sure that the inputs and task outputs defined in this Flow trigger match the outputs of the upstream flow. Otherwise, the downstream flow execution will not to be created. If that happens, go to the Logs tab on the Flow page to understand the error. ::""" ) @PluginProperty @@ -97,13 +96,12 @@ public class Flow extends AbstractTrigger implements TriggerOutput title = "List of execution states that will be evaluated by the trigger", description = """ By default, only executions in a terminal state will be evaluated. - If you use a condition of type `ExecutionStatusCondition` it will be evaluated after this list. + Any `ExecutionStatusCondition`-type condition will be evaluated after the list of `states`. ::alert{type="info"} - The trigger will be evaluated on each execution state change, this means that, for non-terminal state, they can be observed multiple times. - For example, if a flow has two `Pause` tasks, the execution will transition two times from PAUSED to RUNNING so theses states will be observed two times. + The trigger will be evaluated for each state change of matching executions. Keep in mind that if a flow has two `Pause` tasks, the execution will transition from PAUSED to a RUNNING state twice — one for each Pause task. The Flow trigger listening to a `PAUSED` state will be evaluated twice in this case. :: ::alert{type="warning"} - You cannot evaluate on the CREATED state. + Note that a Flow trigger cannot react to the `CREATED` state. ::""" ) @Builder.Default diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml index 2f9602c3867..0fa04a71904 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml @@ -2,19 +2,19 @@ id: trigger-flow-listener-invalid namespace: io.kestra.tests.trigger inputs: - - id: from-parent + - id: from_parent type: STRING tasks: - id: only-invalid type: io.kestra.plugin.core.debug.Return - format: "childs: {{inputs['from-parent']}}" + format: "childs: {{inputs['from_parent']}}" triggers: - id: listen-flow-invalid type: io.kestra.plugin.core.trigger.Flow inputs: - from-parent: '{{ outputs.invalid.value }}' + from_parent: '{{ outputs.invalid.value }}' conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: io.kestra.tests.trigger diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml index 178cb6f1aff..885e7f44f4e 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml @@ -2,7 +2,7 @@ id: trigger-flow-listener-namespace-condition namespace: io.kestra.tests.trigger inputs: - - id: from-parent + - id: from_parent type: STRING tasks: diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml index ae8b3e6d2c2..e5c0d4ea1ee 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml @@ -2,19 +2,19 @@ id: trigger-flow-listener namespace: io.kestra.tests.trigger inputs: - - id: from-parent + - id: from_parent type: STRING tasks: - id: only-listener type: io.kestra.plugin.core.debug.Return - format: "childs: {{inputs['from-parent']}}" + format: "childs: {{inputs['from_parent']}}" triggers: - id: listen-flow type: io.kestra.plugin.core.trigger.Flow inputs: - from-parent: '{{ outputs.only.value }}' + from_parent: '{{ outputs.only.value }}' conditions: - type: io.kestra.plugin.core.condition.ExecutionStatusCondition in: diff --git a/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml b/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml index ce497424d08..a957885154d 100644 --- a/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml @@ -2,7 +2,7 @@ id: trigger-multiplecondition-listener namespace: io.kestra.tests.trigger # #inputs: -# - id: from-parent +# - id: from_parent # type: STRING tasks: @@ -14,7 +14,7 @@ triggers: - id: multiple-listen-flow type: io.kestra.plugin.core.trigger.Flow # inputs: -# from-parent: '{{ outputs.only.value }}' +# from_parent: '{{ outputs.only.value }}' conditions: - id: multiple type: io.kestra.plugin.core.condition.MultipleCondition From 02a334289ab05458249e6569f2225602809b5d31 Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Sun, 20 Oct 2024 11:42:41 +0200 Subject: [PATCH 2/7] fix: use trigger outputs instead of the deprecated way of accessing parent task outputs directly --- .../main/java/io/kestra/plugin/core/trigger/Flow.java | 6 +++--- .../flows/valids/trigger-flow-listener-invalid.yaml | 4 ++-- .../trigger-flow-listener-namespace-condition.yaml | 11 ++++++++--- .../resources/flows/valids/trigger-flow-listener.yaml | 4 ++-- .../valids/trigger-multiplecondition-listener.yaml | 6 +++--- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java index 645c8ce4d52..28c7e6c5762 100644 --- a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java +++ b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java @@ -43,7 +43,7 @@ @Plugin( examples = @Example( title = "This flow will be triggered after each successful execution of flow `company.team.trigger_flow` " + - "and it will pass the `uri` output of `parent_task` to the `from_parent` input of the child flow.", + "and it will pass the `parent_output.uri` flow output to the `from_parent` input of the child flow.", full = true, code = """ id: child_flow @@ -62,7 +62,7 @@ - id: parent_flow type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: "{{ outputs.parent_task.uri }}" + from_parent: "{{ trigger.outputs.parent_output.uri }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: company.team @@ -83,7 +83,7 @@ public class Flow extends AbstractTrigger implements TriggerOutput @Schema( title = "Pass upstream flow's outputs to inputs of the current flow.", description = """ - The inputs allow you to pass data object or a file to the downstream flow. + The inputs allow you to pass data object or a file to the downstream flow as long as those outputs are defined on the flow-level in the upstream flow. ::alert{type="warning"} Make sure that the inputs and task outputs defined in this Flow trigger match the outputs of the upstream flow. Otherwise, the downstream flow execution will not to be created. If that happens, go to the Logs tab on the Flow page to understand the error. ::""" diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml index 0fa04a71904..0be00353d29 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml @@ -8,13 +8,13 @@ inputs: tasks: - id: only-invalid type: io.kestra.plugin.core.debug.Return - format: "childs: {{inputs['from_parent']}}" + format: "childs: {{ inputs.from_parent }}" triggers: - id: listen-flow-invalid type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: '{{ outputs.invalid.value }}' + from_parent: "{{ trigger.outputs.invalid.value }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: io.kestra.tests.trigger diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml index 885e7f44f4e..b7c5aba3e12 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml @@ -6,13 +6,18 @@ inputs: type: STRING tasks: - - id: only-listener + - id: simple_output type: io.kestra.plugin.core.debug.Return format: "simple return" triggers: - - id: listen-flow + - id: parent type: io.kestra.plugin.core.trigger.Flow conditions: - type: io.kestra.plugin.core.condition.ExecutionNamespaceCondition - namespace: io.kestra.tests.trigger \ No newline at end of file + namespace: io.kestra.tests.trigger + +outputs: + - id: parent_output + type: STRING + value: "{{ outputs.simple_output.outputs.value }}" \ No newline at end of file diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml index e5c0d4ea1ee..cc65d1bfa47 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml @@ -8,13 +8,13 @@ inputs: tasks: - id: only-listener type: io.kestra.plugin.core.debug.Return - format: "childs: {{inputs['from_parent']}}" + format: "childs: {{ inputs.from_parent }}" triggers: - id: listen-flow type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: '{{ outputs.only.value }}' + from_parent: "{{ trigger.outputs.parent_output.value }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionStatusCondition in: diff --git a/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml b/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml index a957885154d..808fe9e3f56 100644 --- a/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml @@ -6,15 +6,15 @@ namespace: io.kestra.tests.trigger # type: STRING tasks: - - id: only-listener + - id: return_value type: io.kestra.plugin.core.debug.Return - format: "childs" + format: "child" triggers: - id: multiple-listen-flow type: io.kestra.plugin.core.trigger.Flow # inputs: -# from_parent: '{{ outputs.only.value }}' +# from_parent: '{{ trigger.outputs.parent_output.value }}' conditions: - id: multiple type: io.kestra.plugin.core.condition.MultipleCondition From 96194ab99a4976361f8d05a099008a74721d1bca Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Sun, 20 Oct 2024 12:01:18 +0200 Subject: [PATCH 3/7] fix: flow output values --- core/src/main/java/io/kestra/plugin/core/trigger/Flow.java | 4 ++-- .../resources/flows/valids/trigger-flow-listener-invalid.yaml | 2 +- .../valids/trigger-flow-listener-namespace-condition.yaml | 2 +- .../test/resources/flows/valids/trigger-flow-listener.yaml | 2 +- .../flows/valids/trigger-multiplecondition-listener.yaml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java index 28c7e6c5762..18b4ef5b55e 100644 --- a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java +++ b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java @@ -43,7 +43,7 @@ @Plugin( examples = @Example( title = "This flow will be triggered after each successful execution of flow `company.team.trigger_flow` " + - "and it will pass the `parent_output.uri` flow output to the `from_parent` input of the child flow.", + "and it will pass the `parent_output` flow output to the `from_parent` input of the child flow.", full = true, code = """ id: child_flow @@ -62,7 +62,7 @@ - id: parent_flow type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: "{{ trigger.outputs.parent_output.uri }}" + from_parent: "{{ trigger.outputs.parent_output }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: company.team diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml index 0be00353d29..d538e5be70a 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml @@ -14,7 +14,7 @@ triggers: - id: listen-flow-invalid type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: "{{ trigger.outputs.invalid.value }}" + from_parent: "{{ trigger.outputs.invalid_output }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: io.kestra.tests.trigger diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml index b7c5aba3e12..e69ff0fb130 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-namespace-condition.yaml @@ -20,4 +20,4 @@ triggers: outputs: - id: parent_output type: STRING - value: "{{ outputs.simple_output.outputs.value }}" \ No newline at end of file + value: "{{ outputs.simple_output.value }}" \ No newline at end of file diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml index cc65d1bfa47..311872e4683 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml @@ -14,7 +14,7 @@ triggers: - id: listen-flow type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: "{{ trigger.outputs.parent_output.value }}" + from_parent: "{{ trigger.outputs.parent_output }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionStatusCondition in: diff --git a/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml b/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml index 808fe9e3f56..1ce19e3ff12 100644 --- a/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-multiplecondition-listener.yaml @@ -8,13 +8,13 @@ namespace: io.kestra.tests.trigger tasks: - id: return_value type: io.kestra.plugin.core.debug.Return - format: "child" + format: task in a child flow triggers: - id: multiple-listen-flow type: io.kestra.plugin.core.trigger.Flow # inputs: -# from_parent: '{{ trigger.outputs.parent_output.value }}' +# from_parent: '{{ trigger.outputs.parent_output }}' conditions: - id: multiple type: io.kestra.plugin.core.condition.MultipleCondition From 3f33cfd52c98d49e4b7c49c1a18a51080eb313af Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Sun, 20 Oct 2024 12:16:51 +0200 Subject: [PATCH 4/7] docs: provide a better main example --- .../io/kestra/plugin/core/trigger/Flow.java | 72 ++++++++++++------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java index 18b4ef5b55e..fa15b810ba7 100644 --- a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java +++ b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java @@ -42,36 +42,60 @@ ) @Plugin( examples = @Example( - title = "This flow will be triggered after each successful execution of flow `company.team.trigger_flow` " + - "and it will pass the `parent_output` flow output to the `from_parent` input of the child flow.", - full = true, - code = """ - id: child_flow + title = """Trigger the `transform` flow after the `extract` flow has successfully completed. The extract flow generates a `last_ingested_date` output that is passed to the `transform` flow as an input. Here is the `extract` flow: + ```yaml + id: extract namespace: company.team - inputs: - - id: from_parent - type: STRING - tasks: - - id: only_no_input + - id: final_date type: io.kestra.plugin.core.debug.Return - format: "v1: {{ trigger.executionId }}" + format: "{{ execution.startDate | dateAdd(-2, 'DAYS') | date('yyyy-MM-dd') }}" + + outputs: + - id: last_ingested_date + type: STRING + value: "{{ outputs.final_date.value }}" + ``` + Below is the `transform` flow that is triggered after the `extract` flow has successfully completed. The `last_ingested_date` output from the `extract` flow is passed to the `last_ingested_date` input of the `transform` flow. + """, + full = true, + code = """ + id: transform + namespace: company.team - triggers: - - id: parent_flow - type: io.kestra.plugin.core.trigger.Flow inputs: - from_parent: "{{ trigger.outputs.parent_output }}" - conditions: - - type: io.kestra.plugin.core.condition.ExecutionFlowCondition - namespace: company.team - flowId: trigger_flow - - type: io.kestra.plugin.core.condition.ExecutionStatusCondition - in: - - SUCCESS - """ - ), + - id: last_ingested_date + type: STRING + defaults: "2025-01-01" + + variables: + result: | + Ingestion done in {{ trigger.executionId }}. + Now transforming data up to {{ inputs.last_ingested_date }} + + tasks: + - id: run_transform + type: io.kestra.plugin.core.debug.Return + format: "{{ render(vars.result) }}" + + - id: log + type: io.kestra.plugin.core.log.Log + message: "{{ render(vars.result) }}" + + triggers: + - id: run_after_extract + type: io.kestra.plugin.core.trigger.Flow + inputs: + last_ingested_date: "{{ trigger.outputs.last_ingested_date }}" + conditions: + - type: io.kestra.plugin.core.condition.ExecutionFlowCondition + namespace: company.team + flowId: extract + - type: io.kestra.plugin.core.condition.ExecutionStatusCondition + in: + - SUCCESS""" + ), aliases = "io.kestra.core.models.triggers.types.Flow" ) public class Flow extends AbstractTrigger implements TriggerOutput { From 1921b1d4ee2dc847f54e425b586d1a614a37bf61 Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Sun, 20 Oct 2024 12:37:17 +0200 Subject: [PATCH 5/7] make CI pass --- .../io/kestra/plugin/core/trigger/Flow.java | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java index fa15b810ba7..b3f231bc3ad 100644 --- a/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java +++ b/core/src/main/java/io/kestra/plugin/core/trigger/Flow.java @@ -41,25 +41,30 @@ ::""" ) @Plugin( - examples = @Example( - title = """Trigger the `transform` flow after the `extract` flow has successfully completed. The extract flow generates a `last_ingested_date` output that is passed to the `transform` flow as an input. Here is the `extract` flow: - ```yaml - id: extract - namespace: company.team - - tasks: - - id: final_date - type: io.kestra.plugin.core.debug.Return - format: "{{ execution.startDate | dateAdd(-2, 'DAYS') | date('yyyy-MM-dd') }}" - - outputs: - - id: last_ingested_date - type: STRING - value: "{{ outputs.final_date.value }}" - ``` - Below is the `transform` flow that is triggered after the `extract` flow has successfully completed. The `last_ingested_date` output from the `extract` flow is passed to the `last_ingested_date` input of the `transform` flow. - """, + examples = { + @Example( full = true, + title = """ + Trigger the transform flow after the extract flow has successfully completed. \ + The extract flow generates a `last_ingested_date` output that is passed to the \ + transform flow as an input. Here is the extract flow: + ```yaml + id: extract + namespace: company.team + + tasks: + - id: final_date + type: io.kestra.plugin.core.debug.Return + format: "{{ execution.startDate | dateAdd(-2, 'DAYS') | date('yyyy-MM-dd') }}" + + outputs: + - id: last_ingested_date + type: STRING + value: "{{ outputs.final_date.value }}" + ``` + Below is the transform flow that is triggered after the extract flow has successfully completed. \ + The `last_ingested_date` output from the extract flow is passed to the \ + `last_ingested_date` input of the transform flow.""", code = """ id: transform namespace: company.team @@ -95,7 +100,8 @@ - type: io.kestra.plugin.core.condition.ExecutionStatusCondition in: - SUCCESS""" - ), + ), + }, aliases = "io.kestra.core.models.triggers.types.Flow" ) public class Flow extends AbstractTrigger implements TriggerOutput { From d60824a62d78a20f8210d94934959026bac335cf Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Sun, 20 Oct 2024 15:05:58 +0200 Subject: [PATCH 6/7] fix: make CI pass, not recognizing trigger variables --- .../flows/valids/trigger-flow-listener-invalid.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml index d538e5be70a..4c64ccce4aa 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener-invalid.yaml @@ -4,6 +4,7 @@ namespace: io.kestra.tests.trigger inputs: - id: from_parent type: STRING + defaults: "default value" tasks: - id: only-invalid @@ -13,9 +14,9 @@ tasks: triggers: - id: listen-flow-invalid type: io.kestra.plugin.core.trigger.Flow - inputs: - from_parent: "{{ trigger.outputs.invalid_output }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionFlowCondition namespace: io.kestra.tests.trigger flowId: trigger-flow + # inputs: + # from_parent: "{{ trigger.outputs.parent_output }}" From ce64517e430f309d6b1c79b75d09787a6dee095b Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Mon, 21 Oct 2024 10:24:58 +0200 Subject: [PATCH 7/7] the tests don't recognize trigger variables in the flow trigger --- .../test/resources/flows/valids/trigger-flow-listener.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml index 311872e4683..0e2806ff7f9 100644 --- a/core/src/test/resources/flows/valids/trigger-flow-listener.yaml +++ b/core/src/test/resources/flows/valids/trigger-flow-listener.yaml @@ -4,6 +4,7 @@ namespace: io.kestra.tests.trigger inputs: - id: from_parent type: STRING + defaults: "default value" tasks: - id: only-listener @@ -13,8 +14,8 @@ tasks: triggers: - id: listen-flow type: io.kestra.plugin.core.trigger.Flow - inputs: - from_parent: "{{ trigger.outputs.parent_output }}" + # inputs: + # from_parent: "{{ trigger.outputs.parent_output }}" conditions: - type: io.kestra.plugin.core.condition.ExecutionStatusCondition in: