-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Pin poetry.core in Docker images #12853
Changes from 4 commits
ad4fbc3
bba8491
37e8f50
9284e84
4e8b44a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix the docker file after a dependency update. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,6 @@ 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this comment is still correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. woops |
||
# 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 | ||
|
@@ -55,7 +53,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 git+https://github.com/python-poetry/poetry.git@fb13b3a676f476177f7937ffa480ee5cff9a90a5 | ||
pip install --user "poetry-core==1.1.0a7" "git+https://github.com/python-poetry/poetry.git@fb13b3a676f476177f7937ffa480ee5cff9a90a5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember fighting with this a lot, though I can't exactly remember what this commit did for us. Probably a case of "latest master fixed it" and this was the commit at the time. I also remember that after I updated some dependency specifications in signedjson that there were suddenly fewer bugs with the export. Given that the debian image doesn't use this commit, I wonder if it might be worth trying to use the same version that the docker image uses. |
||
|
||
WORKDIR /synapse | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog entry is not very descriptive and doesn't explain why we made the change (what was broken before).
For reference, these changes are spawning from some discussion in #synapse-dev:matrix.org which discusses the
ModuleNotFoundError: No module named 'matrix_common'
errors popping up when Complement is running in CI.As far as I can tell, the dependency was missing in CI because of this reason mentioned in the room discussion:
As the issue description already mentions, the root cause might be because we didn't pin
poetry-core
before and it was pulling in a recent beta release which introduced the unexpected problem behavior. In any case, pinning topoetry-core==1.1.0a7
makes it work as expected to install all of the deps.This information should also be in the PR description. I'm not confident in my conclusion here to update it myself.