Route error and warning status messages to stderr so -o json output stays parseable#1673
Merged
Merged
Conversation
Twelve call sites printed FailureStatusEvent to stdout, and dapr list -k printed its namespace deprecation warning to stdout ahead of the requested output, which corrupts 'dapr list -k -o json' (dapr#1015). Errors-to-stderr is existing project policy (dapr#748); these sites crept back in over time. The renew-certificate sites are intentionally left out because dapr#1670 already moves them. Fixes dapr#1015 Signed-off-by: Mukul <nmukul32@gmail.com>
JoshVanL
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
dapr list -k -o jsonprints the namespace deprecation warning to stdout ahead of the JSON, so the output can't be parsed - the exact problem reported in #1015:Beyond that one warning, twelve
FailureStatusEventcall sites acrosslist,version,init,uninstalland the sixworkflowsubcommands print errors to stdout, which both corrupts-o json/-o yamloutput and hides errors from2>redirection. Errors-to-stderr has been project policy since #748; these sites crept back in over time.This PR routes all of them to stderr. The two remaining stdout sites in
cmd/renew_certificate.goare intentionally left out - #1670 already moves them, and touching them here would just conflict.No message text changes, so existing e2e assertions (which capture combined output) are unaffected; the invalid-output-format test asserts on the exit code, which is unchanged.
Issue reference
Fixes #1015
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: