Skip to content

feat: update ConversionOutcome to output as string in JSON#5044

Merged
jess-lowe merged 4 commits intogoogle:masterfrom
jess-lowe:fix-conversion-metrics-outcome-string-7970822871745603830
Mar 17, 2026
Merged

feat: update ConversionOutcome to output as string in JSON#5044
jess-lowe merged 4 commits intogoogle:masterfrom
jess-lowe:fix-conversion-metrics-outcome-string-7970822871745603830

Conversation

@jess-lowe
Copy link
Contributor

This implements the json.Marshaler and json.Unmarshaler interfaces for the ConversionOutcome enum so that the outcome field in the ConversionMetrics output shows the string value (e.g. "Successful") instead of its integer value.

This makes it easier to read what caused a failure in the metrics output

This implements the json.Marshaler and json.Unmarshaler interfaces
for the `ConversionOutcome` enum so that the `outcome` field in the
`ConversionMetrics` output shows the string value (e.g. "Successful")
instead of its integer value.

Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

google-labs-jules bot and others added 3 commits March 13, 2026 06:30
This implements the json.Marshaler and json.Unmarshaler interfaces
for the `ConversionOutcome` enum so that the `outcome` field in the
`ConversionMetrics` output shows the string value (e.g. "Successful")
instead of its integer value.

The receivers were correctly adjusted to use value receivers for
String() and MarshalJSON(), and pointer receiver for UnmarshalJSON(),
which fixes the `recvcheck` linter error by silencing it on the UnmarshalJSON method.
Blank lines were also added to adhere to `nlreturn` rules.

Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
@jess-lowe jess-lowe added the await release This PR should be fixed in the next release (Tuesday) label Mar 17, 2026
@jess-lowe jess-lowe merged commit 46f7c9c into google:master Mar 17, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

await release This PR should be fixed in the next release (Tuesday)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants