Replace schema registry TODO with explicit redirect in ProtoBufMessageDecoder#18818
Open
lazyfetch wants to merge 2 commits into
Open
Replace schema registry TODO with explicit redirect in ProtoBufMessageDecoder#18818lazyfetch wants to merge 2 commits into
lazyfetch wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18818 +/- ##
=========================================
Coverage 64.75% 64.75%
Complexity 1319 1319
=========================================
Files 3391 3391
Lines 210891 210891
Branches 33105 33105
=========================================
+ Hits 136552 136557 +5
- Misses 63320 63321 +1
+ Partials 11019 11013 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
reviewed
Jun 22, 2026
| _protoClassName = props.getOrDefault(PROTO_CLASS_NAME, ""); | ||
| InputStream descriptorFileInputStream = ProtoBufUtils.getDescriptorFileInputStream( | ||
| props.get(DESCRIPTOR_FILE_PATH)); | ||
| props.get(DESCRIPTOR_FILE_PATH)); |
xiangfu0
requested changes
Jun 22, 2026
| @Override | ||
| public void init(Map<String, String> props, Set<String> fieldsToRead, String topicName) | ||
| throws Exception { | ||
| throws Exception { |
| } | ||
|
|
||
| @Test | ||
| public void testInitThrowsHelpfulMessageWhenDescriptorFileMissing() { |
Contributor
There was a problem hiding this comment.
no point to add test for this
| //TODO: Add support for Schema Registry | ||
| // This decoder is intentionally file-based and does not support schema registry. | ||
| // For Confluent Schema Registry-backed descriptor resolution, use | ||
| // KafkaConfluentSchemaRegistryProtoBufMessageDecoder instead. |
Contributor
There was a problem hiding this comment.
use markdown style and the comments should start with ///
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed and why
Closes #18221
ProtoBufMessageDecoderhas carried a class-levelTODO: Add support for Schema Registrysince it was introduced. After reviewing the existing decoder landscape:
KafkaConfluentSchemaRegistryProtoBufMessageDecoderalready fully implementsConfluent Schema Registry-backed descriptor resolution
ProtoBufMessageDecoderis intentionally file-based and stream-format-agnostic;adding registry support here would either duplicate that logic or introduce a
Confluent dependency where there is none today
This PR takes the explicit redirect path listed in the issue scope:
descriptorFileis missing to explicitlypoint users to
KafkaConfluentSchemaRegistryProtoBufMessageDecoderTesting
Added a test to
ProtoBufMessageDecoderTestverifying that initialising thedecoder without
descriptorFilethrows anIllegalStateExceptionwhose messagereferences both the missing property name and the registry-backed decoder class.