As @simi commented in https://github.com/rubygems/rubygems.org/issues/2156#issuecomment-552104969
I had problems using elasticsearch 5.1 and 5.2 docker images. I had to use 5.3+ (because of https://github.com/elastic/elasticsearch/issues/23218). Not sure if we need to update elasticsearch version as well.
The currently recommended version of elasticsearch in CONTRIBUTING.md doesn't start on some systems, including @simi's and mine.
According to the linked thread, the issue is fixed in elasticsearch 5.2.2+, and 5.3.0+. I can confirm that elasticsearch 6.8.9 does not have this issue.
I would like to request that the elasticsearch version used in production is upgraded to a version that doesn't have this issue (if not already) and that contributing instructions are updated accordingly.
I understand that production upgrades can be tricky, but hei! Asking is free!
In any case, I can also just upgrade the CONTRIBUTING instructions using the most conservative option, 5.2.2, but it's nice that the development software closely matches prod, so I figured I would open a ticket.
I鈥檒l take a look. Thanks for asking!
We're currently running 5.1 in production. I'm looking at upgrading to 5.6 (latest 5.x available) and after that we can look at a newer major version. Can you PR and test 5.6 locally?
I can test 5.6 locally.
Everything looks ok locally, also I have noticed current CI uses latest ES 5.x thus app is tested against ES 5.6.16 already (see line 191 - https://travis-ci.org/github/rubygems/rubygems.org/jobs/693436631#L191) these days.
I will also test this version locally.
Staging and production upgraded to 5.6. Can you test 6.8
now?
I've been using 6.8
locally since the first time I setup the repo for local development and it worked just fine. It didn't get in the middle, but I didn't do any testing specific to elasticsearch
, so it's probaly best if @simi tests it too :sweat_smile:.
Staging is running 6.8 now. I'll let it run for a couple days before upgrading production. Can someone submit a PR to bump it to 6.8 in dev and CI?
Let me do that now!
Something I'm observing is that we should also upgrade the ruby integrations to follow the upgrade: https://github.com/elastic/elasticsearch-ruby#compatibility.
I did an initial attempt but I see many errors: https://travis-ci.com/github/deivid-rodriguez/rubygems.org/builds/169613747.
My guess is that it's some misconfiguration in TravisCI. There's no longer an elasticsearch-6.x
source so it needs to be installed manually, and what I did doesn't seem to be working. Since as I said I've been using 6.x locally without issues, it might be a travis-only problem. That said, it scares me a bit that it's been working for me without upgrading elasticsearch-ruby
to the 6.x series which are supposed to be the compatibility series for elasticsearch 6.x.
So, I'm a bit lost here and I'm not sure I have much time to dig in. For now I'm happy with the upgrade to 5.6 since it solves my original problem, so I'll make a PR to at least match CONTRIBUTING docs to that.
I tried also bundle exec rake environment elasticsearch:import:all DIR=app/models FORCE=y
at 6.8.0. It works the same as 5.x.