Skip to content

[v26.1.x] schema_registry: enforce strict validation for missing required attri…#30563

Open
vbotbuildovich wants to merge 1 commit into
redpanda-data:v26.1.xfrom
vbotbuildovich:backport-pr-30525-v26.1.x-712
Open

[v26.1.x] schema_registry: enforce strict validation for missing required attri…#30563
vbotbuildovich wants to merge 1 commit into
redpanda-data:v26.1.xfrom
vbotbuildovich:backport-pr-30525-v26.1.x-712

Conversation

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

Backport of PR #30525
Fixes: #30561,

…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)
@vbotbuildovich vbotbuildovich added this to the v26.1.x-next milestone May 20, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label May 20, 2026
@vbotbuildovich
Copy link
Copy Markdown
Collaborator Author

CI test results

test results on build#84757
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(PASS) AlterConfigMixedNodeTest test_alter_config_shadow_indexing_mixed_node {"incremental_update": false} integration https://buildkite.com/redpanda/redpanda/builds/84757#019e46be-f72c-4295-83db-d2ccab4323d8 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0000, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=AlterConfigMixedNodeTest&test_method=test_alter_config_shadow_indexing_mixed_node
FLAKY(PASS) UpgradeBackToBackTest test_upgrade_with_all_workloads {"single_upgrade": false} integration https://buildkite.com/redpanda/redpanda/builds/84757#019e46be-f72d-4f7b-82de-371332de3feb 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0085, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=UpgradeBackToBackTest&test_method=test_upgrade_with_all_workloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/redpanda kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants