Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pip instead of using --cache-dir workaround in Synapse image #1274

Merged
merged 4 commits into from
Jul 20, 2022

Conversation

squahtx
Copy link
Contributor

@squahtx squahtx commented Jul 20, 2022

In #1271, we added a workaround for #1269, where msgpack was not
installed correctly. Remove the workaround and upgrade pip instead.


As suggested in pypa/setuptools#3457 (comment), upgrading pip does the trick.

@squahtx squahtx requested a review from a team as a code owner July 20, 2022 14:00
# `site-packages`, where Python can't find it, instead of `dist-packages`, when
# using `setuptools>=48.0.0` and the `--no-cache-dir` option.
# https://github.com/matrix-org/sytest/issues/1269
RUN ${PYTHON_VERSION} -m pip install -q --upgrade pip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be pinning the version of pip here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we didn't pin the version of pip before; the Debian repos were free to update it underneath us. So maybe not pinning this is fine?

Might be worth a comment to explain why the system pip isn't good enough for our purposes. How about:

Suggested change
RUN ${PYTHON_VERSION} -m pip install -q --upgrade pip
# Use the latest version of pip. This pulls in fixes not present in the
# pip version provided by Debian Buster. See
# https://github.com/pypa/setuptools/issues/3457#issuecomment-1190125849
RUN ${PYTHON_VERSION} -m pip install -q --upgrade pip

Copy link
Contributor Author

@squahtx squahtx Jul 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't convince myself that we should pin or not pin pip either way.
The dependencies of poetry are equally free to update underneath us. So perhaps we should always upgrade pip, in case one of them starts requiring some new pip behaviour to install correctly?

Adding a comment sounds like a good idea.

docker/synapse.Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to leave the comment to your discretion. Otherwise, looks good---many thanks!

@squahtx
Copy link
Contributor Author

squahtx commented Jul 20, 2022

Thanks for the speedy review!

@squahtx squahtx merged commit f01d85d into develop Jul 20, 2022
@squahtx squahtx deleted the squah/fix_synapse_docker_build_2 branch July 20, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants