From bcf7f291ddc62db2818d548b654bde53a7ccdc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 13 Sep 2021 21:41:37 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=91=B7=20Add=20dependabot=20and=20ext?= =?UTF-8?q?ernal=20dependencies=20to=20get=20automated=20upgrade=20PRs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yml | 17 +++++++++++++++++ docker-images/python2.7.dockerfile | 4 +++- docker-images/python3.6.dockerfile | 4 +++- docker-images/python3.7.dockerfile | 4 +++- docker-images/python3.8-alpine.dockerfile | 4 +++- docker-images/python3.8.dockerfile | 4 +++- docker-images/python3.9.dockerfile | 4 +++- docker-images/requirements.txt | 1 + 8 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 docker-images/requirements.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..8447188e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + # GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + # Development/testing dependencies + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + # Docker image dependencies + - package-ecosystem: "pip" + directory: "/docker-images" + schedule: + interval: "daily" diff --git a/docker-images/python2.7.dockerfile b/docker-images/python2.7.dockerfile index 1f3f53d2..47c5d023 100644 --- a/docker-images/python2.7.dockerfile +++ b/docker-images/python2.7.dockerfile @@ -2,7 +2,9 @@ FROM tiangolo/uwsgi-nginx:python2.7 LABEL maintainer="Sebastian Ramirez " -RUN pip install flask +# Install requirements: uWSGI +COPY requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/python3.6.dockerfile b/docker-images/python3.6.dockerfile index 0f3b1e7c..e633872a 100644 --- a/docker-images/python3.6.dockerfile +++ b/docker-images/python3.6.dockerfile @@ -2,7 +2,9 @@ FROM tiangolo/uwsgi-nginx:python3.6 LABEL maintainer="Sebastian Ramirez " -RUN pip install flask +# Install requirements: uWSGI +COPY requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/python3.7.dockerfile b/docker-images/python3.7.dockerfile index 3b6345af..02064d95 100644 --- a/docker-images/python3.7.dockerfile +++ b/docker-images/python3.7.dockerfile @@ -2,7 +2,9 @@ FROM tiangolo/uwsgi-nginx:python3.7 LABEL maintainer="Sebastian Ramirez " -RUN pip install flask +# Install requirements: uWSGI +COPY requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/python3.8-alpine.dockerfile b/docker-images/python3.8-alpine.dockerfile index 4061e3a7..1aacbc65 100644 --- a/docker-images/python3.8-alpine.dockerfile +++ b/docker-images/python3.8-alpine.dockerfile @@ -2,7 +2,9 @@ FROM tiangolo/uwsgi-nginx:python3.8-alpine LABEL maintainer="Sebastian Ramirez " -RUN pip install flask +# Install requirements: uWSGI +COPY requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/python3.8.dockerfile b/docker-images/python3.8.dockerfile index 811ba1a8..beac3b1d 100644 --- a/docker-images/python3.8.dockerfile +++ b/docker-images/python3.8.dockerfile @@ -2,7 +2,9 @@ FROM tiangolo/uwsgi-nginx:python3.8 LABEL maintainer="Sebastian Ramirez " -RUN pip install flask +# Install requirements: uWSGI +COPY requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/python3.9.dockerfile b/docker-images/python3.9.dockerfile index 601049d4..e3ef10ff 100644 --- a/docker-images/python3.9.dockerfile +++ b/docker-images/python3.9.dockerfile @@ -2,7 +2,9 @@ FROM tiangolo/uwsgi-nginx:python3.9 LABEL maintainer="Sebastian Ramirez " -RUN pip install flask +# Install requirements: uWSGI +COPY requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/requirements.txt b/docker-images/requirements.txt new file mode 100644 index 00000000..38694cb7 --- /dev/null +++ b/docker-images/requirements.txt @@ -0,0 +1 @@ +flask==2.0.1 From 82a1ae15eea3f879e97a71532b439552736efe1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 13 Sep 2021 21:47:33 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=A7=20Update=20Dockerfiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-images/python2.7.dockerfile | 8 +++++--- docker-images/python3.6.dockerfile | 2 +- docker-images/python3.7.dockerfile | 2 +- docker-images/python3.8-alpine.dockerfile | 2 +- docker-images/python3.8.dockerfile | 2 +- docker-images/python3.9.dockerfile | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docker-images/python2.7.dockerfile b/docker-images/python2.7.dockerfile index 47c5d023..bbfac604 100644 --- a/docker-images/python2.7.dockerfile +++ b/docker-images/python2.7.dockerfile @@ -2,9 +2,11 @@ FROM tiangolo/uwsgi-nginx:python2.7 LABEL maintainer="Sebastian Ramirez " -# Install requirements: uWSGI -COPY requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt +# Install requirements +# Newer Flask versions don't support Python 2.7 (Python 2.7 reached end of life long ago) +# So for this tag just install whatever is available for Python 2.7, don't use +# Dependabot's updated requirements +RUN pip install flask # URL under which static (not modified by Python) files will be requested # They will be served by Nginx directly, without being handled by uWSGI diff --git a/docker-images/python3.6.dockerfile b/docker-images/python3.6.dockerfile index e633872a..6c114c1b 100644 --- a/docker-images/python3.6.dockerfile +++ b/docker-images/python3.6.dockerfile @@ -2,7 +2,7 @@ FROM tiangolo/uwsgi-nginx:python3.6 LABEL maintainer="Sebastian Ramirez " -# Install requirements: uWSGI +# Install requirements COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt diff --git a/docker-images/python3.7.dockerfile b/docker-images/python3.7.dockerfile index 02064d95..fc125a09 100644 --- a/docker-images/python3.7.dockerfile +++ b/docker-images/python3.7.dockerfile @@ -2,7 +2,7 @@ FROM tiangolo/uwsgi-nginx:python3.7 LABEL maintainer="Sebastian Ramirez " -# Install requirements: uWSGI +# Install requirements COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt diff --git a/docker-images/python3.8-alpine.dockerfile b/docker-images/python3.8-alpine.dockerfile index 1aacbc65..0dfa599c 100644 --- a/docker-images/python3.8-alpine.dockerfile +++ b/docker-images/python3.8-alpine.dockerfile @@ -2,7 +2,7 @@ FROM tiangolo/uwsgi-nginx:python3.8-alpine LABEL maintainer="Sebastian Ramirez " -# Install requirements: uWSGI +# Install requirements COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt diff --git a/docker-images/python3.8.dockerfile b/docker-images/python3.8.dockerfile index beac3b1d..08c36ca5 100644 --- a/docker-images/python3.8.dockerfile +++ b/docker-images/python3.8.dockerfile @@ -2,7 +2,7 @@ FROM tiangolo/uwsgi-nginx:python3.8 LABEL maintainer="Sebastian Ramirez " -# Install requirements: uWSGI +# Install requirements COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt diff --git a/docker-images/python3.9.dockerfile b/docker-images/python3.9.dockerfile index e3ef10ff..54722eb2 100644 --- a/docker-images/python3.9.dockerfile +++ b/docker-images/python3.9.dockerfile @@ -2,7 +2,7 @@ FROM tiangolo/uwsgi-nginx:python3.9 LABEL maintainer="Sebastian Ramirez " -# Install requirements: uWSGI +# Install requirements COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt From f5088b539d5f1176d793ba358e3620d0130317e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 14 Sep 2021 19:04:49 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=85=20Increase=20sleep=20time=20as=20?= =?UTF-8?q?tests=20seem=20to=20be=20flaky=20due=20to=20race=20conditions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 693467a2..4d0e7a82 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,4 +2,4 @@ set -e bash scripts/build.sh -pytest tests +SLEEP_TIME=5 pytest tests