From ad4fbc37bf445c9e0c7dc6b40993f6d29228d766 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 24 May 2022 10:25:48 +0100 Subject: [PATCH 1/5] Fix docker images --- docker/Dockerfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ccc6a9f77849..dd2d76261d51 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -45,17 +45,11 @@ RUN \ # We install poetry in its own build stage to avoid its dependencies conflicting with # synapse's dependencies. -# We use a specific commit from poetry's master branch instead of our usual 1.1.12, -# to incorporate fixes to some bugs in `poetry export`. This commit corresponds to -# https://github.com/python-poetry/poetry/pull/5156 and -# https://github.com/python-poetry/poetry/issues/5141 ; -# without it, we generate a requirements.txt with incorrect environment markers, -# which causes necessary packages to be omitted when we `pip install`. # # NB: In poetry 1.2 `poetry export` will be moved into a plugin; we'll need to also # pip install poetry-plugin-export (https://github.com/python-poetry/poetry-plugin-export). RUN --mount=type=cache,target=/root/.cache/pip \ - pip install --user git+https://github.com/python-poetry/poetry.git@fb13b3a676f476177f7937ffa480ee5cff9a90a5 + pip install --user "poetry==1.1.3" WORKDIR /synapse From bba84913cc1843df3da34e2d5940691f3f1d99cd Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 24 May 2022 10:27:45 +0100 Subject: [PATCH 2/5] Newsfile --- changelog.d/12853.docker | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12853.docker diff --git a/changelog.d/12853.docker b/changelog.d/12853.docker new file mode 100644 index 000000000000..cad10a79cc82 --- /dev/null +++ b/changelog.d/12853.docker @@ -0,0 +1 @@ +Fix the docker file after a dependency update. From 37e8f50260a785587f1feb37272c42d052155a52 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 24 May 2022 10:35:29 +0100 Subject: [PATCH 3/5] Update to 1.1.13 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index dd2d76261d51..534d2b52e414 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -49,7 +49,7 @@ RUN \ # NB: In poetry 1.2 `poetry export` will be moved into a plugin; we'll need to also # pip install poetry-plugin-export (https://github.com/python-poetry/poetry-plugin-export). RUN --mount=type=cache,target=/root/.cache/pip \ - pip install --user "poetry==1.1.3" + pip install --user "poetry==1.1.13" WORKDIR /synapse From 9284e847ec249226ba797adda8721ffdc96762e9 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 24 May 2022 10:41:59 +0100 Subject: [PATCH 4/5] Actually pin what we want to pin, rather than just applying monkey at keyboard approach --- docker/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 534d2b52e414..a3e22a71ed8c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,13 +43,17 @@ RUN \ apt-get update && apt-get install -y git \ && rm -rf /var/lib/apt/lists/* -# We install poetry in its own build stage to avoid its dependencies conflicting with -# synapse's dependencies. +# We use a specific commit from poetry's master branch instead of our usual 1.1.12, +# to incorporate fixes to some bugs in `poetry export`. This commit corresponds to +# https://github.com/python-poetry/poetry/pull/5156 and +# https://github.com/python-poetry/poetry/issues/5141 ; +# without it, we generate a requirements.txt with incorrect environment markers, +# which causes necessary packages to be omitted when we `pip install`. # # NB: In poetry 1.2 `poetry export` will be moved into a plugin; we'll need to also # pip install poetry-plugin-export (https://github.com/python-poetry/poetry-plugin-export). RUN --mount=type=cache,target=/root/.cache/pip \ - pip install --user "poetry==1.1.13" + pip install --user "poetry-core==1.1.0a7" "git+https://github.com/python-poetry/poetry.git@fb13b3a676f476177f7937ffa480ee5cff9a90a5" WORKDIR /synapse From 4e8b44a9362bbe554ec2046052612a6e9a50d6f0 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 24 May 2022 11:09:29 +0100 Subject: [PATCH 5/5] Add back comment --- docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index a3e22a71ed8c..7af0e51f97d2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,6 +43,8 @@ RUN \ apt-get update && apt-get install -y git \ && rm -rf /var/lib/apt/lists/* +# We install poetry in its own build stage to avoid its dependencies conflicting with +# synapse's dependencies. # We use a specific commit from poetry's master branch instead of our usual 1.1.12, # to incorporate fixes to some bugs in `poetry export`. This commit corresponds to # https://github.com/python-poetry/poetry/pull/5156 and