-
Notifications
You must be signed in to change notification settings - Fork 23
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
Search::Elasticsearch 5.x compatibility #55
Comments
Actually I did try the 5_0 client because that's the default in Search::Elasticsearch, and that was what led to me raising #48 in the first place. So the 2_0 client looks like the best bet for now. |
Thanks @pghmcfc I know the 2_0 client works for v1, and though it does seem to work (not enough tests :)) for v0 - I can't trust it as v0 is ES 0.20 and not 2.x. We can potentially use the 0_90 client conditionally for it (even though it's off by many releases as well) but after the migration of metacpan-api to ES v1 (coming soon) we'll have only one version to support and won't need this conditioning (and will be able to clean up some other version related conditions as well). I'll keep this ticket open until after the migration and then get back to it. |
a quick update: after the removal of 0.20 support I tried to upgrade and use the 2_0 client - doesn't work out of the box (failing tests), maybe something stupid but the point is that it's not fully backwards compatible and I'm reluctant of wasting time on it as I'm not yet convinced of any added value by this upgrade (please correct me if you see any). |
The MetaCPAN-Client tests all work for me, with the following changes to the dist:
|
@pghmcfc that patch doesn't work for me, with it I get errors of the form:
I'm sure it's solvable, but I'm yet not convinced there is a good enough reason to make the effort and deal with all the issues people will run into following this change. Unfortunately, ES, and in this case ES module changes come with a lot of pain and breakage so they need to be justified - so far, supporting a new version that doesn't add features we need and is optimized for an ES version we don't use is not good enough for me. Having said that, if and when we move the API to 5.x it would make total sense to upgrade. |
@mickeyn, from a downstream distributor point of view (I maintain the perl-MetaCPAN-Client package in Fedora), the current situation with the module requiring a not-latest version of S:ES is a problem because it's effectively blocking us from updating S:ES itself. I'd been looking at resolving this by being able to use the new API but removing the dependency works equally well from my point of view. Are you going to clone the bits you need of the previous S:ES into your own namespace? |
I understand the problem. but I'm afraid I can't think of a proper solution, as long as "latest" (breaking) version is not fully compatible I can't force every user to use it and then have to support every issue they encounter because of it. As I cannot guarantee the latest version of S::Es (current or future) will work nicely with my code, I rather take the approach of removing it completely as a dependency (as I know others do, given the trouble they run into with ES). I'm not cloning any of the code, but rather have created an internal scroller class for the client that will just do its own book-keeping and avoid using S:Es for that (we don't use most of its features anyway) - I hope this will resolve soon. |
Just for the record, I'm perfectly happy with a solution that removes S::ES as a dependency of MetaCPAN::Client; it resolves the issue of MetaCPAN::Client blocking S::ES updates (other dependencies of S::ES may also have issues, but that's not relevant here). |
BTW, thanks for bringing up this issue. I'm happy with the change it drove. |
@mickeyn, 2.004000 works fine for me. |
Oh, and you should be able to drop the EU::MM version requirement now you don't need fancy version range support. |
As a follow-on from #48, I have got my own usage of MetaCPAN::Client working again in conjunction with Search::Elasticsearch 5.x by installing Search-Elasticsearch-Client-2_0 and making the following changes in MetaCPAN::Client:
I've tried it successfully with both the v0 and v1 APIs. I haven't tried the 5_0 or older clients to see if they would also work. Obviously this is just a proof of concept and a proper fix would probably entail supporting different client versions, but that's currently beyond my coding ability.
The text was updated successfully, but these errors were encountered: