Skip to content

Commit a89e086

Browse files
committed
Merge tag 'v1.34.0'
Synapse 1.34.0 (2021-05-17) =========================== This release deprecates the `room_invite_state_types` configuration setting. See the [upgrade notes](https://github.com/matrix-org/synapse/blob/release-v1.34.0/UPGRADE.rst#upgrading-to-v1340) for instructions on updating your configuration file to use the new `room_prejoin_state` setting. This release also deprecates the `POST /_synapse/admin/v1/rooms/<room_id>/delete` admin API route. Server administrators are encouraged to update their scripts to use the new `DELETE /_synapse/admin/v1/rooms/<room_id>` route instead. No significant changes since v1.34.0rc1. Synapse 1.34.0rc1 (2021-05-12) ============================== Features -------- - Add experimental option to track memory usage of the caches. ([\matrix-org#9881](matrix-org#9881)) - Add support for `DELETE /_synapse/admin/v1/rooms/<room_id>`. ([\matrix-org#9889](matrix-org#9889)) - Add limits to how often Synapse will GC, ensuring that large servers do not end up GC thrashing if `gc_thresholds` has not been correctly set. ([\matrix-org#9902](matrix-org#9902)) - Improve performance of sending events for worker-based deployments using Redis. ([\matrix-org#9905](matrix-org#9905), [\matrix-org#9950](matrix-org#9950), [\matrix-org#9951](matrix-org#9951)) - Improve performance after joining a large room when presence is enabled. ([\matrix-org#9910](matrix-org#9910), [\matrix-org#9916](matrix-org#9916)) - Support stable identifiers for [MSC1772](matrix-org/matrix-spec-proposals#1772) Spaces. `m.space.child` events will now be taken into account when populating the experimental spaces summary response. Please see [the upgrade notes](https://github.com/matrix-org/synapse/blob/release-v1.34.0/UPGRADE.rst#upgrading-to-v1340) if you have customised `room_invite_state_types` in your configuration. ([\matrix-org#9915](matrix-org#9915), [\matrix-org#9966](matrix-org#9966)) - Improve performance of backfilling in large rooms. ([\matrix-org#9935](matrix-org#9935)) - Add a config option to allow you to prevent device display names from being shared over federation. Contributed by @aaronraimist. ([\matrix-org#9945](matrix-org#9945)) - Update support for [MSC2946](matrix-org/matrix-spec-proposals#2946): Spaces Summary. ([\matrix-org#9947](matrix-org#9947), [\matrix-org#9954](matrix-org#9954)) Bugfixes -------- - Fix a bug introduced in v1.32.0 where the associated connection was improperly logged for SQL logging statements. ([\matrix-org#9895](matrix-org#9895)) - Correct the type hint for the `user_may_create_room_alias` method of spam checkers. It is provided a `RoomAlias`, not a `str`. ([\matrix-org#9896](matrix-org#9896)) - Fix bug where user directory could get out of sync if room visibility and membership changed in quick succession. ([\matrix-org#9910](matrix-org#9910)) - Include the `origin_server_ts` property in the experimental [MSC2946](matrix-org/matrix-spec-proposals#2946) support to allow clients to properly sort rooms. ([\matrix-org#9928](matrix-org#9928)) - Fix bugs introduced in v1.23.0 which made the PostgreSQL port script fail when run with a newly-created SQLite database. ([\matrix-org#9930](matrix-org#9930)) - Fix a bug introduced in Synapse 1.29.0 which caused `m.room_key_request` to-device messages sent from one user to another to be dropped. ([\matrix-org#9961](matrix-org#9961), [\matrix-org#9965](matrix-org#9965)) - Fix a bug introduced in v1.27.0 preventing users and appservices exempt from ratelimiting from creating rooms with many invitees. ([\matrix-org#9968](matrix-org#9968)) Updates to the Docker image --------------------------- - Add `startup_delay` to docker healthcheck to reduce waiting time for coming online and update the documentation with extra options. Contributed by @maquis196. ([\matrix-org#9913](matrix-org#9913)) Improved Documentation ---------------------- - Add `port` argument to the Postgres database sample config section. ([\matrix-org#9911](matrix-org#9911)) Deprecations and Removals ------------------------- - Mark as deprecated `POST /_synapse/admin/v1/rooms/<room_id>/delete`. ([\matrix-org#9889](matrix-org#9889)) Internal Changes ---------------- - Reduce the length of Synapse's access tokens. ([\matrix-org#5588](matrix-org#5588)) - Export jemalloc stats to Prometheus if it is being used. ([\matrix-org#9882](matrix-org#9882)) - Add type hints to presence handler. ([\matrix-org#9885](matrix-org#9885)) - Reduce memory usage of the LRU caches. ([\matrix-org#9886](matrix-org#9886)) - Add type hints to the `synapse.handlers` module. ([\matrix-org#9896](matrix-org#9896)) - Time response time for external cache requests. ([\matrix-org#9904](matrix-org#9904)) - Minor fixes to the `make_full_schema.sh` script. ([\matrix-org#9931](matrix-org#9931)) - Move database schema files into a common directory. ([\matrix-org#9932](matrix-org#9932)) - Add debug logging for lost/delayed to-device messages. ([\matrix-org#9959](matrix-org#9959))
2 parents 06bb07b + 13b0673 commit a89e086

File tree

1,000 files changed

+11261
-4880
lines changed

Some content is hidden

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

1,000 files changed

+11261
-4880
lines changed

.buildkite/scripts/create_postgres_db.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

.buildkite/scripts/postgres_exec.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env python
2+
# Copyright 2019 The Matrix.org Foundation C.I.C.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
import sys
17+
18+
import psycopg2
19+
20+
# a very simple replacment for `psql`, to make up for the lack of the postgres client
21+
# libraries in the synapse docker image.
22+
23+
# We use "postgres" as a database because it's bound to exist and the "synapse" one
24+
# doesn't exist yet.
25+
db_conn = psycopg2.connect(
26+
user="postgres", host="postgres", password="postgres", dbname="postgres"
27+
)
28+
db_conn.autocommit = True
29+
cur = db_conn.cursor()
30+
for c in sys.argv[1:]:
31+
cur.execute(c)

.buildkite/scripts/test_old_deps.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/usr/bin/env bash
22

3-
# this script is run by buildkite in a plain `xenial` container; it installs the
4-
# minimal requirements for tox and hands over to the py35-old tox environment.
3+
# this script is run by buildkite in a plain `bionic` container; it installs the
4+
# minimal requirements for tox and hands over to the py3-old tox environment.
55

66
set -ex
77

88
apt-get update
9-
apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
9+
apt-get install -y python3 python3-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
1010

1111
export LANG="C.UTF-8"
1212

1313
# Prevent virtualenv from auto-updating pip to an incompatible version
1414
export VIRTUALENV_NO_DOWNLOAD=1
1515

16-
exec tox -e py35-old,combine
16+
exec tox -e py3-old,combine

.buildkite/scripts/test_synapse_port_db.sh

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22
#
3-
# Test script for 'synapse_port_db', which creates a virtualenv, installs Synapse along
4-
# with additional dependencies needed for the test (such as coverage or the PostgreSQL
5-
# driver), update the schema of the test SQLite database and run background updates on it,
6-
# create an empty test database in PostgreSQL, then run the 'synapse_port_db' script to
7-
# test porting the SQLite database to the PostgreSQL database (with coverage).
3+
# Test script for 'synapse_port_db'.
4+
# - sets up synapse and deps
5+
# - runs the port script on a prepopulated test sqlite db
6+
# - also runs it against an new sqlite db
7+
88

99
set -xe
1010
cd `dirname $0`/../..
@@ -22,15 +22,32 @@ echo "--- Generate the signing key"
2222
# Generate the server's signing key.
2323
python -m synapse.app.homeserver --generate-keys -c .buildkite/sqlite-config.yaml
2424

25-
echo "--- Prepare the databases"
25+
echo "--- Prepare test database"
2626

2727
# Make sure the SQLite3 database is using the latest schema and has no pending background update.
2828
scripts-dev/update_database --database-config .buildkite/sqlite-config.yaml
2929

3030
# Create the PostgreSQL database.
31-
./.buildkite/scripts/create_postgres_db.py
31+
./.buildkite/scripts/postgres_exec.py "CREATE DATABASE synapse"
32+
33+
echo "+++ Run synapse_port_db against test database"
34+
coverage run scripts/synapse_port_db --sqlite-database .buildkite/test_db.db --postgres-config .buildkite/postgres-config.yaml
35+
36+
#####
37+
38+
# Now do the same again, on an empty database.
39+
40+
echo "--- Prepare empty SQLite database"
41+
42+
# we do this by deleting the sqlite db, and then doing the same again.
43+
rm .buildkite/test_db.db
44+
45+
scripts-dev/update_database --database-config .buildkite/sqlite-config.yaml
3246

33-
echo "+++ Run synapse_port_db"
47+
# re-create the PostgreSQL database.
48+
./.buildkite/scripts/postgres_exec.py \
49+
"DROP DATABASE synapse" \
50+
"CREATE DATABASE synapse"
3451

35-
# Run the script
52+
echo "+++ Run synapse_port_db against empty database"
3653
coverage run scripts/synapse_port_db --sqlite-database .buildkite/test_db.db --postgres-config .buildkite/postgres-config.yaml

0 commit comments

Comments
 (0)