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
Chewy / Elastic search version update #26399
base: main
Are you sure you want to change the base?
Conversation
IIRC Elastic support versions N and N-1 in their official libs, so we should be able to use their version 8 lib with a v7 server. The licence change is significant, but in practice it only impacts you if you embed ES, or offer it as a service, which should not impact any Mastodon admin or user. |
9609f76
to
d13c590
Compare
Thanks, good to know. I'll keep this PR focused on getting the 8.x client libs from the gems working against a running 7.x ES server cluster. |
d13c590
to
f3d706f
Compare
Rebased against main after the spec stub thing was merged in. Edited original description to strike out some not relevant concerns. I've done a little more local console testing, and these things seem ok:
Would love ideas here for what else to verify. |
Converted from Draft to ready for review because I think this might actually be fine. Would still love ideas for more things to test out (either via added specs or just local console work). Note that this PR diff currently includes a gem bump to a specicic commit ref on a PR branch, not an official chewy release. Tried to ping chewy maintainers to see if we can help get it updated. |
f3d706f
to
da968a8
Compare
c6ccb28
to
daf0b0b
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
daf0b0b
to
ff0386d
Compare
This pull request has resolved merge conflicts and is ready for review. |
ff0386d
to
3183d67
Compare
3183d67
to
0bb3025
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
0bb3025
to
c5529e2
Compare
This pull request has resolved merge conflicts and is ready for review. |
c5529e2
to
5c9208f
Compare
Bumped to elasticsearch 8.11.0 gem version. Still pointing to a chewy PR branch, not sure what to do about that - gem appears to be unmaintained maybe? |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
32a026c
to
9d2224c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #26399 +/- ##
=======================================
Coverage 85.01% 85.02%
=======================================
Files 1059 1059
Lines 28277 28286 +9
Branches 4538 4535 -3
=======================================
+ Hits 24040 24050 +10
+ Misses 3074 3073 -1
Partials 1163 1163 ☔ View full report in Codecov by Sentry. |
This pull request has resolved merge conflicts and is ready for review. |
9d2224c
to
804c403
Compare
804c403
to
06e6253
Compare
37eb60b
to
2f409ae
Compare
637aa03
to
9356a78
Compare
Possible interim path here -- looks like the ES gem in its newer 7.x releases, supports either faraday 1 or 2. If we can get Chewy (still in 7.x series) to relax it's requirement to allow newer ES7 gem, we could get a relaxed faraday req prior to ES8 update on the chewy side. Opened a PR to hopefully get discussion/approval of the idea: toptal/chewy#933 |
9356a78
to
096d09a
Compare
This is rebased/updated, but blocked on both a) the chewy version 8 support/PR; b) the chewy 7 relaxed ES version support PR. Chewy appears to be only sort of maintained at this point ... not sure how to advance this short of more actively forking or relying on a PR branch there... |
257a274
to
28ebd36
Compare
28ebd36
to
4802172
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
4802172
to
746194d
Compare
Rebased after #30157 merged. This is still pointing to the WIP PR branch for chewy 8. I'll keep monitoring that and update if/when that releases. Fortunately, we got the faraday range flexibility from the 7.x branch, so this is less pressing as a result. |
This pull request has resolved merge conflicts and is ready for review. |
As discussed here - #24209 (comment) - we are limited in our ability to update
omniauth_openid_connect
or anything else which wants to be on Faraday 2+, because chewy gem has dependency on older ES gems which are locked to Faraday 1.x.Opening this as draft to just get it moving. For now I'm pointing to an experimental branch someone has linked from this issue - toptal/chewy#847 - which has started on some basic class changes in Chewy to support changes made in the ES gems. With that alone and one small change on our side I was able to get things loading/running/passing, but there are a ton of caveats here (hence the draft status!):
There's an insistence from the official 8.x server on secure/443/https connections, which our default config does not seem to do.(not relevant: we wont update server to 8.x any time soon)I suspect we have some specs which are not correctly stubbed out … I was able to get different spec output when running -vs- not running an actual ES server locally(fixed in Avoid connecting to a running ES instance in ES search check spec #26413)I know there are licensing changes on the server side of things either in server v7 or moving from 7 to 8 and have not at all contemplated whether that matters here yet (I think it does not narrowly matter, because we're not changing the packaged Docker ES distribution, but maybe its related).(not relevant: we arent packaging server, and we will only update client libs here)All that to say, this is currently focused merely on accomplishing the upgrade at all, and needs a lot more verification of behavior (which I’ll continue on) … just wanted to open this to clarify direction here and whether this is a good path to work on (as opposed to investigating a switch to OpenSearch, and/or any other ideas to open up our Faraday update Future).