-
Notifications
You must be signed in to change notification settings - Fork 89
Solidify output formatter implementations #625
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
It would be good to go over the output formatter implementations and ensure that there are no ASSERT paths that can be hit when better handling of the condition that triggered it would be available.
At the time of writing this there are two known ones:
- In some of the OutputFormatter implementations we rely on
getJsonStringFromMessageOrDie,
which was introduced recently in an Envoy update. There's a variant of this method which doesn't die but instead returns anabsl::Status, and that could be leveraged to enhance the flow here. - The Fortio output formatter has a known path where it asserts when there are no a global result. This is suboptimal, as this can happen with some arguably silly yet valid configurations. Instead it would be better to instruct the Fortio UI to display an error, for which there are flags in its input json.
In general, it should be rare for any output formatter to terminate abnormally, but input can be transformed into output that reflects an error in the target format.
Context: this came up in review of #621
Note: this affects only the CLI, and not the service, therefore we consider it not critical.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers