-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow connecting to Kuzzle v2 #260
Conversation
because it's required by the API
The Travis tests fail because the dependencies are cached |
Thanks you for your pr @tsauvajon ! Actually releasing the SDK for Kuzzle v2 is gonna take a little bit more time since we have to:
Also to be fully compatible with Kuzzle v2, we need to change some methods according to this guide: https://docs.kuzzle.io/core/2/guides/upgrade-kuzzle/changes/ I'm gonna change the target branch for this PR to |
We need to overhaul this entire SDK. Probably restarting it from scratch. So many things changed in our practices and SDK APIs that I don't see how we could benefit from building upon this old one. 🤔 |
Can you be more precise? Because rewriting a SDK from scratch is gonna take time so if we decide to do it we have to be sure that's it's worth it. |
From the top of my head: how options are passed to functions by users, the fact that a lot of code in there was to be used with swig, the whole API that is somewhere between our SDK JS 5 and 6, and probably more. |
I can add a few things too. There are many cases where you can reach a deadlock, and there are race conditions. Both can be fixed without rewriting the whole thing, though. I wrote a quick test with 1 subscription and a loop adding documents. I ran my test about 20 times and it was never able to get past 80 messages before reaching a deadlock. That makes me think the SDK is probably not used by many people, otherwise they would have complained about this before. |
Hi @tsauvajon ! We just had an internal discussion and we are gonna merge your contribution, thanks again :-) Rewriting the whole SDK would had been too long and we are aware that not many people are using it. |
What does this PR do?
This PR allows an application using this SDK to connect to a Kuzzle server running on the latest version.
Several changes had to be made:
sdkName
, because of https://github.com/kuzzleio/kuzzle/blob/a301d0af145d5c78ad4fc4c09140484d500b51ae/lib/api/funnel.js#L6302.0.2
togo@2.0.2
to match the new formatgo@2.0.2
togo@3.0.0
becauseYour SDK version (2.0.2) does not match Kuzzle requirement (min: 3, max: none)
How should this be manually tested?
Follow the examples at https://docs.kuzzle.io/sdk/go/1/essentials/getting-started/ to connect to a Kuzzle server and create documents.
This should be tested in an environment that doesn't use a cached
github.com/satori/go.uuid
: either using Go Modules, or by updating/removing the dependency.Boyscout
Fixed the dependencies versions using Go Modules so dependency changes don't break things again.