Expected Behavior
stdout of dapr invoke carries only the app's response payload, so piping works (dapr invoke ... | jq); status and progress messages go to stderr, consistent with the project policy established in #748.
Actual Behavior
cmd/invoke.go prints the response to stdout and then prints ✅ App invoked successfully — also to stdout, immediately after the payload (cmd/invoke.go#L88-L91). Piping the response into any parser fails:
$ dapr invoke --app-id myapp --method getstate | jq .
{ ...valid json... }
✅ App invoked successfully ← jq: parse error
The Unix-domain-socket preview warning has the same problem (cmd/invoke.go#L77), as do the equivalent banner and warning in dapr publish (cmd/publish.go#L95, cmd/publish.go#L76).
Steps to Reproduce the Problem
dapr run --app-id myapp -- <any app exposing a method that returns JSON>
dapr invoke --app-id myapp --method <method> | jq .
- jq fails to parse because the success banner is appended to the payload on stdout.
I have a fix ready and will open a PR right after filing this.
Release Note
RELEASE NOTE: FIX dapr invoke and dapr publish status messages now go to stderr, keeping stdout clean for the response payload.
Expected Behavior
stdout of
dapr invokecarries only the app's response payload, so piping works (dapr invoke ... | jq); status and progress messages go to stderr, consistent with the project policy established in #748.Actual Behavior
cmd/invoke.goprints the response to stdout and then prints✅ App invoked successfully— also to stdout, immediately after the payload (cmd/invoke.go#L88-L91). Piping the response into any parser fails:The Unix-domain-socket preview warning has the same problem (cmd/invoke.go#L77), as do the equivalent banner and warning in
dapr publish(cmd/publish.go#L95, cmd/publish.go#L76).Steps to Reproduce the Problem
dapr run --app-id myapp -- <any app exposing a method that returns JSON>dapr invoke --app-id myapp --method <method> | jq .I have a fix ready and will open a PR right after filing this.
Release Note
RELEASE NOTE: FIX
dapr invokeanddapr publishstatus messages now go to stderr, keeping stdout clean for the response payload.