nextflow-io/nf-weblog

WebLog payload - invalid JSON

Opened this issue · 0 comments

Bug report

Expected behavior and actual behavior

by running a test workflow as suggested in the README

        ./launch.sh run nextflow-io/hello -plugins nf-weblog -with-weblog http://localhost:4567

the system sends, as expected, a set of events in JSON format to the configured endpoint. Unfortunately seems that are not valid JSON.
This is related to the commandLine value in the workflow metadata that is not correctly escaped

     [...]
     "commandLine": "../nextflow/launch.sh run nextflow-io/hello -plugins nf-weblog -with-weblog \'http://localhost:4567\'"
     [...]

this problem does not happen when url is passed in the config

Steps to reproduce the problem

(Provide a test case that reproduce the problem either with a self-contained script or GitHub repository)

Program output

  1. setup an endpoint that can consume a POST request

  2. run workflow using by specifying the endpoint in the config:

 ./launch.sh run nextflow-io/hello -plugins nf-weblog -with-weblog http://localhost:4567
  1. inspect the request payload

Environment

  • Nextflow version: "version": "23.08.1-edge" - "build":5874 - "enable":{"dsl":2}
  • Java version: [?]
  • Operating system: macOS
  • Bash version: zsh 5.9 (x86_64-apple-darwin22.0)

Additional context