-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Support Protobuf descriptor files in addition to Base64 format #529
Support Protobuf descriptor files in addition to Base64 format #529
Conversation
Hi, @jorgheymans ! |
b489d7c
to
e4c42b4
Compare
Thanks @xakassi ! |
Thanks @xakassi . The current implementation does not support serializing types that are not known upfront using Considering this:
This will deserialize fine if the EDIT: So assuming book.proto :
This proto object will fail to deserialize:
|
Hi, @jorgheymans ! Maybe we should do it in a different PR as bugfix? Since this PR is just to support descriptors as files. So we could merge it if you ok with it and then concentrate on the bug. @tchiotludo , @jorgheymans what do you think about it? |
agree with @xakassi @jorgheymans any things else is working ? we can merge ? |
I will test again the PR as is tomorrow. All our topics have Any attributes
in them, so the serialization should have thrown an exception or at least
logged an error but it did not. I'll have a closer look why and report back.
|
I have configured the akhq yaml file with this:
When then browsing a topic |
Looks like your configuration is ok. I suppose if descriptor file cannot be built the error should appear in the log: And for any deserialization error we should see in logs a message: I decided that an error message in the log is enough and we should try to see a topic content at least as a string if something went wrong. That's why I return Null if I cannot deserialize with Protobuf and try just to print String: If there are no any errors from ProtobufToJsonDeserializer in the logs, I will try to reproduce your case and check. |
e4c42b4
to
766d36a
Compare
Hi, @jorgheymans ! Please, check error message ( And regarding throwing an exception if you and @tchiotludo suppose that it is preferred, I will change logic and will throw an exception. |
918aa9b
to
edd2aa2
Compare
edd2aa2
to
b6a9e96
Compare
Sorry, I do not actually fully understand should I add something on UI side for error handling (I'm not very experienced with UI :c ), but I have changed my @tchiotludo Do you mean that? Or I did something wrong? Please, check. |
Sorry, I point you to the wrong commit ! Can you fill this Thanks |
b6a9e96
to
96e7d97
Compare
Now I fill Record.exceptions with the exception. It is indeed much more better than red pop-up and we able to see the list of topics even if there are some deserialization problems with some topics. That's great! |
96e7d97
to
71db4de
Compare
71db4de
to
b0d0839
Compare
@tchiotludo maybe we can merge this? And then I will try to solve the problem with "Any" field in a next PR. And @jorgheymans will be able to test it in a normal way, since all his topics records have "Any" field. |
agreed :) thanks for the hard work |
This is an addition to First Protobuf PR.
In previous PR Protobuf descriptor files were specified in Base64 format.
Now you also can put descriptor files in a folder and specify folder and file names in configuration.