diff --git a/.ci/.matrix_exclude.yml b/.ci/.matrix_exclude.yml index db796ee34..309c6fb34 100644 --- a/.ci/.matrix_exclude.yml +++ b/.ci/.matrix_exclude.yml @@ -37,6 +37,9 @@ exclude: FRAMEWORK: celery-5-django-5 - VERSION: python-3.9 FRAMEWORK: celery-5-django-5 + # Elasticsearch + - VERSION: python-3.6 + FRAMEWORK: elasticsearch-9 # Flask - VERSION: pypy-3 FRAMEWORK: flask-0.11 # see https://github.com/pallets/flask/commit/6e46d0cd, 0.11.2 was never released diff --git a/.ci/.matrix_framework.yml b/.ci/.matrix_framework.yml index 8c73d0810..64d1dc8ef 100644 --- a/.ci/.matrix_framework.yml +++ b/.ci/.matrix_framework.yml @@ -29,9 +29,9 @@ FRAMEWORK: - pyodbc-newest - memcached-newest - pylibmc-newest - - elasticsearch-2 - elasticsearch-7 - elasticsearch-8 + - elasticsearch-9 - cassandra-newest - psutil-newest #- eventlet-newest diff --git a/.ci/.matrix_framework_full.yml b/.ci/.matrix_framework_full.yml index 4adb9b25e..6b3a6ea08 100644 --- a/.ci/.matrix_framework_full.yml +++ b/.ci/.matrix_framework_full.yml @@ -63,11 +63,9 @@ FRAMEWORK: - psutil-5.0 - psutil-4.0 #- eventlet-newest - - elasticsearch-2 - - elasticsearch-5 - - elasticsearch-6 - elasticsearch-7 - elasticsearch-8 + - elasticsearch-9 - gevent-newest - aiohttp-3.0 - aiohttp-newest diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 9b8e06da4..0629a045e 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,5 +1,3 @@ -version: '2.1' - services: postgres: user: postgres @@ -59,21 +57,8 @@ services: redis: image: redis - elasticsearch6: - image: docker.elastic.co/elasticsearch/elasticsearch:6.8.0 - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9200"] - environment: - - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - - "network.host=" - - "transport.host=127.0.0.1" - - "http.host=0.0.0.0" - - "xpack.security.enabled=false" - volumes: - - pyesdata6:/usr/share/elasticsearch/data - elasticsearch7: - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0 + image: docker.elastic.co/elasticsearch/elasticsearch:7.17.29 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9200"] environment: @@ -86,7 +71,7 @@ services: - pyesdata7:/usr/share/elasticsearch/data elasticsearch8: - image: docker.elastic.co/elasticsearch/elasticsearch:8.4.0 + image: docker.elastic.co/elasticsearch/elasticsearch:8.19.6 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9200"] ports: @@ -101,31 +86,21 @@ services: volumes: - pyesdata8:/usr/share/elasticsearch/data - elasticsearch5: - image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16 - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9200"] - environment: - - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - - "network.host=" - - "transport.host=127.0.0.1" - - "http.host=0.0.0.0" - - "xpack.security.enabled=false" - volumes: - - pyesdata5:/usr/share/elasticsearch/data - - elasticsearch2: - image: elasticsearch:2 + elasticsearch9: + image: docker.elastic.co/elasticsearch/elasticsearch:9.2.0 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9200"] + ports: + - "9200:9200" environment: - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - - "network.host=" + - "network.host=_site_" - "transport.host=127.0.0.1" - "http.host=0.0.0.0" - "xpack.security.enabled=false" + - "action.destructive_requires_name=false" # allow for easy cleanup by calling DELETE * volumes: - - pyesdata2:/usr/share/elasticsearch/data + - pyesdata9:/usr/share/elasticsearch/data mssql: image: mcr.microsoft.com/mssql/server @@ -185,11 +160,9 @@ services: run_tests: image: ${REGISTRY:-elasticobservability}/${IMAGE_NAME:-apm-agent-python-testing}:${PYTHON_VERSION} environment: + ES_9_URL: 'http://elasticsearch9:9200' ES_8_URL: 'http://elasticsearch8:9200' ES_7_URL: 'http://elasticsearch7:9200' - ES_6_URL: 'http://elasticsearch6:9200' - ES_5_URL: 'http://elasticsearch5:9200' - ES_2_URL: 'http://elasticsearch2:9200' volumes: @@ -209,11 +182,7 @@ volumes: driver: local pyesdata8: driver: local - pyesdata6: - driver: local - pyesdata5: - driver: local - pyesdata2: + pyesdata9: driver: local pycassandradata3: driver: local diff --git a/tests/requirements/reqs-elasticsearch-2.txt b/tests/requirements/reqs-elasticsearch-2.txt deleted file mode 100644 index e3f92c1db..000000000 --- a/tests/requirements/reqs-elasticsearch-2.txt +++ /dev/null @@ -1,2 +0,0 @@ -elasticsearch>=2.0,<3.0 --r reqs-base.txt diff --git a/tests/requirements/reqs-elasticsearch-5.txt b/tests/requirements/reqs-elasticsearch-5.txt deleted file mode 100644 index 27a0e10c0..000000000 --- a/tests/requirements/reqs-elasticsearch-5.txt +++ /dev/null @@ -1,2 +0,0 @@ -elasticsearch>=5.0,<6.0 --r reqs-base.txt diff --git a/tests/requirements/reqs-elasticsearch-6.txt b/tests/requirements/reqs-elasticsearch-6.txt deleted file mode 100644 index ad34285bc..000000000 --- a/tests/requirements/reqs-elasticsearch-6.txt +++ /dev/null @@ -1,2 +0,0 @@ -elasticsearch>=6.0,<7.0 --r reqs-base.txt diff --git a/tests/requirements/reqs-elasticsearch-9.txt b/tests/requirements/reqs-elasticsearch-9.txt new file mode 100644 index 000000000..b310cbb47 --- /dev/null +++ b/tests/requirements/reqs-elasticsearch-9.txt @@ -0,0 +1,3 @@ +elasticsearch>=9.0,<10.0 +aiohttp +-r reqs-base.txt diff --git a/tests/scripts/envs/elasticsearch-2.sh b/tests/scripts/envs/elasticsearch-2.sh deleted file mode 100644 index d9d68f99f..000000000 --- a/tests/scripts/envs/elasticsearch-2.sh +++ /dev/null @@ -1,5 +0,0 @@ -export PYTEST_MARKER="-m elasticsearch" -export ES_URL="http://elasticsearch2:9200" -export DOCKER_DEPS="elasticsearch2" -export WAIT_FOR_HOST="elasticsearch2" -export WAIT_FOR_PORT=9200 diff --git a/tests/scripts/envs/elasticsearch-5.sh b/tests/scripts/envs/elasticsearch-5.sh deleted file mode 100644 index 0ea3d5279..000000000 --- a/tests/scripts/envs/elasticsearch-5.sh +++ /dev/null @@ -1,5 +0,0 @@ -export PYTEST_MARKER="-m elasticsearch" -export ES_URL="http://elasticsearch5:9200" -export DOCKER_DEPS="elasticsearch5" -export WAIT_FOR_HOST="elasticsearch5" -export WAIT_FOR_PORT=9200 diff --git a/tests/scripts/envs/elasticsearch-6.sh b/tests/scripts/envs/elasticsearch-6.sh deleted file mode 100644 index fb4aa19b0..000000000 --- a/tests/scripts/envs/elasticsearch-6.sh +++ /dev/null @@ -1,5 +0,0 @@ -export PYTEST_MARKER="-m elasticsearch" -export ES_URL="http://elasticsearch6:9200" -export DOCKER_DEPS="elasticsearch6" -export WAIT_FOR_HOST="elasticsearch6" -export WAIT_FOR_PORT=9200 diff --git a/tests/scripts/envs/elasticsearch-9.sh b/tests/scripts/envs/elasticsearch-9.sh new file mode 100644 index 000000000..dc64a205b --- /dev/null +++ b/tests/scripts/envs/elasticsearch-9.sh @@ -0,0 +1,5 @@ +export PYTEST_MARKER="-m elasticsearch" +export ES_URL="http://elasticsearch9:9200" +export DOCKER_DEPS="elasticsearch9" +export WAIT_FOR_HOST="elasticsearch9" +export WAIT_FOR_PORT=9200