Bump elasticsearch-rails to 7.2.1 for import fix (but blocks using opensearch)#3299
Bump elasticsearch-rails to 7.2.1 for import fix (but blocks using opensearch)#3299martinemde wants to merge 3 commits into
Conversation
|
Looking at the test failure. |
Codecov Report
@@ Coverage Diff @@
## master #3299 +/- ##
=======================================
Coverage 98.52% 98.52%
=======================================
Files 113 113
Lines 3390 3390
=======================================
Hits 3340 3340
Misses 50 50 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Failure is test order dependent which is a little troubling. The failure looks possibly related to the elasticsearch and faraday upgrade, but doesn't fail unless you use the seed EDIT: Even more confusing, my first run with that seed failed, the second run with that same seed passed. |
|
I think this bug only happens when the tests try to refresh an index that doesn't exist. The failure happened when trying to trigger logging before suppressing the exception. I was able to reproduce the failure one time when I did Since the default behavior in elasticsearch-model is to ignore the missing index on refresh_index, I think this was always happening. It just wasn't triggering any failures since the code in the |
Fixes a failure that blocked running the elasticsearch import rake task caused by ActiveRecord find_in_batches api change. elasticsearch-model 7.2.1 relies on an undocumented internal api change that requires elasticsearch and elasticsearch-transport to be updated at the same time as elasticsearch-rails and elasticsearch-model. Fix our elasticsearch setup for the api change from `client.transport` to `client.transport.transport`.
f2dbc41 to
374368d
Compare
|
I fixed the index not existing in #3303. |
|
Hey @simi, it looks like you've done a lot of work with elasticsearch and searchkick. Replacing the import task referenced in the contributing docs (that is currently broken) is my main goal here. If #3199 is merged, searchkick replaces that command with a searchkick command. Can I help you get that across the finish line or should we do the minor upgrade here first? |
|
@martinemde I do plan to merge Searchkick soon. Are those gems in this update still OpenSearch compatible? |
|
It seems we can't upgrade after this elastic/elasticsearch-ruby#1360 released with 7.14. |
|
Pushed a version locked to 7.13.3 (before the opensearch breaking change mentioned above). |
|
😬 Looks like the ruby 3 compatible version of elasticsearch-rails (7.2.1) uses It seems to me that if we are switching to opensearch, then we need a replacement version for open search or we have to use older versions and monkeypatch the kwargs incompatibility. |
This reverts commit a868d77.
|
I reverted to use 7.17, since it's simply broken on 7.13.3. I converted this to a draft because #3199 may inform how we progress and we may want to decide before merging this. |
|
elasticsearch-rails was removed at 01ee51b#diff-89cade48462044ee1b672dc5f4c3ec250fbd29effcd8932096a23c1283c6731fL158, closing |
Fixes a problem with running the elasticsearch import rake task. ActiveRecord find_in_batches api requires being called with kwargs, but elasticsearch-rails was only fixed to send kwargs properly in 7.2.1.