-
Notifications
You must be signed in to change notification settings - Fork 106
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
add(scan): Add ClearResults
and DeleteKeys
gRPC methods
#8237
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.
Looks good to me but i think we might want tests. We can do all the grpc testing (including snapshots) for all grpc in a separated ticket or add tests here so the other calls can follow.
Can you make a manual test and post the output ? A manual test should be to start the server and run these calls, make sure they reply as expected.
967e1b8
to
9a30c40
Compare
I'll open an issue for adding tests for the gRPC methods, I think it's okay to add them later since the RPC methods are thin wrappers around the scan service calls.
Yep, I'll start the server from zebrad in a follow-up PR targeting this branch for the manual test. |
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Manual test of these methods: ~/github/zebra$ $HOME/go/bin/grpcurl -plaintext -import-path ./zebra-grpc/proto -proto zebra-grpc/proto/scanner.proto -d '{"keys": [""]}' '[::1]:50051' scanner.Scanner/ClearResults
{}
~/github/zebra$ $HOME/go/bin/grpcurl -plaintext -import-path ./zebra-grpc/proto -proto zebra-grpc/proto/scanner.proto -d '{"keys": [""]}' '[::1]:50051' scanner.Scanner/DeleteKeys
{}
It seems strange to have a successful response when the provided keys were not registered in the scanner, we may want to return an error in that case later. |
9a30c40
to
e78a4d7
Compare
Motivation
We want to clear results and delete keys in zebra-scan via gRPC requests.
Closes #8235
PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Solution
ScannerRPC
to call theScanService
Testing
These methods still need tests, but they're thin wrappers around scan service requests that do have tests.
Review
Anyone can review.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work
zebra-grpc