-
Notifications
You must be signed in to change notification settings - Fork 73
[pluggable-validation / 1]: protoize conflict detection #169
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
[pluggable-validation / 1]: protoize conflict detection #169
Conversation
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
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 <[email protected]>
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 <[email protected]>
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. |
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.
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