Skip to content

Commit 684db5a

Browse files
authored
Cleanup elasticsearch testing (#2464)
* Drop testing against ancient elasticsearch versions * Bump elasticsearch versions to latest of the major * Drop docker-compose.yml version * Drop unused volumes * Test against Elastic stack 9
1 parent 9751b4a commit 684db5a

12 files changed

+24
-67
lines changed

.ci/.matrix_exclude.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ exclude:
3737
FRAMEWORK: celery-5-django-5
3838
- VERSION: python-3.9
3939
FRAMEWORK: celery-5-django-5
40+
# Elasticsearch
41+
- VERSION: python-3.6
42+
FRAMEWORK: elasticsearch-9
4043
# Flask
4144
- VERSION: pypy-3
4245
FRAMEWORK: flask-0.11 # see https://github.com/pallets/flask/commit/6e46d0cd, 0.11.2 was never released

.ci/.matrix_framework.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ FRAMEWORK:
2929
- pyodbc-newest
3030
- memcached-newest
3131
- pylibmc-newest
32-
- elasticsearch-2
3332
- elasticsearch-7
3433
- elasticsearch-8
34+
- elasticsearch-9
3535
- cassandra-newest
3636
- psutil-newest
3737
#- eventlet-newest

.ci/.matrix_framework_full.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ FRAMEWORK:
6363
- psutil-5.0
6464
- psutil-4.0
6565
#- eventlet-newest
66-
- elasticsearch-2
67-
- elasticsearch-5
68-
- elasticsearch-6
6966
- elasticsearch-7
7067
- elasticsearch-8
68+
- elasticsearch-9
7169
- gevent-newest
7270
- aiohttp-3.0
7371
- aiohttp-newest

tests/docker-compose.yml

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '2.1'
2-
31
services:
42
postgres:
53
user: postgres
@@ -59,21 +57,8 @@ services:
5957
redis:
6058
image: redis
6159

62-
elasticsearch6:
63-
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.0
64-
healthcheck:
65-
test: ["CMD", "curl", "-f", "http://localhost:9200"]
66-
environment:
67-
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
68-
- "network.host="
69-
- "transport.host=127.0.0.1"
70-
- "http.host=0.0.0.0"
71-
- "xpack.security.enabled=false"
72-
volumes:
73-
- pyesdata6:/usr/share/elasticsearch/data
74-
7560
elasticsearch7:
76-
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
61+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.29
7762
healthcheck:
7863
test: ["CMD", "curl", "-f", "http://localhost:9200"]
7964
environment:
@@ -86,7 +71,7 @@ services:
8671
- pyesdata7:/usr/share/elasticsearch/data
8772

8873
elasticsearch8:
89-
image: docker.elastic.co/elasticsearch/elasticsearch:8.4.0
74+
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.6
9075
healthcheck:
9176
test: ["CMD", "curl", "-f", "http://localhost:9200"]
9277
ports:
@@ -101,31 +86,21 @@ services:
10186
volumes:
10287
- pyesdata8:/usr/share/elasticsearch/data
10388

104-
elasticsearch5:
105-
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16
106-
healthcheck:
107-
test: ["CMD", "curl", "-f", "http://localhost:9200"]
108-
environment:
109-
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
110-
- "network.host="
111-
- "transport.host=127.0.0.1"
112-
- "http.host=0.0.0.0"
113-
- "xpack.security.enabled=false"
114-
volumes:
115-
- pyesdata5:/usr/share/elasticsearch/data
116-
117-
elasticsearch2:
118-
image: elasticsearch:2
89+
elasticsearch9:
90+
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.0
11991
healthcheck:
12092
test: ["CMD", "curl", "-f", "http://localhost:9200"]
93+
ports:
94+
- "9200:9200"
12195
environment:
12296
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
123-
- "network.host="
97+
- "network.host=_site_"
12498
- "transport.host=127.0.0.1"
12599
- "http.host=0.0.0.0"
126100
- "xpack.security.enabled=false"
101+
- "action.destructive_requires_name=false" # allow for easy cleanup by calling DELETE *
127102
volumes:
128-
- pyesdata2:/usr/share/elasticsearch/data
103+
- pyesdata9:/usr/share/elasticsearch/data
129104

130105
mssql:
131106
image: mcr.microsoft.com/mssql/server
@@ -185,11 +160,9 @@ services:
185160
run_tests:
186161
image: ${REGISTRY:-elasticobservability}/${IMAGE_NAME:-apm-agent-python-testing}:${PYTHON_VERSION}
187162
environment:
163+
ES_9_URL: 'http://elasticsearch9:9200'
188164
ES_8_URL: 'http://elasticsearch8:9200'
189165
ES_7_URL: 'http://elasticsearch7:9200'
190-
ES_6_URL: 'http://elasticsearch6:9200'
191-
ES_5_URL: 'http://elasticsearch5:9200'
192-
ES_2_URL: 'http://elasticsearch2:9200'
193166

194167

195168
volumes:
@@ -209,11 +182,7 @@ volumes:
209182
driver: local
210183
pyesdata8:
211184
driver: local
212-
pyesdata6:
213-
driver: local
214-
pyesdata5:
215-
driver: local
216-
pyesdata2:
185+
pyesdata9:
217186
driver: local
218187
pycassandradata3:
219188
driver: local

tests/requirements/reqs-elasticsearch-2.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/requirements/reqs-elasticsearch-5.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/requirements/reqs-elasticsearch-6.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
elasticsearch>=9.0,<10.0
2+
aiohttp
3+
-r reqs-base.txt

tests/scripts/envs/elasticsearch-2.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/scripts/envs/elasticsearch-5.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)