Skip to content

Commit

Permalink
Work around a race condition when installing Synapse with poetry (#1240)
Browse files Browse the repository at this point in the history
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 matrix-org/synapse#12419

Signed-off-by: Sean Quah <[email protected]>
  • Loading branch information
squahtx authored Apr 8, 2022
1 parent 69c873b commit 221553e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker/synapse.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

0 comments on commit 221553e

Please sign in to comment.