Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit c71b7e3

Browse files
committed
Merge tag 'v1.74.0' into merge-1.74
Synapse 1.74.0 (2022-12-20) =========================== Improved Documentation ---------------------- - Add release note and update documentation regarding optional ICU support in user search. ([\matrix-org#14712](matrix-org#14712)) Synapse 1.74.0rc1 (2022-12-13) ============================== Features -------- - Improve user search for international display names. ([\matrix-org#14464](matrix-org#14464)) - Stop using deprecated `keyIds` parameter when calling `/_matrix/key/v2/server`. ([\matrix-org#14490](matrix-org#14490), [\matrix-org#14525](matrix-org#14525)) - Add new `push.enabled` config option to allow opting out of push notification calculation. ([\matrix-org#14551](matrix-org#14551), [\matrix-org#14619](matrix-org#14619)) - Advertise support for Matrix 1.5 on `/_matrix/client/versions`. ([\matrix-org#14576](matrix-org#14576)) - Improve opentracing and logging for to-device message handling. ([\matrix-org#14598](matrix-org#14598)) - Allow selecting "prejoin" events by state keys in addition to event types. ([\matrix-org#14642](matrix-org#14642)) Bugfixes -------- - Fix a long-standing bug where a device list update might not be sent to clients in certain circumstances. ([\matrix-org#14435](matrix-org#14435), [\matrix-org#14592](matrix-org#14592), [\matrix-org#14604](matrix-org#14604)) - Suppress a spurious warning when `POST /rooms/<room_id>/<membership>/`, `POST /join/<room_id_or_alias`, or the unspecced `PUT /join/<room_id_or_alias>/<txn_id>` receive an empty HTTP request body. ([\matrix-org#14600](matrix-org#14600)) - Return spec-compliant JSON errors when unknown endpoints are requested. ([\matrix-org#14620](matrix-org#14620), [\matrix-org#14621](matrix-org#14621)) - Update html templates to load images over HTTPS. Contributed by @ashfame. ([\matrix-org#14625](matrix-org#14625)) - Fix a long-standing bug where the user directory would return 1 more row than requested. ([\matrix-org#14631](matrix-org#14631)) - Reject invalid read receipt requests with empty room or event IDs. Contributed by Nick @ Beeper (@Fizzadar). ([\matrix-org#14632](matrix-org#14632)) - Fix a bug introduced in Synapse 1.67.0 where not specifying a config file or a server URL would lead to the `register_new_matrix_user` script failing. ([\matrix-org#14637](matrix-org#14637)) - Fix a long-standing bug where the user directory and room/user stats might be out of sync. ([\matrix-org#14639](matrix-org#14639), [\matrix-org#14643](matrix-org#14643)) - Fix a bug introduced in Synapse 1.72.0 where the background updates to add non-thread unique indexes on receipts would fail if they were previously interrupted. ([\matrix-org#14650](matrix-org#14650)) - Improve validation of field size limits in events. ([\matrix-org#14664](matrix-org#14664)) - Fix bugs introduced in Synapse 1.55.0 and 1.69.0 where application services would not be notified of events in the correct rooms, due to stale caches. ([\matrix-org#14670](matrix-org#14670)) Improved Documentation ---------------------- - Update worker settings for `pusher` and `federation_sender` functionality. ([\matrix-org#14493](matrix-org#14493)) - Add links to third party package repositories, and point to the bug which highlights Ubuntu's out-of-date packages. ([\matrix-org#14517](matrix-org#14517)) - Remove old, incorrect minimum postgres version note and replace with a link to the [Dependency Deprecation Policy](https://matrix-org.github.io/synapse/v1.73/deprecation_policy.html). ([\matrix-org#14590](matrix-org#14590)) - Add Single-Sign On setup instructions for Mastodon-based instances. ([\matrix-org#14594](matrix-org#14594)) - Change `turn_allow_guests` example value to lowercase `true`. ([\matrix-org#14634](matrix-org#14634)) Internal Changes ---------------- - Optimise push badge count calculations. Contributed by Nick @ Beeper (@Fizzadar). ([\matrix-org#14255](matrix-org#14255)) - Faster remote room joins: stream the un-partial-stating of rooms over replication. ([\matrix-org#14473](matrix-org#14473), [\matrix-org#14474](matrix-org#14474)) - Share the `ClientRestResource` for both workers and the main process. ([\matrix-org#14528](matrix-org#14528)) - Add `--editable` flag to `complement.sh` which uses an editable install of Synapse for faster turn-around times whilst developing iteratively. ([\matrix-org#14548](matrix-org#14548)) - Faster joins: use servers list approximation to send read receipts when in partial state instead of waiting for the full state of the room. ([\matrix-org#14549](matrix-org#14549)) - Modernize unit tests configuration related to workers. ([\matrix-org#14568](matrix-org#14568)) - Bump jsonschema from 4.17.0 to 4.17.3. ([\matrix-org#14591](matrix-org#14591)) - Fix Rust lint CI. ([\matrix-org#14602](matrix-org#14602)) - Bump JasonEtco/create-an-issue from 2.5.0 to 2.8.1. ([\matrix-org#14607](matrix-org#14607)) - Alter some unit test environment parameters to decrease time spent running tests. ([\matrix-org#14610](matrix-org#14610)) - Switch to Go recommended installation method for `gotestfmt` template in CI. ([\matrix-org#14611](matrix-org#14611)) - Bump phonenumbers from 8.13.0 to 8.13.1. ([\matrix-org#14612](matrix-org#14612)) - Bump types-setuptools from 65.5.0.3 to 65.6.0.1. ([\matrix-org#14613](matrix-org#14613)) - Bump twine from 4.0.1 to 4.0.2. ([\matrix-org#14614](matrix-org#14614)) - Bump types-requests from 2.28.11.2 to 2.28.11.5. ([\matrix-org#14615](matrix-org#14615)) - Bump cryptography from 38.0.3 to 38.0.4. ([\matrix-org#14616](matrix-org#14616)) - Remove useless cargo install with apt from Dockerfile. ([\matrix-org#14636](matrix-org#14636)) - Bump certifi from 2021.10.8 to 2022.12.7. ([\matrix-org#14645](matrix-org#14645)) - Bump flake8-bugbear from 22.10.27 to 22.12.6. ([\matrix-org#14656](matrix-org#14656)) - Bump packaging from 21.3 to 22.0. ([\matrix-org#14657](matrix-org#14657)) - Bump types-pillow from 9.3.0.1 to 9.3.0.4. ([\matrix-org#14658](matrix-org#14658)) - Bump serde from 1.0.148 to 1.0.150. ([\matrix-org#14659](matrix-org#14659)) - Bump phonenumbers from 8.13.1 to 8.13.2. ([\matrix-org#14660](matrix-org#14660)) - Bump authlib from 1.1.0 to 1.2.0. ([\matrix-org#14661](matrix-org#14661)) - Move `StateFilter` to `synapse.types`. ([\matrix-org#14668](matrix-org#14668)) - Improve type hints. ([\matrix-org#14597](matrix-org#14597), [\matrix-org#14646](matrix-org#14646), [\matrix-org#14671](matrix-org#14671))
2 parents 291630e + 774e20b commit c71b7e3

File tree

189 files changed

+4117
-2181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+4117
-2181
lines changed

.ci/scripts/setup_complement_prerequisites.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ endblock
2121

2222
block Install Complement Dependencies
2323
sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev
24-
go get -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
24+
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
2525
endblock
2626

2727
block Install custom gotestfmt template

.github/workflows/latest_deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208

209209
steps:
210210
- uses: actions/checkout@v3
211-
- uses: JasonEtco/create-an-issue@5d9504915f79f9cc6d791934b8ef34f2353dd74d # v2.5.0, 2020-12-06
211+
- uses: JasonEtco/create-an-issue@77399b6110ef82b94c1c9f9f615acf9e604f7f56 # v2.5.0, 2020-12-06
212212
env:
213213
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214214
with:

.github/workflows/tests.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,29 @@ jobs:
109109
components: clippy
110110
- uses: Swatinem/rust-cache@v2
111111

112-
- run: cargo clippy
112+
- run: cargo clippy -- -D warnings
113+
114+
# We also lint against a nightly rustc so that we can lint the benchmark
115+
# suite, which requires a nightly compiler.
116+
lint-clippy-nightly:
117+
runs-on: ubuntu-latest
118+
needs: changes
119+
if: ${{ needs.changes.outputs.rust == 'true' }}
120+
121+
steps:
122+
- uses: actions/checkout@v3
123+
124+
- name: Install Rust
125+
# There don't seem to be versioned releases of this action per se: for each rust
126+
# version there is a branch which gets constantly rebased on top of master.
127+
# We pin to a specific commit for paranoia's sake.
128+
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
129+
with:
130+
toolchain: nightly-2022-12-01
131+
components: clippy
132+
- uses: Swatinem/rust-cache@v2
133+
134+
- run: cargo clippy --all-features -- -D warnings
113135

114136
lint-rustfmt:
115137
runs-on: ubuntu-latest
@@ -175,8 +197,12 @@ jobs:
175197
- run: sudo apt-get -qq install xmlsec1
176198
- name: Set up PostgreSQL ${{ matrix.job.postgres-version }}
177199
if: ${{ matrix.job.postgres-version }}
200+
# 1. Mount postgres data files onto a tmpfs in-memory filesystem to reduce overhead of docker's overlayfs layer.
201+
# 2. Expose the unix socket for postgres. This removes latency of using docker-proxy for connections.
178202
run: |
179203
docker run -d -p 5432:5432 \
204+
--tmpfs /var/lib/postgres:rw,size=6144m \
205+
--mount 'type=bind,src=/var/run/postgresql,dst=/var/run/postgresql' \
180206
-e POSTGRES_PASSWORD=postgres \
181207
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
182208
postgres:${{ matrix.job.postgres-version }}
@@ -198,10 +224,10 @@ jobs:
198224
if: ${{ matrix.job.postgres-version }}
199225
timeout-minutes: 2
200226
run: until pg_isready -h localhost; do sleep 1; done
201-
- run: poetry run trial --jobs=2 tests
227+
- run: poetry run trial --jobs=6 tests
202228
env:
203229
SYNAPSE_POSTGRES: ${{ matrix.job.database == 'postgres' || '' }}
204-
SYNAPSE_POSTGRES_HOST: localhost
230+
SYNAPSE_POSTGRES_HOST: /var/run/postgresql
205231
SYNAPSE_POSTGRES_USER: postgres
206232
SYNAPSE_POSTGRES_PASSWORD: postgres
207233
- name: Dump logs
@@ -270,7 +296,7 @@ jobs:
270296
python-version: '3.7'
271297
extras: "all test"
272298

273-
- run: poetry run trial -j2 tests
299+
- run: poetry run trial -j6 tests
274300
- name: Dump logs
275301
# Logs are most useful when the command fails, always include them.
276302
if: ${{ always() }}

.github/workflows/twisted_trunk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174

175175
steps:
176176
- uses: actions/checkout@v3
177-
- uses: JasonEtco/create-an-issue@5d9504915f79f9cc6d791934b8ef34f2353dd74d # v2.5.0, 2020-12-06
177+
- uses: JasonEtco/create-an-issue@77399b6110ef82b94c1c9f9f615acf9e604f7f56 # v2.5.0, 2020-12-06
178178
env:
179179
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180180
with:

CHANGES.md

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
1+
Synapse 1.74.0 (2022-12-20)
2+
===========================
3+
4+
Improved Documentation
5+
----------------------
6+
7+
- Add release note and update documentation regarding optional ICU support in user search. ([\#14712](https://github.com/matrix-org/synapse/issues/14712))
8+
9+
10+
Synapse 1.74.0rc1 (2022-12-13)
11+
==============================
12+
13+
Features
14+
--------
15+
16+
- Improve user search for international display names. ([\#14464](https://github.com/matrix-org/synapse/issues/14464))
17+
- Stop using deprecated `keyIds` parameter when calling `/_matrix/key/v2/server`. ([\#14490](https://github.com/matrix-org/synapse/issues/14490), [\#14525](https://github.com/matrix-org/synapse/issues/14525))
18+
- Add new `push.enabled` config option to allow opting out of push notification calculation. ([\#14551](https://github.com/matrix-org/synapse/issues/14551), [\#14619](https://github.com/matrix-org/synapse/issues/14619))
19+
- Advertise support for Matrix 1.5 on `/_matrix/client/versions`. ([\#14576](https://github.com/matrix-org/synapse/issues/14576))
20+
- Improve opentracing and logging for to-device message handling. ([\#14598](https://github.com/matrix-org/synapse/issues/14598))
21+
- Allow selecting "prejoin" events by state keys in addition to event types. ([\#14642](https://github.com/matrix-org/synapse/issues/14642))
22+
23+
24+
Bugfixes
25+
--------
26+
27+
- Fix a long-standing bug where a device list update might not be sent to clients in certain circumstances. ([\#14435](https://github.com/matrix-org/synapse/issues/14435), [\#14592](https://github.com/matrix-org/synapse/issues/14592), [\#14604](https://github.com/matrix-org/synapse/issues/14604))
28+
- Suppress a spurious warning when `POST /rooms/<room_id>/<membership>/`, `POST /join/<room_id_or_alias`, or the unspecced `PUT /join/<room_id_or_alias>/<txn_id>` receive an empty HTTP request body. ([\#14600](https://github.com/matrix-org/synapse/issues/14600))
29+
- Return spec-compliant JSON errors when unknown endpoints are requested. ([\#14620](https://github.com/matrix-org/synapse/issues/14620), [\#14621](https://github.com/matrix-org/synapse/issues/14621))
30+
- Update html templates to load images over HTTPS. Contributed by @ashfame. ([\#14625](https://github.com/matrix-org/synapse/issues/14625))
31+
- Fix a long-standing bug where the user directory would return 1 more row than requested. ([\#14631](https://github.com/matrix-org/synapse/issues/14631))
32+
- Reject invalid read receipt requests with empty room or event IDs. Contributed by Nick @ Beeper (@fizzadar). ([\#14632](https://github.com/matrix-org/synapse/issues/14632))
33+
- Fix a bug introduced in Synapse 1.67.0 where not specifying a config file or a server URL would lead to the `register_new_matrix_user` script failing. ([\#14637](https://github.com/matrix-org/synapse/issues/14637))
34+
- Fix a long-standing bug where the user directory and room/user stats might be out of sync. ([\#14639](https://github.com/matrix-org/synapse/issues/14639), [\#14643](https://github.com/matrix-org/synapse/issues/14643))
35+
- Fix a bug introduced in Synapse 1.72.0 where the background updates to add non-thread unique indexes on receipts would fail if they were previously interrupted. ([\#14650](https://github.com/matrix-org/synapse/issues/14650))
36+
- Improve validation of field size limits in events. ([\#14664](https://github.com/matrix-org/synapse/issues/14664))
37+
- Fix bugs introduced in Synapse 1.55.0 and 1.69.0 where application services would not be notified of events in the correct rooms, due to stale caches. ([\#14670](https://github.com/matrix-org/synapse/issues/14670))
38+
39+
40+
Improved Documentation
41+
----------------------
42+
43+
- Update worker settings for `pusher` and `federation_sender` functionality. ([\#14493](https://github.com/matrix-org/synapse/issues/14493))
44+
- Add links to third party package repositories, and point to the bug which highlights Ubuntu's out-of-date packages. ([\#14517](https://github.com/matrix-org/synapse/issues/14517))
45+
- Remove old, incorrect minimum postgres version note and replace with a link to the [Dependency Deprecation Policy](https://matrix-org.github.io/synapse/v1.73/deprecation_policy.html). ([\#14590](https://github.com/matrix-org/synapse/issues/14590))
46+
- Add Single-Sign On setup instructions for Mastodon-based instances. ([\#14594](https://github.com/matrix-org/synapse/issues/14594))
47+
- Change `turn_allow_guests` example value to lowercase `true`. ([\#14634](https://github.com/matrix-org/synapse/issues/14634))
48+
49+
50+
Internal Changes
51+
----------------
52+
53+
- Optimise push badge count calculations. Contributed by Nick @ Beeper (@fizzadar). ([\#14255](https://github.com/matrix-org/synapse/issues/14255))
54+
- Faster remote room joins: stream the un-partial-stating of rooms over replication. ([\#14473](https://github.com/matrix-org/synapse/issues/14473), [\#14474](https://github.com/matrix-org/synapse/issues/14474))
55+
- Share the `ClientRestResource` for both workers and the main process. ([\#14528](https://github.com/matrix-org/synapse/issues/14528))
56+
- Add `--editable` flag to `complement.sh` which uses an editable install of Synapse for faster turn-around times whilst developing iteratively. ([\#14548](https://github.com/matrix-org/synapse/issues/14548))
57+
- Faster joins: use servers list approximation to send read receipts when in partial state instead of waiting for the full state of the room. ([\#14549](https://github.com/matrix-org/synapse/issues/14549))
58+
- Modernize unit tests configuration related to workers. ([\#14568](https://github.com/matrix-org/synapse/issues/14568))
59+
- Bump jsonschema from 4.17.0 to 4.17.3. ([\#14591](https://github.com/matrix-org/synapse/issues/14591))
60+
- Fix Rust lint CI. ([\#14602](https://github.com/matrix-org/synapse/issues/14602))
61+
- Bump JasonEtco/create-an-issue from 2.5.0 to 2.8.1. ([\#14607](https://github.com/matrix-org/synapse/issues/14607))
62+
- Alter some unit test environment parameters to decrease time spent running tests. ([\#14610](https://github.com/matrix-org/synapse/issues/14610))
63+
- Switch to Go recommended installation method for `gotestfmt` template in CI. ([\#14611](https://github.com/matrix-org/synapse/issues/14611))
64+
- Bump phonenumbers from 8.13.0 to 8.13.1. ([\#14612](https://github.com/matrix-org/synapse/issues/14612))
65+
- Bump types-setuptools from 65.5.0.3 to 65.6.0.1. ([\#14613](https://github.com/matrix-org/synapse/issues/14613))
66+
- Bump twine from 4.0.1 to 4.0.2. ([\#14614](https://github.com/matrix-org/synapse/issues/14614))
67+
- Bump types-requests from 2.28.11.2 to 2.28.11.5. ([\#14615](https://github.com/matrix-org/synapse/issues/14615))
68+
- Bump cryptography from 38.0.3 to 38.0.4. ([\#14616](https://github.com/matrix-org/synapse/issues/14616))
69+
- Remove useless cargo install with apt from Dockerfile. ([\#14636](https://github.com/matrix-org/synapse/issues/14636))
70+
- Bump certifi from 2021.10.8 to 2022.12.7. ([\#14645](https://github.com/matrix-org/synapse/issues/14645))
71+
- Bump flake8-bugbear from 22.10.27 to 22.12.6. ([\#14656](https://github.com/matrix-org/synapse/issues/14656))
72+
- Bump packaging from 21.3 to 22.0. ([\#14657](https://github.com/matrix-org/synapse/issues/14657))
73+
- Bump types-pillow from 9.3.0.1 to 9.3.0.4. ([\#14658](https://github.com/matrix-org/synapse/issues/14658))
74+
- Bump serde from 1.0.148 to 1.0.150. ([\#14659](https://github.com/matrix-org/synapse/issues/14659))
75+
- Bump phonenumbers from 8.13.1 to 8.13.2. ([\#14660](https://github.com/matrix-org/synapse/issues/14660))
76+
- Bump authlib from 1.1.0 to 1.2.0. ([\#14661](https://github.com/matrix-org/synapse/issues/14661))
77+
- Move `StateFilter` to `synapse.types`. ([\#14668](https://github.com/matrix-org/synapse/issues/14668))
78+
- Improve type hints. ([\#14597](https://github.com/matrix-org/synapse/issues/14597), [\#14646](https://github.com/matrix-org/synapse/issues/14646), [\#14671](https://github.com/matrix-org/synapse/issues/14671))
79+
80+
181
Synapse 1.73.0 (2022-12-06)
282
===========================
383

@@ -23,7 +103,7 @@ Features
23103

24104
- Speed-up `/messages` with `filter_events_for_client` optimizations. ([\#14527](https://github.com/matrix-org/synapse/issues/14527))
25105
- Improve DB performance by reducing amount of data that gets read in `device_lists_changes_in_room`. ([\#14534](https://github.com/matrix-org/synapse/issues/14534))
26-
- Adds support for handling avatar in SSO OIDC login. Contributed by @ashfame. ([\#13917](https://github.com/matrix-org/synapse/issues/13917))
106+
- Add support for handling avatar in SSO OIDC login. Contributed by @ashfame. ([\#13917](https://github.com/matrix-org/synapse/issues/13917))
27107
- Move MSC3030 `/timestamp_to_event` endpoints to stable `v1` location (`/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>`, `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>`). ([\#14471](https://github.com/matrix-org/synapse/issues/14471))
28108
- Reduce database load of [Client-Server endpoints](https://spec.matrix.org/v1.5/client-server-api/#aggregations) which return bundled aggregations. ([\#14491](https://github.com/matrix-org/synapse/issues/14491), [\#14508](https://github.com/matrix-org/synapse/issues/14508), [\#14510](https://github.com/matrix-org/synapse/issues/14510))
29109
- Add unstable support for an Extensible Events room version (`org.matrix.msc1767.10`) via [MSC1767](https://github.com/matrix-org/matrix-spec-proposals/pull/1767), [MSC3931](https://github.com/matrix-org/matrix-spec-proposals/pull/3931), [MSC3932](https://github.com/matrix-org/matrix-spec-proposals/pull/3932), and [MSC3933](https://github.com/matrix-org/matrix-spec-proposals/pull/3933). ([\#14520](https://github.com/matrix-org/synapse/issues/14520), [\#14521](https://github.com/matrix-org/synapse/issues/14521), [\#14524](https://github.com/matrix-org/synapse/issues/14524))

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

debian/changelog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
matrix-synapse-py3 (1.74.0) stable; urgency=medium
2+
3+
* New Synapse release 1.74.0.
4+
5+
-- Synapse Packaging team <[email protected]> Tue, 20 Dec 2022 16:07:38 +0000
6+
7+
matrix-synapse-py3 (1.74.0~rc1) stable; urgency=medium
8+
9+
* New dependency on libicu-dev to provide improved results for user
10+
search.
11+
* New Synapse release 1.74.0rc1.
12+
13+
-- Synapse Packaging team <[email protected]> Tue, 13 Dec 2022 13:30:01 +0000
14+
115
matrix-synapse-py3 (1.73.0) stable; urgency=medium
216

317
* New Synapse release 1.73.0.

debian/control

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Build-Depends:
88
dh-virtualenv (>= 1.1),
99
libsystemd-dev,
1010
libpq-dev,
11+
libicu-dev,
12+
pkg-config,
1113
lsb-release,
1214
python3-dev,
1315
python3,

docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RUN \
4444
--mount=type=cache,target=/var/cache/apt,sharing=locked \
4545
--mount=type=cache,target=/var/lib/apt,sharing=locked \
4646
apt-get update -qq && apt-get install -yqq \
47-
build-essential cargo git libffi-dev libssl-dev \
47+
build-essential git libffi-dev libssl-dev \
4848
&& rm -rf /var/lib/apt/lists/*
4949

5050
# We install poetry in its own build stage to avoid its dependencies conflicting with
@@ -99,6 +99,8 @@ RUN \
9999
zlib1g-dev \
100100
git \
101101
curl \
102+
libicu-dev \
103+
pkg-config \
102104
&& rm -rf /var/lib/apt/lists/*
103105

104106
# Install rust and ensure its in the PATH
@@ -185,6 +187,7 @@ RUN \
185187
libwebp6 \
186188
xmlsec1 \
187189
libjemalloc2 \
190+
libicu67 \
188191
libssl-dev \
189192
openssl \
190193
&& rm -rf /var/lib/apt/lists/*

docker/Dockerfile-dhvirtualenv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ RUN apt-get update -qq -o Acquire::Languages=none \
8484
python3-venv \
8585
sqlite3 \
8686
libpq-dev \
87+
libicu-dev \
88+
pkg-config \
8789
xmlsec1
8890

8991
# Install rust and ensure it's in the PATH

docker/Dockerfile-workers

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1
22

33
ARG SYNAPSE_VERSION=latest
4+
ARG FROM=matrixdotorg/synapse:$SYNAPSE_VERSION
45

56
# first of all, we create a base image with an nginx which we can copy into the
67
# target image. For repeated rebuilds, this is much faster than apt installing
@@ -23,7 +24,7 @@ FROM debian:bullseye-slim AS deps_base
2324
FROM redis:6-bullseye AS redis_base
2425

2526
# now build the final image, based on the the regular Synapse docker image
26-
FROM matrixdotorg/synapse:$SYNAPSE_VERSION
27+
FROM $FROM
2728

2829
# Install supervisord with pip instead of apt, to avoid installing a second
2930
# copy of python.

docker/complement/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
# https://github.com/matrix-org/synapse/blob/develop/docker/README-testing.md#testing-with-postgresql-and-single-or-multi-process-synapse
88

99
ARG SYNAPSE_VERSION=latest
10+
ARG FROM=matrixdotorg/synapse-workers:$SYNAPSE_VERSION
1011

11-
FROM matrixdotorg/synapse-workers:$SYNAPSE_VERSION
12+
FROM $FROM
1213
# First of all, we copy postgres server from the official postgres image,
1314
# since for repeated rebuilds, this is much faster than apt installing
1415
# postgres each time.

docker/editable.Dockerfile

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# syntax=docker/dockerfile:1
2+
# This dockerfile builds an editable install of Synapse.
3+
#
4+
# Used by `complement.sh`. Not suitable for production use.
5+
6+
ARG PYTHON_VERSION=3.9
7+
8+
###
9+
### Stage 0: generate requirements.txt
10+
###
11+
# We hardcode the use of Debian bullseye here because this could change upstream
12+
# and other Dockerfiles used for testing are expecting bullseye.
13+
FROM docker.io/python:${PYTHON_VERSION}-slim-bullseye
14+
15+
# Install Rust and other dependencies (stolen from normal Dockerfile)
16+
# install the OS build deps
17+
RUN \
18+
--mount=type=cache,target=/var/cache/apt,sharing=locked \
19+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
20+
apt-get update -qq && apt-get install -yqq \
21+
build-essential \
22+
libffi-dev \
23+
libjpeg-dev \
24+
libpq-dev \
25+
libssl-dev \
26+
libwebp-dev \
27+
libxml++2.6-dev \
28+
libxslt1-dev \
29+
openssl \
30+
zlib1g-dev \
31+
git \
32+
curl \
33+
gosu \
34+
libjpeg62-turbo \
35+
libpq5 \
36+
libwebp6 \
37+
xmlsec1 \
38+
libjemalloc2 \
39+
&& rm -rf /var/lib/apt/lists/*
40+
ENV RUSTUP_HOME=/rust
41+
ENV CARGO_HOME=/cargo
42+
ENV PATH=/cargo/bin:/rust/bin:$PATH
43+
RUN mkdir /rust /cargo
44+
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable --profile minimal
45+
46+
47+
# Make a base copy of the editable source tree, so that we have something to
48+
# install and build now — even though it's going to be covered up by a mount
49+
# at runtime.
50+
COPY synapse /editable-src/synapse/
51+
COPY rust /editable-src/rust/
52+
# ... and what we need to `pip install`.
53+
COPY pyproject.toml poetry.lock README.rst build_rust.py Cargo.toml Cargo.lock /editable-src/
54+
55+
RUN pip install poetry
56+
RUN poetry config virtualenvs.create false
57+
RUN cd /editable-src && poetry install --extras all
58+
59+
# Make copies of useful things for inspection:
60+
# - the Rust module (must be copied to the editable source tree before startup)
61+
# - poetry.lock is useful for checking if dependencies have changed.
62+
RUN cp /editable-src/synapse/synapse_rust.abi3.so /synapse_rust.abi3.so.bak
63+
RUN cp /editable-src/poetry.lock /poetry.lock.bak
64+
65+
66+
### Extra setup from original Dockerfile
67+
COPY ./docker/start.py /start.py
68+
COPY ./docker/conf /conf
69+
70+
EXPOSE 8008/tcp 8009/tcp 8448/tcp
71+
72+
ENTRYPOINT ["/start.py"]
73+
74+
HEALTHCHECK --start-period=5s --interval=15s --timeout=5s \
75+
CMD curl -fSs http://localhost:8008/health || exit 1

docs/development/contributing_guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ The code of Synapse is written in Python 3. To do pretty much anything, you'll n
2424

2525
Synapse can connect to PostgreSQL via the [psycopg2](https://pypi.org/project/psycopg2/) Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with `sudo apt install libpq-dev`.
2626

27+
Synapse has an optional, improved user search with better Unicode support. For that you need the development package of `libicu`. On Debian or Ubuntu Linux, this can be installed with `sudo apt install libicu-dev`.
28+
2729
The source code of Synapse is hosted on GitHub. You will also need [a recent version of git](https://github.com/git-guides/install-git).
2830

2931
For some tests, you will need [a recent version of Docker](https://docs.docker.com/get-docker/).

0 commit comments

Comments
 (0)