From bcd82d970174003e4230d15651ed5c9f92e449c0 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 1 Sep 2022 11:39:15 +0100 Subject: [PATCH 1/4] Bump docker image to use stable poetry version --- docker/Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index fa58ae3acb8e..be062f834cfd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -46,17 +46,8 @@ 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.14, -# 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-core==1.1.0a7" "git+https://github.com/python-poetry/poetry.git@fb13b3a676f476177f7937ffa480ee5cff9a90a5" + pip install --user poetry>=1.2.0 WORKDIR /synapse From 584ec02840ab4d2b0712de5c70c64edd9b35605d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 1 Sep 2022 11:40:09 +0100 Subject: [PATCH 2/4] Newsfile --- changelog.d/13688.docker | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/13688.docker diff --git a/changelog.d/13688.docker b/changelog.d/13688.docker new file mode 100644 index 000000000000..8935e2536fbd --- /dev/null +++ b/changelog.d/13688.docker @@ -0,0 +1 @@ +Update docker image to use a stable version of poetry. From 993252a12e69c8b78c13592b753c1dc95f9ad6fd Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 1 Sep 2022 11:42:41 +0100 Subject: [PATCH 3/4] Pin rather than lower bound --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index be062f834cfd..b87d263cff53 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -47,7 +47,7 @@ RUN \ # We install poetry in its own build stage to avoid its dependencies conflicting with # synapse's dependencies. RUN --mount=type=cache,target=/root/.cache/pip \ - pip install --user poetry>=1.2.0 + pip install --user "poetry==1.2.0" WORKDIR /synapse From 7c0cd19b6d097899d69ec5cebc8c1d81189b2584 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 1 Sep 2022 12:18:47 +0100 Subject: [PATCH 4/4] Fix export CI test Not entirely sure why this is only a problem now, but `matrix.python-version` isn't defined. --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e6d718a7c4d..49a010d9d832 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -283,7 +283,6 @@ jobs: - run: sudo apt-get -qq install xmlsec1 - uses: matrix-org/setup-python-poetry@v1 with: - python-version: ${{ matrix.python-version }} extras: "postgres" - run: .ci/scripts/test_export_data_command.sh