-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix installing from a readonly copy of synapse #866
Conversation
It seems that, as of pip 20.1, pip likes to do an in-tree build of synapse when you install it, which is pretty nasty when pip is running in a docker image. We can work around this by copying the bits we need into a tarball and installing from that. Ultimately I'd like to change the build pipelines to build a wheel upfront, and use that for the sytest builds, which will be a more accurate representation of how most people install synapse, but this is a prerequisite.
(worth noting that this only becomes a problem if/when we rebuild the sytest-synapse docker images) |
scripts/synapse_sytest.sh
Outdated
#su -c psql postgres <<< "show config_file" | ||
#su -c psql postgres <<< "show max_connections" | ||
#su -c psql postgres <<< "show full_page_writes" | ||
#su -c psql postgres <<< "show fsync" |
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.
Should we remove these if they're not useful?
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.
done in 0165ef9
@@ -110,6 +110,24 @@ elif [ -n "$POSTGRES" ]; then | |||
|
|||
fi | |||
|
|||
# default value for SYNAPSE_SOURCE | |||
: ${SYNAPSE_SOURCE:=/src} |
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.
Neat, did not know this about bash. (https://wiki.bash-hackers.org/syntax/pe#assign_a_default_value if anyone else doesn't know what this does)
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.
Looks plausible. See the minor comments.
It seems that, as of pip 20.1, pip likes to do an in-tree build of synapse when you install it, which is pretty nasty when pip is running in a docker image. We can work around this by copying the bits we need into a tarball and installing from that. Ultimately I'd like to change the build pipelines to build a wheel upfront, and use that for the sytest builds, which will be a more accurate representation of how most people install synapse, but this is a prerequisite.
* release-v1.14.0: Add API environment variable for Dendrite monolith (#877) Use /sync not /events Use /sync not /events Use /sync not /events for test 'Outbound federation can request missing events' Review comments Fix race in 'Outbound federation can backfill events' Deflake guest user test (#871) Pass through DENDRITE_TRACE_ env vars to the dendrite binary Fix installing from a readonly copy of synapse (#866) Remove race condition in dendrite Remove debug More /sync less /events Use /sync not /events to fetch data
It seems that, as of pip 20.1, pip likes to do an in-tree build of synapse when
you install it, which is pretty nasty when pip is running in a docker image.
We can work around this by copying the bits we need into a tarball and
installing from that. Ultimately I'd like to change the build pipelines to
build a wheel upfront, and use that for the sytest builds, which will be a more
accurate representation of how most people install synapse, but this is a
prerequisite.
See also: https://discuss.python.org/t/installing-from-a-read-only-source/4115/3