Closed gabistoenescu closed 3 months ago
Hi @gabistoenescu,
Thanks for your detailed bug report. I was able to reproduce your issue locally.
It looks like when we deserialize Protobuf messages we use the standard JsonFormat printer.
As you have discovered, the default JSONFormat printer does not return the field when "occupied": false
.
Using a JsonFormat
printer returned by the method .includingDefaultValueFields()
seems to fix this bug for me. And this is because the default value of a bool field in protobuf is false
.
We will get a fix in for the next release. We will either make the JSONFormat printer configurable (and keep the current Printer as the default), or we will simply move towards using the includingDefaultValueFields
formatter for Protobuf.
Thanks, Tom
@wavejumper Thank you Tom
Additional clarifications - the filed omissions actually happen for all Protobuf data types with default values. So for example, fields with empty strings, int values of zero, empty arrays, etc, will be excluded when inspecting data.
Correct, and switching out the Printer
to one that prints all default values (for all types) is what we have done to fix this issue.
An update: the code change has been made, expect a release out next week.
Hi @gabistoenescu,
Just letting you know that 93.4 is out today with a fix for this bug!
Slightly related: thought it might be worth also informing you that AWS Glue Protobuf + data produce functionality is currently broken because of a transitive dependency issue between Confluent Schema + AWS Glue libraries. Unfortunately there is no resolution for this bug until the AWS Glue serdes library bumps up their dependencies to a compatible version.
If this is a feature you require, we could prioritise a AWS-glue specific build of Kpow that preferences AWS glue's dependencies (so Protobuf producing would be broken in Confluent instead basically).
If you want to carry on this conversation about AWS Glue + Protobuf please feel free to email support@factorhouse.io.
Best, Tom
Thanks for this excellent ticket @gabistoenescu 👍
Hi Tom,
Thank you for the prompt fix. In regards to the message producing functionality we're not impacted by the current Glue incompatibility since we're primarily using kpow for data visualization. I also agree with your decision to favor the Confluent integration, AWS Glue Protobuf is a lower quality library full of bugs.
Thanks, Gabriel
From: Thomas Crowley @.> Sent: Monday, August 19, 2024 11:16 PM To: factorhouse/kpow @.> Cc: gabistoenescu @.>; Mention @.> Subject: Re: [factorhouse/kpow] Fields with 'false' boolean values missing from Protobuf encoded messages (Issue #29)
Hi @gabistoenescuhttps://github.com/gabistoenescu,
Just letting you know that 93.4 is out today with a fix for this bug!
Slightly related: thought it might be worth also informing you that Protobuf + data produce functionality is currently broken because of a transitive dependency issues between Confluent Schema + AWS Glue libraries. Unfortunately there is no resolution for this bug until the AWS Glue serdes library bumps up their dependencies to a compatible version.
If this is a feature you require, we could prioritise a AWS-glue specific build of Kpow that preferences AWS glue's dependencies (so Protobuf producing would be broken in Confluent instead basically).
If you want to carry on this conversation about AWS Glue + Protobuf please feel free to email @.**@.>.
Best, Tom
— Reply to this email directly, view it on GitHubhttps://github.com/factorhouse/kpow/issues/29#issuecomment-2297983187, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARPCSXV3TEBU37GBUTIHB3ZSLGJRAVCNFSM6AAAAABMCY67S2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJXHE4DGMJYG4. You are receiving this because you were mentioned.Message ID: @.***>
Version of Kpow factorhouse/kpow-ce:93.3
Describe the bug When consuming(topic inspection) Protobuf encoded messages with boolean fields the outputted JSON values are missing those fields when their values are
false
while including them when their values aretrue
.To Reproduce Steps to reproduce the behavior:
Expected behavior Expected to always see boolean fields being displayed when consuming such messages, irrespective of their values, but fields with
false
values are omitted from the output. We know with certainty that boolean fields withfalse
values exist on many of our messages and just not displayed by "kpow" for some reason.Screenshots Message output displaying the
occupied
boolean field when its value istrue
Message output omitting the
occupied
boolean field when its value isfalse
Protobuf schema subject retrieved from schema registry
Environment: