-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CORE-3184] schema registry - json compatibility checks for objects #19893
[CORE-3184] schema registry - json compatibility checks for objects #19893
Conversation
support non-integer values for "multipleOf" by checking that the reminder of newer["multipleOf"]/older["multipleOf"] is close to 0.0
481db4a
to
0aa7778
Compare
force a reformat, so that next commit is only the new test case
the check is overly strict, as it requires for "not" to be present in both or neither. In principle a missing "not" can be intepreted as having a default value of false, but requiring an explicit "not" is simpler
d1fc64b
to
43daaa4
Compare
new failures in https://buildkite.com/redpanda/redpanda/builds/50530#01903cc8-b990-4d58-838d-4cee7a533b29:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/50530#01903cc8-b993-4272-be00-b919743f78d9 |
failure unrelated, as this pr is not yet wired in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice,
I think a lot of the loops might be a bit clearer with std::ranges::all_of
, but I'll leave that up to you.
} | ||
|
||
return older_it->value; | ||
}(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: The invocation can be deferred so that it's not called if it's not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
used in the next set of commits, to implement is_object_superset the first three define json::Value const& for a "true" and a "false" schema, these will be useful while checking "additionalProperties" for a "type": "object" the last two are getter for array and object that produce an empty value if the property does not exists. useful to streamline the implementation
implement "minProperties" "maxProperties" compat check for "type":"object"
this subcheck is for "additionalProperties", it will recurse if either older/newer is a schema and check compatibility.
sub check for "type": "object" on "properties". for each property in newer, check compatibility against the same property in older, or against the matching patternProperty in older, or against additionalProperties in older
subcheck for "type": "object" "patternProperties". the check is toensure that no new pattern are introduced, and that the schemas are compatible
final sub-check for "type": "object" "required" field. the check only look at "required" values that are defined in the "properties" map.
43daaa4
to
1eab55b
Compare
force push: reviews comments
I'll take a look and convert loops in the next PR for array support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
only issue is in debug
it shouldn't be caused by this pr, but after a quick search i can't find this failure in the tracker on in other nightly runs. rerunning this test |
/ci-repeat 3 skip-unit dt-repeat=10 test/rptest/tests/crl_test.py::CertificateRevocationTest.test_pp_api |
/ci-repeat 3 skip-redpanda-build skip-unit dt-repeat=10 tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_pp_api |
filed a ticket for the failure #20133 , seems unrelated |
Confirmed this was the only CI failure. Ticket created. Not cuased by this PR. |
Fixes https://redpandadata.atlassian.net/browse/CORE-4218
Fixes https://redpandadata.atlassian.net/browse/CORE-3184
Backports Required
Release Notes