-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support timestamp protobuf serde #6927
Conversation
cc @rayokota |
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.
@jzaralim LGTM! Left a minor nit
final ProtobufSchema resolved = AbstractKafkaProtobufSerializer.resolveDependencies( | ||
srClient, | ||
true, | ||
true, |
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.
nit: the arg for useLatestVersion
is not used because autoRegisterSchema
is true, but it would probably be best to pass false
anyway (since false
is the default for useLatestVersion
in general). So the args should read srClient, true, false, true
.
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.
@rayokota - looking at AbstractKafkProtobufSerializer
I noticed this method is "Visible for testing". If we're going to be depending on it here, can we remove that comment and make it clear that it's public API? Also would be nice to document it since I'm not entirely sure what it does from the method name. Does it just flatten it into one big protobuf schema?
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.
@agavra , sure I've filed https://confluentinc.atlassian.net/browse/DGS-1285 to track. The method recursively registers referenced schemas.
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.
final ProtobufSchema resolved = AbstractKafkaProtobufSerializer.resolveDependencies( | ||
srClient, | ||
true, | ||
true, |
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.
@rayokota - looking at AbstractKafkProtobufSerializer
I noticed this method is "Visible for testing". If we're going to be depending on it here, can we remove that comment and make it clear that it's public API? Also would be nice to document it since I'm not entirely sure what it does from the method name. Does it just flatten it into one big protobuf schema?
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.
lgtm! Thanks Zara
Description
One of the reasons the decimal and timestamp types were not enabled in protobuf was because those two types have dependencies that need to be registered first in order for schema registry to be able to read schemas involving these types. This PR adds an extra step before registering protobuf schemas that resolves dependencies.
Testing done
manually, unit and QTT tests
Reviewer checklist