From 14c3457758eca09f9ea47f2256030172d7545a4b Mon Sep 17 00:00:00 2001 From: Olivier Bado-Faustin <12731381+Badatos@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:49:08 +0100 Subject: [PATCH] Drop compatibility with ES 7 --- dockerfile-dev-with-volumes/pod-back/Dockerfile | 2 +- pod/main/configuration.json | 7 +++---- pod/main/test_settings.py | 2 +- pod/video_search/utils.py | 2 +- pod/video_search/views.py | 2 +- requirements-encode.txt | 6 +++--- requirements.txt | 2 +- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dockerfile-dev-with-volumes/pod-back/Dockerfile b/dockerfile-dev-with-volumes/pod-back/Dockerfile index d092993fc2..bd7dfad3ba 100755 --- a/dockerfile-dev-with-volumes/pod-back/Dockerfile +++ b/dockerfile-dev-with-volumes/pod-back/Dockerfile @@ -35,7 +35,7 @@ RUN mkdir /tmp/node_modules/ COPY --from=source-build-js /tmp/pod/node_modules/ /tmp/node_modules/ # TODO remove ES version - move it into env var RUN pip3 install --no-cache-dir -r requirements-conteneur.txt \ - && pip3 install elasticsearch==7.17.7 + && pip3 install elasticsearch==8.16.0 # ENTRYPOINT: COPY ./dockerfile-dev-with-volumes/pod-back/my-entrypoint-back.sh /tmp/my-entrypoint-back.sh diff --git a/pod/main/configuration.json b/pod/main/configuration.json index 295d7951eb..20b03f0fd5 100644 --- a/pod/main/configuration.json +++ b/pod/main/configuration.json @@ -3668,17 +3668,16 @@ "pod_version_init": "3.1.0" }, "ES_VERSION": { - "default_value": 7, + "default_value": 8, "description": { "en": [ "" ], "fr": [ "Version d’ElasticSearch.", - "valeurs possibles 7 ou 8 correspondant à la version du serveur Elasticsearch utilisé.", + "valeurs possibles 8 correspondant à la version du serveur Elasticsearch utilisé.", "Attention, le paquet elasticsearch-py doit correspondre à la version du serveur. ", - "Pour la 7, `pip3 install elasticsearch==7.17.7`,", - "et pour la 8, `pip3 install elasticsearch==8.8.1`.", + "pour la 8, `pip3 install elasticsearch==8.16.0`.", "Voir [elasticsearch-py.readthedocs.io](https://elasticsearch-py.readthedocs.io/)", "pour plus d’information." ] diff --git a/pod/main/test_settings.py b/pod/main/test_settings.py index a068eda8e9..6167d72c23 100644 --- a/pod/main/test_settings.py +++ b/pod/main/test_settings.py @@ -23,7 +23,7 @@ ) USE_DOCKER = True ES_URL = ["http://elasticsearch.localhost:9200/"] -ES_VERSION = 7 +ES_VERSION = 8 ES_INDEX = "pod" path = "pod/custom/settings_local.py" if os.path.exists(path): diff --git a/pod/video_search/utils.py b/pod/video_search/utils.py index 85b7605c06..bd15354e80 100644 --- a/pod/video_search/utils.py +++ b/pod/video_search/utils.py @@ -16,7 +16,7 @@ ES_INDEX = getattr(settings, "ES_INDEX", "pod") ES_TIMEOUT = getattr(settings, "ES_TIMEOUT", 30) ES_MAX_RETRIES = getattr(settings, "ES_MAX_RETRIES", 10) -ES_VERSION = getattr(settings, "ES_VERSION", 7) +ES_VERSION = getattr(settings, "ES_VERSION", 8) ES_OPTIONS = getattr(settings, "ES_OPTIONS", {}) diff --git a/pod/video_search/views.py b/pod/video_search/views.py index 1f56cb4689..dad16aba00 100644 --- a/pod/video_search/views.py +++ b/pod/video_search/views.py @@ -16,7 +16,7 @@ ES_INDEX = getattr(settings, "ES_INDEX", "pod") ES_TIMEOUT = getattr(settings, "ES_TIMEOUT", 30) ES_MAX_RETRIES = getattr(settings, "ES_MAX_RETRIES", 10) -ES_VERSION = getattr(settings, "ES_VERSION", 7) +ES_VERSION = getattr(settings, "ES_VERSION", 8) ES_OPTIONS = getattr(settings, "ES_OPTIONS", {}) diff --git a/requirements-encode.txt b/requirements-encode.txt index 9d159ddd40..18b971a427 100644 --- a/requirements-encode.txt +++ b/requirements-encode.txt @@ -1,4 +1,4 @@ -webvtt-py==0.4.5 +webvtt-py==0.5.1 celery==5.4.0 -redis==4.5.4 -requests==2.32.0 +redis==5.2.0 +requests==2.32.3 diff --git a/requirements.txt b/requirements.txt index a570173d8b..e1e7162a26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ django-cas-client==1.5.3 ldap3==2.9.1 django-simple-captcha==0.6.0 urllib3==2.2.3 -elasticsearch==7.17.7 +elasticsearch==8.16.0 djangorestframework==3.15.2 django-filter==24.3 markdown==3.4.1