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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this changing the behavior for all of the other codecs? They previously always received the lossy conversion, now only
jsondoes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct. I took a quick scan over the existing deserializers and
Syslog,NativeJson, andGelfwill no longer apply a lossy conversion, which is undesirable. Conversely, lossy conversion is no longer applied to the input ofBytesandNativewhich is desired.Do you have any suggestions for a way forward? We could add the conversion into the Deserializers itself, similar to what we did for the json deserializer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we do something along the lines of:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does seem like the easiest way to slide this change in without additional updates to other codecs. Longer term it does seem appropriate to standardize more on the lossy behavior, but I don't know what the priority/capacity is for that.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, I neglected that other codecs also need UTF-8 aside from the
jsoncodec when thinking about this issue. I think ideally all codecs than need UTF-8 would grow the new lossy option. I'd support doing that now since it doesn't seem like a huge lift based on #17628, but, if it is, I'd support the workaround mentioned by Kyle.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄 sorry for making more work for you @dsmith3197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'll go ahead with adding the lossy option to the relevant codecs 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has now been resolved thanks to #17688.