[Task]: Upgrade to Elasticsearch 8.x locally
Description
We need to update to Elasticsearch 8.x as 7.x is going to be EOL this year.
Client libraries should be updated first, then we'll need to see if our documents/indexes are compatible with 8.x, then perform the update in local/dev/stage/prod envs.
We should keep backwards-compatibility with 7.x until we have upgraded all envs. SRE have their own ticket about upgrading the clusters: https://mozilla-hub.atlassian.net/browse/SVCSE-2473
Acceptance Criteria
### Milestones/checkpoints
- [ ] Client libraries are updated to 8.x
- [ ] Document/indexes are compatible
- [ ] Local dev is updated ahead of dev/stage/prod
Checks
- [x] If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"
┆Issue is synchronized with this Jira Task
Probably a Q2/Q3 thing, this should be part of the technical roadmap for the year.
Client libraries should be updated first, then we'll need to see if our documents/indexes are compatible with 8.x, then perform the update in local/dev/stage/prod envs.
I have done this locally, and managed to get it working, but there is a safer way described in ES documentation:
- Upgrade client to 7.16 or above (already the case for us)
- Set
ELASTIC_CLIENT_APIVERSIONINGin the environment. - Cluster can then be upgraded to 8.0.x
So essentially we wouldn't need to update client libraries just yet - focusing on upgrading the server bits and only then upgrade libraries later. As this is the supported path that's what I'll do.