Skip to content
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

fix: Correct the logic for tagged field defaults #216

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

aiven-anton
Copy link
Collaborator

This fixes an issue where the logic for tagged fields was not in sync with upstream. This is in the realm of undocumented features of the Kafka protocol, so there is no accurate documentation to reference. The closest to documentation that exists, is this section in a source code README.

There was a long discussion about this behavior on the Kafka dev mailing list.

This fixes #215.

@aiven-anton aiven-anton force-pushed the aiven-anton/fix-omit-tagged-struct-by-implicit-defaults branch from 3445a6c to aa2b82c Compare October 29, 2024 15:59
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c73175a) to head (55c4241).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #216   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        15    +1     
  Lines          854       915   +61     
  Branches       119       125    +6     
=========================================
+ Hits           854       915   +61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aiven-anton aiven-anton marked this pull request as ready for review October 29, 2024 16:02
@aiven-anton aiven-anton requested review from a team as code owners October 29, 2024 16:02
@aiven-anton aiven-anton force-pushed the aiven-anton/fix-omit-tagged-struct-by-implicit-defaults branch from aa2b82c to 8be3f71 Compare October 29, 2024 16:29
This fixes an issue where the logic for tagged fields was not in sync
with upstream. This is in the realm of undocumented features of the
Kafka protocol, so there is no accurate documentation to reference. The
closest to documentation that exists, is [this section in a source code
README][messages-readme].

[messages-readme]:https://github.com/apache/kafka/tree/4419677e06b77ed9103c179d713450b1eb7881a1/clients/src/main/resources/common/message#deserializing-messages

There was a [long discussion] about this behavior on the Kafka dev
mailing list.

[long discussion]: https://www.mail-archive.com/dev@kafka.apache.org/msg144437.html

This fixes #215.
@aiven-anton aiven-anton force-pushed the aiven-anton/fix-omit-tagged-struct-by-implicit-defaults branch from 8be3f71 to 55c4241 Compare October 30, 2024 14:13
Copy link

@gpkc gpkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gpkc gpkc added this pull request to the merge queue Nov 1, 2024
Merged via the queue into main with commit 797e8b9 Nov 1, 2024
15 checks passed
@gpkc gpkc deleted the aiven-anton/fix-omit-tagged-struct-by-implicit-defaults branch November 1, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tagged struct fields with implicit defaults should be omitted
3 participants