kestra-io / plugin-fs

https://kestra.io/plugins/plugin-fs/
Apache License 2.0
5 stars 7 forks source link

HTTP Trigger with Encrypted Body doesn't trigger executions #104

Closed anna-geller closed 5 months ago

anna-geller commented 6 months ago

Issue description

id: send_alert_price
namespace: dev

tasks:
  - id: slack
    type: io.kestra.core.tasks.log.Log
    message: "The price is now below the threshold: {{ json(trigger.body).products[0].price }}"

triggers:
  - id: http
    type: io.kestra.plugin.fs.http.Trigger
    uri: https://dummyjson.com/products/search?q=macbook-pro
    responseCondition: "{{ json(response.body).products[0].price < 1800 }}"
    interval: PT1S
    encryptBody: true
    stopAfter:
      - SUCCESS

This doesn't create any executions

When you remove the encryptBody, it works

anna-geller commented 6 months ago

PEBKAC

the right version is to use encryptedBody:

id: send_alert_when_price_drops48
namespace: dev

tasks:
  - id: slack
    type: io.kestra.core.tasks.log.Log
    message: "The price is now below the threshold: {{ json(trigger.encryptedBody).products[0].price }}"

triggers:
  - id: http48
    type: io.kestra.plugin.fs.http.Trigger
    uri: https://dummyjson.com/products/search?q=macbook-pro
    responseCondition: "{{ json(response.body).products[0].price < 1800 }}"
    interval: PT1S
    encryptBody: true
    stopAfter:
      - SUCCESS
anna-geller commented 6 months ago

reopening as even using encryptedBody, this didn't trigger any executions for me