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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CORE-1507] SR: Add support for ?verbose
compatibility checks
#18332
base: dev
Are you sure you want to change the base?
[CORE-1507] SR: Add support for ?verbose
compatibility checks
#18332
Conversation
1a2da99
to
2f889eb
Compare
force push move some compatibility code from header |
/dt |
new failures in https://buildkite.com/redpanda/redpanda/builds/48905#018f5f60-2f1f-49b5-9525-d2010401037a:
new failures in https://buildkite.com/redpanda/redpanda/builds/48905#018f5f51-1de4-47ce-b35c-e447df7d2995:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48905#018f5f60-2f1f-49b5-9525-d2010401037a ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48905#018f5f60-2f27-47c1-8a6a-c53f8393bb98 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48912#018f6055-325b-4a7f-883b-d9f53a360d48 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48962#018f65f4-a4d7-4fb0-94e8-9e3b0c3d643e ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48962#018f65f4-a4d2-4971-aa11-9112ae7a151e ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/49069#018f757f-a9d4-405c-923d-0c9527e33c52 |
2f889eb
to
cf73462
Compare
force push typo |
/ci-repeat 1 |
cf73462
to
7a95322
Compare
?verbose
compatibility checks?verbose
compatibility checks
assert result_raw.status_code == requests.codes.ok | ||
assert result_raw.json()["is_compatible"] == False | ||
|
||
self.logger.debug( | ||
"Check compatibility backward, no default, not verbose") |
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.
I know this is just a logger but I don't understand what it's supposed to mean...Writing can possibly be improved
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.
FYI - these are integration tests (i.e. not broker logs), but I can try to make it more clear on the next push.
7a95322
to
437aecb
Compare
force push improve commits, tests, remove some junk |
437aecb
to
ee92933
Compare
force push remove some cruft |
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.
Partial review up until avro - but plenty of work, hopefully mostly just a rebase of our libavro fork.
if (reader.type() == avro::Type::AVRO_ARRAY) { | ||
compat_result.merge(check_compatible( | ||
*reader.leafAt(0), *writer.leafAt(0), p / "items")); | ||
} else if (reader.hasName() && reader.name() != writer.name()) { |
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.
This check is too restrictive; it needs to handle aliases. That appears to be a recent addition to libavro, so you're in luck, to some extent.
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.
Does this set of alternatives need to be broken into a set of checks (i.e., drop the else) to record all incompatible checks?
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.
Does this set of alternatives need to be broken into a set of checks
Yeah probably. At least this one (checking the name). The strict type checks are mutually exclusive. Maybe you're right actually - we don't lose anything by breaking it all up.
// ?? - emplace an UNKNOWN error with the current path | ||
compat_result.emplace<avro_incompatibility>( | ||
std::move(p), avro_incompatibility::Type::UNKNOWN); | ||
return compat_result; |
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.
More thought required from me, I feel like this is too restrictive.
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.
Too restrictive in the sense that
a. we might discover more context later (i.e. short-circuit too soon) OR
b. the schemas might still be compatible.
To (a), that's why I added the extra checks above, so it's possible that there are more!
I do think we're guaranteed to be incompatible here though; as I understand it, Node::resolve
is meant to detect "obvious" incompatibilities like scalar type mismatch, etc. Everything below (records, enums, unions) is not detectable by Node::resolve
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
ee92933
to
371727b
Compare
force push rebase dev to account for breaking seastar change |
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
371727b
to
59d102b
Compare
force push downcase enums |
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Specifically we reed to enforce the presence of _nested_ message types. Previously we only checked at file scope. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Common test code for working with detailed compatibility info about protobuf and avro schemas.
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
59d102b
to
25c8445
Compare
/ci-repeat 1 |
This project is getting deprioritized in favor of FIPS work for at least the next couple weeks. Please direct any inquiries to myself, @aanthony-rp, or @michael-redpanda |
Some side effects of this:
std::filesystem::path
for this as a first pass, but in the end it looks fit for purpose. We could implement something similar if the cost is a concern, but I suspect most of the cost is in storing the path elements themselves, so it may be a wash. It might be nice to just not do this if verbose error tracking is not enabled.Fixes CORE-1507
Backports Required
Release Notes
Improvements
?verbose
parameter onPOST /compatibility/subjects/{subject}/versions/{version}