From 4f53d7640b37af482173224332658df7af72a556 Mon Sep 17 00:00:00 2001 From: Jan Ullrich Date: Fri, 5 Jan 2024 15:59:04 +0000 Subject: [PATCH] chore: switch to a minimal requirements file The old requirements file was bloated and not used by the docker image. We only installed required dependencies as a transitive dependencies. This setup should allow for code completion and better dependency management for the locust containers. --- .github/workflows/lpt-locust.yaml | 4 +-- test/lpt-locust/Dockerfile | 2 +- test/lpt-locust/requirements.txt | 39 ---------------------------- test/lpt-locust/src/requirements.txt | 4 +++ 4 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 test/lpt-locust/requirements.txt create mode 100644 test/lpt-locust/src/requirements.txt diff --git a/.github/workflows/lpt-locust.yaml b/.github/workflows/lpt-locust.yaml index 95eac6f05..4c049dbd8 100644 --- a/.github/workflows/lpt-locust.yaml +++ b/.github/workflows/lpt-locust.yaml @@ -31,9 +31,9 @@ jobs: with: python-version: '3.11' cache: 'pip' - cache-dependency-path: 'test/lpt-locust/requirements.txt' + cache-dependency-path: 'test/lpt-locust/src/requirements.txt' - name: 👨🏻‍💻 Install dependencies - run: pip install -r test/lpt-locust/requirements.txt + run: pip install -r test/lpt-locust/src/requirements.txt - name: 📋 Generate license report working-directory: ./test/lpt-locust run: | diff --git a/test/lpt-locust/Dockerfile b/test/lpt-locust/Dockerfile index c628fb86b..439f3b1d5 100644 --- a/test/lpt-locust/Dockerfile +++ b/test/lpt-locust/Dockerfile @@ -1,4 +1,4 @@ FROM locustio/locust:2.16.1 -RUN pip3 install kubernetes COPY src /locust-config +RUN pip3 install -r /locust-config/requirements.txt ENV LOCUST_LOCUSTFILE /locust-config/locustfile.py diff --git a/test/lpt-locust/requirements.txt b/test/lpt-locust/requirements.txt deleted file mode 100644 index 9fe80a6f3..000000000 --- a/test/lpt-locust/requirements.txt +++ /dev/null @@ -1,39 +0,0 @@ -Brotli==1.1.0 -cachetools==5.3.1 -certifi==2023.7.22 -charset-normalizer==3.2.0 -click==8.1.7 -ConfigArgParse==1.7 -Flask==2.3.3 -Flask-BasicAuth==0.2.0 -Flask-Cors==4.0.0 -gevent==23.9.1 -geventhttpclient==2.0.10 -google-auth==2.23.2 -greenlet==2.0.2 -idna==3.4 -itsdangerous==2.1.2 -Jinja2==3.1.2 -kubernetes==28.1.0 -MarkupSafe==2.1.3 -msgpack==1.0.7 -oauthlib==3.2.2 -pip-licenses==4.3.3 -psutil==5.9.5 -PTable==0.9.2 -pyasn1==0.5.0 -pyasn1-modules==0.3.0 -python-dateutil==2.8.2 -PyYAML==6.0.1 -pyzmq==25.1.1 -requests==2.31.0 -requests-oauthlib==1.3.1 -roundrobin==0.0.4 -rsa==4.9 -six==1.16.0 -typing_extensions==4.8.0 -urllib3==2.0.5 -websocket-client==1.6.3 -Werkzeug==2.3.7 -zope.event==5.0 -zope.interface==6.0 diff --git a/test/lpt-locust/src/requirements.txt b/test/lpt-locust/src/requirements.txt new file mode 100644 index 000000000..9c12ff0b7 --- /dev/null +++ b/test/lpt-locust/src/requirements.txt @@ -0,0 +1,4 @@ +locust +oauthlib +requests-oauthlib +pip-licenses