Skip to content

Commit 07e5d1d

Browse files
committed
Merge remote-tracking branch 'upstream/release-v1.26.0' into master
2 parents 3b16068 + ccb9616 commit 07e5d1d

File tree

185 files changed

+8652
-2652
lines changed

Some content is hidden

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

185 files changed

+8652
-2652
lines changed

.buildkite/scripts/create_postgres_db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616

1717
import logging
18+
1819
from synapse.storage.engines import create_engine
1920

2021
logger = logging.getLogger("create_postgres_db")

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
_trial_temp/
1313
_trial_temp*/
1414
/out
15+
.DS_Store
1516

1617
# stuff that is likely to exist when you run a server locally
1718
/*.db
1819
/*.log
20+
/*.log.*
1921
/*.log.config
2022
/*.pid
2123
/.python-version

CHANGES.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,117 @@
1+
Synapse 1.26.0 (2021-01-27)
2+
===========================
3+
4+
This release brings a new schema version for Synapse and rolling back to a previous
5+
version is not trivial. Please review [UPGRADE.rst](UPGRADE.rst) for more details
6+
on these changes and for general upgrade guidance.
7+
8+
No significant changes since 1.26.0rc2.
9+
10+
11+
Synapse 1.26.0rc2 (2021-01-25)
12+
==============================
13+
14+
Bugfixes
15+
--------
16+
17+
- Fix receipts and account data not being sent down sync. Introduced in v1.26.0rc1. ([\#9193](https://github.com/matrix-org/synapse/issues/9193), [\#9195](https://github.com/matrix-org/synapse/issues/9195))
18+
- Fix chain cover update to handle events with duplicate auth events. Introduced in v1.26.0rc1. ([\#9210](https://github.com/matrix-org/synapse/issues/9210))
19+
20+
21+
Internal Changes
22+
----------------
23+
24+
- Add an `oidc-` prefix to any `idp_id`s which are given in the `oidc_providers` configuration. ([\#9189](https://github.com/matrix-org/synapse/issues/9189))
25+
- Bump minimum `psycopg2` version to v2.8. ([\#9204](https://github.com/matrix-org/synapse/issues/9204))
26+
27+
28+
Synapse 1.26.0rc1 (2021-01-20)
29+
==============================
30+
31+
This release brings a new schema version for Synapse and rolling back to a previous
32+
version is not trivial. Please review [UPGRADE.rst](UPGRADE.rst) for more details
33+
on these changes and for general upgrade guidance.
34+
35+
Features
36+
--------
37+
38+
- Add support for multiple SSO Identity Providers. ([\#9015](https://github.com/matrix-org/synapse/issues/9015), [\#9017](https://github.com/matrix-org/synapse/issues/9017), [\#9036](https://github.com/matrix-org/synapse/issues/9036), [\#9067](https://github.com/matrix-org/synapse/issues/9067), [\#9081](https://github.com/matrix-org/synapse/issues/9081), [\#9082](https://github.com/matrix-org/synapse/issues/9082), [\#9105](https://github.com/matrix-org/synapse/issues/9105), [\#9107](https://github.com/matrix-org/synapse/issues/9107), [\#9109](https://github.com/matrix-org/synapse/issues/9109), [\#9110](https://github.com/matrix-org/synapse/issues/9110), [\#9127](https://github.com/matrix-org/synapse/issues/9127), [\#9153](https://github.com/matrix-org/synapse/issues/9153), [\#9154](https://github.com/matrix-org/synapse/issues/9154), [\#9177](https://github.com/matrix-org/synapse/issues/9177))
39+
- During user-interactive authentication via single-sign-on, give a better error if the user uses the wrong account on the SSO IdP. ([\#9091](https://github.com/matrix-org/synapse/issues/9091))
40+
- Give the `public_baseurl` a default value, if it is not explicitly set in the configuration file. ([\#9159](https://github.com/matrix-org/synapse/issues/9159))
41+
- Improve performance when calculating ignored users in large rooms. ([\#9024](https://github.com/matrix-org/synapse/issues/9024))
42+
- Implement [MSC2176](https://github.com/matrix-org/matrix-doc/pull/2176) in an experimental room version. ([\#8984](https://github.com/matrix-org/synapse/issues/8984))
43+
- Add an admin API for protecting local media from quarantine. ([\#9086](https://github.com/matrix-org/synapse/issues/9086))
44+
- Remove a user's avatar URL and display name when deactivated with the Admin API. ([\#8932](https://github.com/matrix-org/synapse/issues/8932))
45+
- Update `/_synapse/admin/v1/users/<user_id>/joined_rooms` to work for both local and remote users. ([\#8948](https://github.com/matrix-org/synapse/issues/8948))
46+
- Add experimental support for handling to-device messages on worker processes. ([\#9042](https://github.com/matrix-org/synapse/issues/9042), [\#9043](https://github.com/matrix-org/synapse/issues/9043), [\#9044](https://github.com/matrix-org/synapse/issues/9044), [\#9130](https://github.com/matrix-org/synapse/issues/9130))
47+
- Add experimental support for handling `/keys/claim` and `/room_keys` APIs on worker processes. ([\#9068](https://github.com/matrix-org/synapse/issues/9068))
48+
- Add experimental support for handling `/devices` API on worker processes. ([\#9092](https://github.com/matrix-org/synapse/issues/9092))
49+
- Add experimental support for moving off receipts and account data persistence off master. ([\#9104](https://github.com/matrix-org/synapse/issues/9104), [\#9166](https://github.com/matrix-org/synapse/issues/9166))
50+
51+
52+
Bugfixes
53+
--------
54+
55+
- Fix a long-standing issue where an internal server error would occur when requesting a profile over federation that did not include a display name / avatar URL. ([\#9023](https://github.com/matrix-org/synapse/issues/9023))
56+
- Fix a long-standing bug where some caches could grow larger than configured. ([\#9028](https://github.com/matrix-org/synapse/issues/9028))
57+
- Fix error handling during insertion of client IPs into the database. ([\#9051](https://github.com/matrix-org/synapse/issues/9051))
58+
- Fix bug where we didn't correctly record CPU time spent in `on_new_event` block. ([\#9053](https://github.com/matrix-org/synapse/issues/9053))
59+
- Fix a minor bug which could cause confusing error messages from invalid configurations. ([\#9054](https://github.com/matrix-org/synapse/issues/9054))
60+
- Fix incorrect exit code when there is an error at startup. ([\#9059](https://github.com/matrix-org/synapse/issues/9059))
61+
- Fix `JSONDecodeError` spamming the logs when sending transactions to remote servers. ([\#9070](https://github.com/matrix-org/synapse/issues/9070))
62+
- Fix "Failed to send request" errors when a client provides an invalid room alias. ([\#9071](https://github.com/matrix-org/synapse/issues/9071))
63+
- Fix bugs in federation catchup logic that caused outbound federation to be delayed for large servers after start up. Introduced in v1.8.0 and v1.21.0. ([\#9114](https://github.com/matrix-org/synapse/issues/9114), [\#9116](https://github.com/matrix-org/synapse/issues/9116))
64+
- Fix corruption of `pushers` data when a postgres bouncer is used. ([\#9117](https://github.com/matrix-org/synapse/issues/9117))
65+
- Fix minor bugs in handling the `clientRedirectUrl` parameter for SSO login. ([\#9128](https://github.com/matrix-org/synapse/issues/9128))
66+
- Fix "Unhandled error in Deferred: BodyExceededMaxSize" errors when .well-known files that are too large. ([\#9108](https://github.com/matrix-org/synapse/issues/9108))
67+
- Fix "UnboundLocalError: local variable 'length' referenced before assignment" errors when the response body exceeds the expected size. This bug was introduced in v1.25.0. ([\#9145](https://github.com/matrix-org/synapse/issues/9145))
68+
- Fix a long-standing bug "ValueError: invalid literal for int() with base 10" when `/publicRooms` is requested with an invalid `server` parameter. ([\#9161](https://github.com/matrix-org/synapse/issues/9161))
69+
70+
71+
Improved Documentation
72+
----------------------
73+
74+
- Add some extra docs for getting Synapse running on macOS. ([\#8997](https://github.com/matrix-org/synapse/issues/8997))
75+
- Correct a typo in the `systemd-with-workers` documentation. ([\#9035](https://github.com/matrix-org/synapse/issues/9035))
76+
- Correct a typo in `INSTALL.md`. ([\#9040](https://github.com/matrix-org/synapse/issues/9040))
77+
- Add missing `user_mapping_provider` configuration to the Keycloak OIDC example. Contributed by @chris-ruecker. ([\#9057](https://github.com/matrix-org/synapse/issues/9057))
78+
- Quote `pip install` packages when extras are used to avoid shells interpreting bracket characters. ([\#9151](https://github.com/matrix-org/synapse/issues/9151))
79+
80+
81+
Deprecations and Removals
82+
-------------------------
83+
84+
- Remove broken and unmaintained `demo/webserver.py` script. ([\#9039](https://github.com/matrix-org/synapse/issues/9039))
85+
86+
87+
Internal Changes
88+
----------------
89+
90+
- Improve efficiency of large state resolutions. ([\#8868](https://github.com/matrix-org/synapse/issues/8868), [\#9029](https://github.com/matrix-org/synapse/issues/9029), [\#9115](https://github.com/matrix-org/synapse/issues/9115), [\#9118](https://github.com/matrix-org/synapse/issues/9118), [\#9124](https://github.com/matrix-org/synapse/issues/9124))
91+
- Various clean-ups to the structured logging and logging context code. ([\#8939](https://github.com/matrix-org/synapse/issues/8939))
92+
- Ensure rejected events get added to some metadata tables. ([\#9016](https://github.com/matrix-org/synapse/issues/9016))
93+
- Ignore date-rotated homeserver logs saved to disk. ([\#9018](https://github.com/matrix-org/synapse/issues/9018))
94+
- Remove an unused column from `access_tokens` table. ([\#9025](https://github.com/matrix-org/synapse/issues/9025))
95+
- Add a `-noextras` factor to `tox.ini`, to support running the tests with no optional dependencies. ([\#9030](https://github.com/matrix-org/synapse/issues/9030))
96+
- Fix running unit tests when optional dependencies are not installed. ([\#9031](https://github.com/matrix-org/synapse/issues/9031))
97+
- Allow bumping schema version when using split out state database. ([\#9033](https://github.com/matrix-org/synapse/issues/9033))
98+
- Configure the linters to run on a consistent set of files. ([\#9038](https://github.com/matrix-org/synapse/issues/9038))
99+
- Various cleanups to device inbox store. ([\#9041](https://github.com/matrix-org/synapse/issues/9041))
100+
- Drop unused database tables. ([\#9055](https://github.com/matrix-org/synapse/issues/9055))
101+
- Remove unused `SynapseService` class. ([\#9058](https://github.com/matrix-org/synapse/issues/9058))
102+
- Remove unnecessary declarations in the tests for the admin API. ([\#9063](https://github.com/matrix-org/synapse/issues/9063))
103+
- Remove `SynapseRequest.get_user_agent`. ([\#9069](https://github.com/matrix-org/synapse/issues/9069))
104+
- Remove redundant `Homeserver.get_ip_from_request` method. ([\#9080](https://github.com/matrix-org/synapse/issues/9080))
105+
- Add type hints to media repository. ([\#9093](https://github.com/matrix-org/synapse/issues/9093))
106+
- Fix the wrong arguments being passed to `BlacklistingAgentWrapper` from `MatrixFederationAgent`. Contributed by Timothy Leung. ([\#9098](https://github.com/matrix-org/synapse/issues/9098))
107+
- Reduce the scope of caught exceptions in `BlacklistingAgentWrapper`. ([\#9106](https://github.com/matrix-org/synapse/issues/9106))
108+
- Improve `UsernamePickerTestCase`. ([\#9112](https://github.com/matrix-org/synapse/issues/9112))
109+
- Remove dependency on `distutils`. ([\#9125](https://github.com/matrix-org/synapse/issues/9125))
110+
- Enforce that replication HTTP clients are called with keyword arguments only. ([\#9144](https://github.com/matrix-org/synapse/issues/9144))
111+
- Fix the Python 3.5 / old dependencies build in CI. ([\#9146](https://github.com/matrix-org/synapse/issues/9146))
112+
- Replace the old `perspectives` option in the Synapse docker config file template with `trusted_key_servers`. ([\#9157](https://github.com/matrix-org/synapse/issues/9157))
113+
114+
1115
Synapse 1.25.0 (2021-01-13)
2116
===========================
3117

INSTALL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ via brew and inform `pip` about it so that `psycopg2` builds:
190190

191191
```sh
192192
brew install [email protected]
193-
export LDFLAGS=-L/usr/local/Cellar/openssl\@1.1/1.1.1d/lib/
193+
export LDFLAGS="-L/usr/local/opt/openssl/lib"
194+
export CPPFLAGS="-I/usr/local/opt/openssl/include"
194195
```
195196

196197
##### OpenSUSE
@@ -257,7 +258,7 @@ for a number of platforms.
257258

258259
#### Docker images and Ansible playbooks
259260

260-
There is an offical synapse image available at
261+
There is an official synapse image available at
261262
<https://hub.docker.com/r/matrixdotorg/synapse> which can be used with
262263
the docker-compose file available at [contrib/docker](contrib/docker). Further
263264
information on this including configuration options is available in the README

README.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Then update the ``users`` table in the database::
243243
Synapse Development
244244
===================
245245

246-
Join our developer community on Matrix: [#synapse-dev:matrix.org](https://matrix.to/#/#synapse-dev:matrix.org)
246+
Join our developer community on Matrix: `#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>`_
247247

248248
Before setting up a development environment for synapse, make sure you have the
249249
system dependencies (such as the python header files) installed - see
@@ -280,6 +280,27 @@ differ)::
280280

281281
PASSED (skips=15, successes=1322)
282282

283+
We recommend using the demo which starts 3 federated instances running on ports `8080` - `8082`
284+
285+
./demo/start.sh
286+
287+
(to stop, you can use `./demo/stop.sh`)
288+
289+
If you just want to start a single instance of the app and run it directly::
290+
291+
# Create the homeserver.yaml config once
292+
python -m synapse.app.homeserver \
293+
--server-name my.domain.name \
294+
--config-path homeserver.yaml \
295+
--generate-config \
296+
--report-stats=[yes|no]
297+
298+
# Start the app
299+
python -m synapse.app.homeserver --config-path homeserver.yaml
300+
301+
302+
303+
283304
Running the Integration Tests
284305
=============================
285306

UPGRADE.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,56 @@ for example:
8585
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
8686
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
8787
88+
Upgrading to v1.26.0
89+
====================
90+
91+
Rolling back to v1.25.0 after a failed upgrade
92+
----------------------------------------------
93+
94+
v1.26.0 includes a lot of large changes. If something problematic occurs, you
95+
may want to roll-back to a previous version of Synapse. Because v1.26.0 also
96+
includes a new database schema version, reverting that version is also required
97+
alongside the generic rollback instructions mentioned above. In short, to roll
98+
back to v1.25.0 you need to:
99+
100+
1. Stop the server
101+
2. Decrease the schema version in the database:
102+
103+
.. code:: sql
104+
105+
UPDATE schema_version SET version = 58;
106+
107+
3. Delete the ignored users & chain cover data:
108+
109+
.. code:: sql
110+
111+
DROP TABLE IF EXISTS ignored_users;
112+
UPDATE rooms SET has_auth_chain_index = false;
113+
114+
For PostgreSQL run:
115+
116+
.. code:: sql
117+
118+
TRUNCATE event_auth_chain_links;
119+
TRUNCATE event_auth_chains;
120+
121+
For SQLite run:
122+
123+
.. code:: sql
124+
125+
DELETE FROM event_auth_chain_links;
126+
DELETE FROM event_auth_chains;
127+
128+
4. Mark the deltas as not run (so they will re-run on upgrade).
129+
130+
.. code:: sql
131+
132+
DELETE FROM applied_schema_deltas WHERE version = 59 AND file = "59/01ignored_user.py";
133+
DELETE FROM applied_schema_deltas WHERE version = 59 AND file = "59/06chain_cover_index.sql";
134+
135+
5. Downgrade Synapse by following the instructions for your installation method
136+
in the "Rolling back to older versions" section above.
137+
88138
Upgrading to v1.25.0
89139
====================
90140

debian/changelog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
matrix-synapse-py3 (1.26.0) stable; urgency=medium
2+
3+
[ Richard van der Hoff ]
4+
* Remove dependency on `python3-distutils`.
5+
6+
[ Synapse Packaging team ]
7+
* New synapse release 1.26.0.
8+
9+
-- Synapse Packaging team <[email protected]> Wed, 27 Jan 2021 12:43:35 -0500
10+
111
matrix-synapse-py3 (1.25.0) stable; urgency=medium
212

313
[ Dan Callahan ]

debian/control

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Pre-Depends: dpkg (>= 1.16.1)
3131
Depends:
3232
adduser,
3333
debconf,
34-
python3-distutils|libpython3-stdlib (<< 3.6),
3534
${misc:Depends},
3635
${shlibs:Depends},
3736
${synapse:pydepends},

demo/webserver.py

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

docker/conf/homeserver.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,10 @@ old_signing_keys: {}
198198
key_refresh_interval: "1d" # 1 Day.
199199

200200
# The trusted servers to download signing keys from.
201-
perspectives:
202-
servers:
203-
"matrix.org":
204-
verify_keys:
205-
"ed25519:auto":
206-
key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
201+
trusted_key_servers:
202+
- server_name: matrix.org
203+
verify_keys:
204+
"ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
207205

208206
password_config:
209207
enabled: true

0 commit comments

Comments
 (0)