From 221553ec60cce659f9d7e4e3d8bd619da9479684 Mon Sep 17 00:00:00 2001 From: Sean Quah <8349537+squahtx@users.noreply.github.com> Date: Fri, 8 Apr 2022 17:40:46 +0100 Subject: [PATCH] Work around a race condition when installing Synapse with poetry (#1240) Poetry runs multiple pip operations in parallel. Unfortunately this results in race conditions when a dependency is installed while another dependency is being up/downgraded in `scripts/synapse_sytest.sh`. Configure poetry to serialize `pip` operations. See https://github.com/matrix-org/synapse/issues/12419 Signed-off-by: Sean Quah --- docker/synapse.Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/synapse.Dockerfile b/docker/synapse.Dockerfile index 761fc942f..c9b4bf5aa 100644 --- a/docker/synapse.Dockerfile +++ b/docker/synapse.Dockerfile @@ -64,4 +64,13 @@ RUN /venv/bin/pip uninstall -q --no-cache-dir -y matrix-synapse RUN /venv/bin/pip install -q --no-cache-dir \ coverage codecov tap.py coverage_enable_subprocess +# Poetry runs multiple pip operations in parallel. Unfortunately this results +# in race conditions when a dependency is installed while another dependency +# is being up/downgraded in `scripts/synapse_sytest.sh`. Configure poetry to +# serialize `pip` operations. +# See https://github.com/matrix-org/synapse/issues/12419 +# TODO: Once poetry 1.2.0 has been released, use the `installer.max-workers` +# config option instead. +RUN poetry config experimental.new-installer false + ENTRYPOINT [ "/bin/bash", "/bootstrap.sh", "synapse" ]