kestra-io / plugin-fs

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

Unable to use {{ trigger.date }} inside a trigger parameter string #135

Closed LekhaR100 closed 2 months ago

LekhaR100 commented 2 months ago

Expected Behavior

I want to set a trigger to ingest a unique url every 15 minutes. I would like one portion of the url to change for each ingestion, depending on the time of the trigger. This portion is formatted as so: 'yyyyMMddHHmm' I cannot use now(), because occasionally it runs a minute late, causing the url portion to end with 16 instead of 15, which does not exist. The ideal solution is to replace {{ now() }} with {{ trigger.date }} so that the url format will always represent a 15 minute interval.

Actual Behaviour

I get this error when I attempt to use {{ trigger.date }} instead of {{ now() }}:

"Evaluate Failed with error 'Missing variable: 'date' on 'http://...{{ trigger.date | date('yyyyMMddHHmm') }}00.CSV.zip' at line 1'"

Steps To Reproduce

  1. Begin creating a flow with a trigger in the kestra editor
  2. Make one of the inputs a url
  3. In the trigger, take a url as an input parameter.
  4. Use {{ trigger.date }} as a variable in the url
  5. Execute the flow and watch the logs in kestra for an error/success

Environment Information

Example flow

Screenshot 2024-06-13 at 9 42 05 AM
anna-geller commented 2 months ago

duplicate of https://github.com/kestra-io/kestra/issues/4023