turbot / flowpipe

Flowpipe is a cloud scripting engine. Automation and workflow to connect your clouds to the people, systems and data that matters.
https://flowpipe.io
GNU Affero General Public License v3.0
361 stars 13 forks source link

The http trigger doesn't support `execution_mode` argument #533

Closed cjsrkd3321 closed 8 months ago

cjsrkd3321 commented 9 months ago

Hello!

https://flowpipe.io/docs/flowpipe-hcl/trigger/http#arguments I looked upper page, but execution_mode argument doesn't supported in the http trigger I think.

Below is my code

trigger "http" "my_webhook" {
  pipeline = pipeline.get_astronauts
  args     = {
    event = self.request_body
  }
  execution_mode = "synchronous"
}
$ flowpipe server 
{"time":"2023-12-29T11:48:52.644433+09:00","level":"DEBUG","msg":"setting memory limit","max memory MB":1024}
{"time":"2023-12-29T11:48:52.644576+09:00","level":"DEBUG","msg":"enabling update check"}
{"time":"2023-12-29T11:48:52.64475+09:00","level":"DEBUG","msg":"Manager starting"}
{"time":"2023-12-29T11:48:52.644768+09:00","level":"DEBUG","msg":"Initializing mod directory","modLocation":"...<SNIP>..."}
{"time":"2023-12-29T11:48:52.655237+09:00","level":"INFO","msg":"Starting Flowpipe","modLocation":"...<SNIP>..."}
{"time":"2023-12-29T11:48:52.666588+09:00","level":"DEBUG","msg":"modfile exists in workspace folder - creating pseudo-resources and loading files recursively "}
{"time":"2023-12-29T11:48:52.670547+09:00","level":"DEBUG","msg":"parse complete","decode passes":1}
{"time":"2023-12-29T11:48:52.676424+09:00","level":"DEBUG","msg":"parse complete","decode passes":1}
{"time":"2023-12-29T11:48:52.679471+09:00","level":"DEBUG","msg":"parse complete","decode passes":1}
{"time":"2023-12-29T11:48:52.683104+09:00","level":"DEBUG","msg":"parse complete","decode passes":1}
{"time":"2023-12-29T11:48:52.691801+09:00","level":"DEBUG","msg":"parse complete","decode passes":2}
{"time":"2023-12-29T11:48:52.695469+09:00","level":"DEBUG","msg":"Workspace load complete","duration (ms)":28}
{"time":"2023-12-29T11:48:52.6955+09:00","level":"DEBUG","msg":"Manager started"}
Error: Failed to decode mod:
Unsupported argument: An argument named "execution_mode" is not expected here.
(...<SNIP>... learn.fp:11,3-17)

What kinds of problem in my code?

vhadianto commented 9 months ago

@cjsrkd3321 thank you for the report. The issue is on Flowpipe end, not your code nor the documentation.

I've reproduced your issue and confirmed this is a bug. The documentation is correct, the 'HTTP Trigger' should support 'execution_mode' attribute. We'll fix it.

vhadianto commented 9 months ago

The issue in pipe-fitting needs to be done first before we can fix flowpipe.

Subhajit97 commented 8 months ago

Hi @cjsrkd3321, we have released a new Flowpipe CLI version v0.2.0 which now supports the execution_mode argument to HTTP Trigger. Could you please take some time to update to the new version and try it?

We are closing the issue for now. Please feel free to reopen this issue if you encounter any issues.

Thanks again for your contribution!