Skip to content

Send dapr invoke/dapr publish status messages to stderr to keep stdout pipeable#1672

Open
Mukuwul wants to merge 1 commit into
dapr:masterfrom
Mukuwul:fix/invoke-publish-stderr-status
Open

Send dapr invoke/dapr publish status messages to stderr to keep stdout pipeable#1672
Mukuwul wants to merge 1 commit into
dapr:masterfrom
Mukuwul:fix/invoke-publish-stderr-status

Conversation

@Mukuwul

@Mukuwul Mukuwul commented Jul 18, 2026

Copy link
Copy Markdown

Description

dapr invoke prints the app's response to stdout and then appends ✅ App invoked successfully to the same stream, so piping the response into any parser fails:

$ dapr invoke --app-id myapp --method getstate | jq .
{ ...valid json... }
✅  App invoked successfully      ← jq: parse error

This PR moves the success banners and the unix-domain-socket preview warnings in dapr invoke and dapr publish to stderr, keeping stdout clean for the response payload — consistent with the errors-to-stderr policy established in #748.

Existing e2e assertions are unaffected: the test spawner captures CombinedOutput() (stdout+stderr merged), so assert.Contains(t, output, "App invoked successfully") still passes.

Issue reference

Fixes #1671

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests (existing e2e coverage exercises these paths via CombinedOutput and remains valid)
  • Extended the documentation (n/a — behavior fix)

dapr invoke printed the app response to stdout and then appended
'App invoked successfully' to the same stream, so piping the response
into a parser (e.g. jq) failed. Move the success banners and the
unix-domain-socket preview warnings in invoke and publish to stderr,
consistent with the errors-to-stderr policy from dapr#748.

E2E assertions are unaffected: the test spawner captures CombinedOutput.

Fixes dapr#1671

Signed-off-by: Mukul <nmukul32@gmail.com>
@Mukuwul
Mukuwul force-pushed the fix/invoke-publish-stderr-status branch from df2f3c3 to 434ad56 Compare July 18, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dapr invoke appends its success banner to stdout after the response body, corrupting piped output

1 participant