[fix][broker] Use compatible Avro name validator in JsonSchemaCompatibilityCheck - #25255
Merged
codelipenghui merged 1 commit intoFeb 25, 2026
Merged
Conversation
codelipenghui
approved these changes
Feb 24, 2026
…bilityCheck Apply the same COMPATIBLE_NAME_VALIDATOR to JsonSchemaCompatibilityCheck's isAvroSchema() method to allow '$' in schema record names, matching the fix already applied to AvroSchemaBasedCompatibilityCheck, SchemaRegistryServiceImpl, and StructSchemaDataValidator in #25193. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mattisonchao
force-pushed
the
fixes.json-schema-compatible-avro-name-validator
branch
from
February 24, 2026 18:39
5f6f590 to
1d48096
Compare
lhotari
approved these changes
Feb 24, 2026
Member
|
This will only be needed to be cherry-picked in branch-4.1 since Avro 1.12 upgrade was reverted from branch-4.0. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #25255 +/- ##
=============================================
+ Coverage 37.64% 72.65% +35.00%
- Complexity 13387 34023 +20636
=============================================
Files 1902 1959 +57
Lines 151239 155418 +4179
Branches 17240 17731 +491
=============================================
+ Hits 56939 112918 +55979
+ Misses 86586 33498 -53088
- Partials 7714 9002 +1288
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Technoboy-
pushed a commit
that referenced
this pull request
Feb 26, 2026
…bilityCheck (#25255) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Motivation
Follow-up to #25193 as noted by @codelipenghui in this review comment.
JsonSchemaCompatibilityCheck.isAvroSchema()still usesnew Schema.Parser()with the defaultUTF_VALIDATOR, which rejects$in record names. This means JSON schema compatibility checks would incorrectly fail for Protobuf-derived Avro schemas containing$in nested type names.Modifications
StructSchemaDataValidator.COMPATIBLE_NAME_VALIDATORto theSchema.ParserinJsonSchemaCompatibilityCheck.isAvroSchema(), consistent with the fix already applied to:AvroSchemaBasedCompatibilityCheckSchemaRegistryServiceImplStructSchemaDataValidator$in record names are correctly recognized as valid Avro schemas in the JSON schema compatibility check path.Verifying this change
testIsAvroSchemaWithDollarSignInRecordNametest inJsonSchemaCompatibilityCheckTest.Documentation
doc-not-needed