From e7f1c8734b24c53cddb1dd3382a8060c3b0c6251 Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Mon, 14 Aug 2023 17:03:55 -0700 Subject: [PATCH] feat: switch the load tester to pypy-3.10 SYNC-3874 --- Makefile | 2 +- tests/load/Dockerfile | 7 ++++--- tests/load/pyproject.toml | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 57dbc9e96..d4a40cc67 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ lint: load: SERVER_URL=$(STAGE_SERVER_URL) ENDPOINT_URL=$(STAGE_ENDPOINT_URL) \ - docker-compose \ + docker compose \ -f $(LOAD_TEST_DIR)/docker-compose.yml \ -p autopush-rs-load-tests \ up --scale locust_worker=1 diff --git a/tests/load/Dockerfile b/tests/load/Dockerfile index 9bd8a9eda..7936b8035 100644 --- a/tests/load/Dockerfile +++ b/tests/load/Dockerfile @@ -1,14 +1,15 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -FROM python:3.11-slim +FROM pypy:3.10-slim-bookworm LABEL org.opencontainers.image.authors="contextual-services-team@mozilla.com" # Add gcc since there are no wheels for some packages for arm64/aarch64 +# (g++/make for gevent on pypy) RUN apt-get update && apt-get install -y git && \ if [ -n "$(arch | grep 'arm64\|aarch64')" ]; then \ - apt install -y --no-install-recommends gcc python3-dev; \ + apt install -y --no-install-recommends gcc g++ make python3-dev; \ fi ENV LANG=C.UTF-8 @@ -36,4 +37,4 @@ COPY ./locustfile.py locustfile.py EXPOSE 8089 5557 USER locust -ENTRYPOINT locust -f locustfile.py --websocket_url ${SERVER_URL} --endpoint_url ${ENDPOINT_URL} \ No newline at end of file +ENTRYPOINT locust -f locustfile.py --websocket_url ${SERVER_URL} --endpoint_url ${ENDPOINT_URL} diff --git a/tests/load/pyproject.toml b/tests/load/pyproject.toml index 5c27988c4..313acb50c 100644 --- a/tests/load/pyproject.toml +++ b/tests/load/pyproject.toml @@ -6,7 +6,7 @@ profile = "black" skip_gitignore = true [tool.mypy] -python_version = "3.11" +python_version = "3.10" disable_error_code = "attr-defined" disallow_untyped_calls = false follow_imports = "normal" @@ -40,4 +40,4 @@ mypy = "^1.2.0" [build-system] requires = ["poetry-core>=1.5.1"] -build-backend = "poetry.core.masonry.api" \ No newline at end of file +build-backend = "poetry.core.masonry.api"