diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml b/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml index c716769f5c..987cfb17c1 100644 --- a/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml @@ -34,11 +34,6 @@ dependencies = [ instruments = [ "elasticsearch >= 2.0", ] -test = [ - "opentelemetry-instrumentation-elasticsearch[instruments]", - "elasticsearch-dsl >= 2.0", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] elasticsearch = "opentelemetry.instrumentation.elasticsearch:ElasticsearchInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt new file mode 100644 index 0000000000..216d1c0b02 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +elasticsearch==2.4.1 +elasticsearch-dsl==2.2.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-dateutil==2.8.2 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==1.26.18 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-elasticsearch diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt new file mode 100644 index 0000000000..2c51c87508 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +elasticsearch==5.5.3 +elasticsearch-dsl==5.4.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-dateutil==2.8.2 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-elasticsearch diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt new file mode 100644 index 0000000000..4bd1d0d318 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +elasticsearch==6.8.2 +elasticsearch-dsl==6.4.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-dateutil==2.8.2 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-elasticsearch diff --git a/tox.ini b/tox.ini index 6d74b45964..af58f47468 100644 --- a/tox.ini +++ b/tox.ini @@ -67,10 +67,16 @@ envlist = ; pypy3-test-instrumentation-boto ; opentelemetry-instrumentation-elasticsearch - py3{8,9,10,11}-test-instrumentation-elasticsearch-{2,6} - pypy3-test-instrumentation-elasticsearch-{2,6} - py3{8,9}-test-instrumentation-elasticsearch-5 - pypy3-test-instrumentation-elasticsearch-5 + ; FIXME: Elasticsearch >=7 causes CI workflow tests to hang, see open-telemetry/opentelemetry-python-contrib#620 + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: elasticsearch-dsl>=2.0,<3.0 elasticsearch>=2.0,<3.0 + ; 1: elasticsearch-dsl>=5.0,<6.0 elasticsearch>=5.0,<6.0 + ; 2: elasticsearch-dsl>=6.0,<7.0 elasticsearch>=6.0,<7.0 + py3{8,9,10,11}-test-instrumentation-elasticsearch-{0,2} + pypy3-test-instrumentation-elasticsearch-{0,2} + py3{8,9}-test-instrumentation-elasticsearch-1 + pypy3-test-instrumentation-elasticsearch-1 ; opentelemetry-instrumentation-falcon ; py310 does not work with falcon 1 @@ -258,17 +264,6 @@ deps = django-2: django~=2.0 django-3: django~=3.0 django-4: django>=4.0b1,<5.0 - elasticsearch-2: elasticsearch-dsl>=2.0,<3.0 - elasticsearch-2: elasticsearch>=2.0,<3.0 - elasticsearch-5: elasticsearch-dsl>=5.0,<6.0 - elasticsearch-5: elasticsearch>=5.0,<6.0 - elasticsearch-6: elasticsearch-dsl>=6.0,<7.0 - elasticsearch-6: elasticsearch>=6.0,<7.0 - ; FIXME: Elasticsearch >=7 causes CI workflow tests to hang, see open-telemetry/opentelemetry-python-contrib#620 - ; elasticsearch-7: elasticsearch-dsl>=7.0,<8.0 - ; elasticsearch-7: elasticsearch>=7.0,<8.0 - ; elasticsearch-8: elasticsearch-dsl>=8.0,<9.0 - ; elasticsearch-8: elasticsearch>=8.0,<9.0 falcon-1: falcon ==1.4.1 falcon-2: falcon >=2.0.0,<3.0.0 falcon-3: falcon >=3.0.0,<4.0.0 @@ -416,7 +411,9 @@ commands_pre = sqlalchemy-{11,14}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test] - elasticsearch-{2,5,6}: pip install {toxinidir}/opentelemetry-instrumentation[test] {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test] + elasticsearch-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt + elasticsearch-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt + elasticsearch-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt asyncio: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio[test] @@ -451,7 +448,7 @@ commands = test-instrumentation-celery: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/tests {posargs} test-instrumentation-dbapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi/tests {posargs} test-instrumentation-django-{1,2,3,4}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-django/tests {posargs} - test-instrumentation-elasticsearch-{2,5,6}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/tests {posargs} + test-instrumentation-elasticsearch-{0,1,2}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/tests {posargs} test-instrumentation-falcon-{1,2,3}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/tests {posargs} test-instrumentation-fastapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/tests {posargs} test-instrumentation-flask-{213,220,300}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/tests {posargs} @@ -574,7 +571,7 @@ commands_pre = # for your OS to install the required dependencies python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tortoiseorm[test]