[v26.1.x] schema_registry: enforce strict validation for missing required attri…#30563
Open
vbotbuildovich wants to merge 1 commit into
Open
[v26.1.x] schema_registry: enforce strict validation for missing required attri…#30563vbotbuildovich wants to merge 1 commit into
vbotbuildovich wants to merge 1 commit into
Conversation
…butes The `is_object_required_superset` function in the JSON schema validator contained a bug where `std::views::filter` was incorrectly dropping missing required fields during compatibility checks. This allowed schemas with missing required attributes to falsely pass validation. This commit removes the faulty filter to strictly enforce superset validation. If a reader schema demands a required attribute that the writer schema lacks (and does not provide a default for), the validator now correctly identifies the incompatibility. Additionally, updated the `test_json_compat_messages` test case to expect the newly exposed `required_attribute_added` error, which was previously masked by this bug. (cherry picked from commit d7c5dd5)
Collaborator
Author
CI test resultstest results on build#84757
|
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.
Backport of PR #30525
Fixes: #30561,