Skip to content

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

Merged
tyson-redpanda merged 2 commits into
redpanda-data:v26.1.xfrom
vbotbuildovich:backport-pr-30525-v26.1.x-712
Jun 22, 2026
Merged

[v26.1.x] schema_registry: enforce strict validation for missing required attri…#30563
tyson-redpanda merged 2 commits 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

vbotbuildovich commented May 20, 2026

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
test results on build#86098
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(PASS) DatalakeClusterRestoreTest test_restore_partition_spec {"catalog_type": "rest_hadoop", "cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/86098#019ef004-040c-487c-962a-321e8456982b 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=DatalakeClusterRestoreTest&test_method=test_restore_partition_spec

@tyson-redpanda
tyson-redpanda enabled auto-merge June 22, 2026 15:33
@tyson-redpanda
tyson-redpanda merged commit 618aaa5 into redpanda-data:v26.1.x Jun 22, 2026
16 checks passed
@tyson-redpanda tyson-redpanda modified the milestones: v26.1.x-next, v26.1.11 Jun 24, 2026
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.

4 participants