[pluggable-validation / 1]: protoize conflict detection#169
Conversation
47f6c6a to
9db059e
Compare
Rework equality checking for unit test results using go-cmp, aiming for fewer kludges. Define a set of Strip() helpers to reduce otherwise semantically equivalent adjustments/updates to a unique canonical form and thus allowing equality checks using go-cmp/cmp.Equal(). Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
cece288 to
2385a8a
Compare
Redefine conflict detection data types using protobuf. This allows passing them to plugins over a ttrpc API. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2385a8a to
d9d8be8
Compare
|
@samuelkarp @chrishenzie In the scope of this PR, I can (and like to) take a look at if we could get completely rid of Strip() for adjustments and updates. It should be possible if we change result collection so that, instead of deep-initializing full skeletal container adjustment and update structs at the beginning, it would initialize on demand the necessary structure bits as and when needed. |
If you're okay with it, my preference would be to merge this as-is to unblock the other two PRs, and then handle that in a follow-up. |
Yes, of course. That's also fine. |
mikebrow
left a comment
There was a problem hiding this comment.
LTGM
It should be possible if we change result collection so that, instead of deep-initializing full skeletal container adjustment and update structs at the beginning, it would initialize on demand the necessary structure bits as and when needed.
SGTM +++1 for follow-up
This PR is the first in a stack which splits up #163 into multiple PRs, which collectively implement configurable restrictions using the proposed pluggable validation API and a builtin default validator plugin.
This PR reworks conflict detection using protobuf messages to provide raw information for validation.
/cc @chrishenzie