-
Notifications
You must be signed in to change notification settings - Fork 17
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 support for native ETCD distributed locks #122
Conversation
Codecov Report
@@ Coverage Diff @@
## master #122 +/- ##
==========================================
+ Coverage 98.35% 98.45% +0.09%
==========================================
Files 24 29 +5
Lines 1521 1614 +93
==========================================
+ Hits 1496 1589 +93
Misses 25 25
Continue to review full report at Codecov.
|
Grpc was being kept at 1.6.0, which does not support ruby 2.5.0. Since that important for us, update to 1.17.0 and solve issue with deadline in spec by using `#from_relative_time` provided by `GRPC::Core::TimeConsts` instead of our own implementation. Also provide rake file with task to download etcd and improve travis config to test more configurations.
Add support ruby 250
If this is merged, #115 can be closed since this fixes the same issue. |
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.
Small changes need with the readme, but otherwise looks solid.
Fixed. |
Nice work! |
Hi Shaun,
as promised.
One new test case is commented out as it's failing, this is because you have a sophisticated helper in place which I wanted to leverage but which cannot be used for the
lock
gRPC call (obviously it will time out, because it's locked from the previous call in the same helper call). I don't know the proper Ruby way of making this work (unlocking in the helper), so I was hoping you would have the capacity to fix that one test case, or at least provide some hints how to do it.I've done extensive local testing and everything seems to work well. The semantics of the locking/unlocking are really simple, as the RPC call will fail, or a time-out will occur, or the locking/unlocking has succeeded. Still this deserves a thorough examination, because I'm not much of a Ruby programmer and have been fighting with the tools. (For example, I did not find a way to convince gRPC compiler to generate relative requires, so I had to fix them manually.)
One more note, most pieces of protobuf code were taken from the official ETCD github repo, but it's not mentioned anywhere. (But I suspect that's the case for other protobuf code in the gem as well.)
Please let me know if I can do more.
David