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

Commit e059094

Browse files
committed
Merge tag 'v1.42.0rc1' into develop
Synapse 1.42.0rc1 (2021-09-01) ============================== Server administrators are reminded to read [the upgrade notes](docs/upgrade.md#upgrading-to-v1420). Features -------- - Add support for [MSC3231](matrix-org/matrix-spec-proposals#3231): Token authenticated registration. Users can be required to submit a token during registration to authenticate themselves. Contributed by Callum Brown. ([\#10142](#10142)) - Add support for [MSC3283](matrix-org/matrix-spec-proposals#3283): Expose `enable_set_displayname` in capabilities. ([\#10452](#10452)) - Port the `PresenceRouter` module interface to the new generic interface. ([\#10524](#10524)) - Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\#10613](#10613), [\#10725](#10725)) Bugfixes -------- - Validate new `m.room.power_levels` events. Contributed by @aaronraimist. ([\#10232](#10232)) - Display an error on User-Interactive Authentication fallback pages when authentication fails. Contributed by Callum Brown. ([\#10561](#10561)) - Remove pushers when deleting an e-mail address from an account. Pushers for old unlinked emails will also be deleted. ([\#10581](#10581), [\#10734](#10734)) - Reject Client-Server `/keys/query` requests which provide `device_ids` incorrectly. ([\#10593](#10593)) - Rooms with unsupported room versions are no longer returned via `/sync`. ([\#10644](#10644)) - Enforce the maximum length for per-room display names and avatar URLs. ([\#10654](#10654)) - Fix a bug which caused the `synapse_user_logins_total` Prometheus metric not to be correctly initialised on restart. ([\#10677](#10677)) - Improve `ServerNoticeServlet` to avoid duplicate requests and add unit tests. ([\#10679](#10679)) - Fix long-standing issue which caused an error when a thumbnail is requested and there are multiple thumbnails with the same quality rating. ([\#10684](#10684)) - Fix a regression introduced in v1.41.0 which affected the performance of concurrent fetches of large sets of events, in extreme cases causing the process to hang. ([\#10703](#10703)) - Fix a regression introduced in Synapse 1.41 which broke email transmission on Systems using older versions of the Twisted library. ([\#10713](#10713)) Improved Documentation ---------------------- - Add documentation on how to connect Django with Synapse using OpenID Connect and django-oauth-toolkit. Contributed by @HugoDelval. ([\#10192](#10192)) - Advertise https://matrix-org.github.io/synapse documentation in the `README` and `CONTRIBUTING` files. ([\#10595](#10595)) - Fix some of the titles not rendering in the OpenID Connect documentation. ([\#10639](#10639)) - Minor clarifications to the documentation for reverse proxies. ([\#10708](#10708)) - Remove table of contents from the top of installation and contributing documentation pages. ([\#10711](#10711)) Deprecations and Removals ------------------------- - Remove deprecated Shutdown Room and Purge Room Admin API. ([\#8830](#8830)) Internal Changes ---------------- - Improve type hints for the proxy agent and SRV resolver modules. Contributed by @dklimpel. ([\#10608](#10608)) - Clean up some of the federation event authentication code for clarity. ([\#10614](#10614), [\#10615](#10615), [\#10624](#10624), [\#10640](#10640)) - Add a comment asking developers to leave a reason when bumping the database schema version. ([\#10621](#10621)) - Remove not needed database updates in modify user admin API. ([\#10627](#10627)) - Convert room member storage tuples to `attrs` classes. ([\#10629](#10629), [\#10642](#10642)) - Use auto-attribs for the attrs classes used in sync. ([\#10630](#10630)) - Make `backfill` and `get_missing_events` use the same codepath. ([\#10645](#10645)) - Improve the performance of the `/hierarchy` API (from [MSC2946](matrix-org/matrix-spec-proposals#2946)) by caching responses received over federation. ([\#10647](#10647)) - Run a nightly CI build against Twisted trunk. ([\#10651](#10651), [\#10672](#10672)) - Do not print out stack traces for network errors when fetching data over federation. ([\#10662](#10662)) - Simplify tests for device admin rest API. ([\#10664](#10664)) - Add missing type hints to REST servlets. ([\#10665](#10665), [\#10666](#10666), [\#10674](#10674)) - Flatten the `tests.synapse.rests` package by moving the contents of `v1` and `v2_alpha` into the parent. ([\#10667](#10667)) - Update `complement.sh` to rebuild the base Docker image when run with workers. ([\#10686](#10686)) - Split the event-processing methods in `FederationHandler` into a separate `FederationEventHandler`. ([\#10692](#10692)) - Remove unused `compare_digest` function. ([\#10706](#10706))
2 parents d906938 + c6e103c commit e059094

Some content is hidden

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

52 files changed

+123
-52
lines changed

CHANGES.md

+67-1

changelog.d/10142.feature

-1
This file was deleted.

changelog.d/10192.doc

-1
This file was deleted.

changelog.d/10232.bugfix

-1
This file was deleted.

changelog.d/10452.feature

-1
This file was deleted.

changelog.d/10524.feature

-1
This file was deleted.

changelog.d/10561.bugfix

-1
This file was deleted.

changelog.d/10581.bugfix

-1
This file was deleted.

changelog.d/10593.bugfix

-1
This file was deleted.

changelog.d/10595.doc

-1
This file was deleted.

changelog.d/10608.misc

-1
This file was deleted.

changelog.d/10613.feature

-1
This file was deleted.

changelog.d/10614.misc

-1
This file was deleted.

changelog.d/10615.misc

-1
This file was deleted.

changelog.d/10621.misc

-1
This file was deleted.

changelog.d/10624.misc

-1
This file was deleted.

changelog.d/10627.misc

-1
This file was deleted.

changelog.d/10629.misc

-1
This file was deleted.

changelog.d/10630.misc

-1
This file was deleted.

changelog.d/10639.doc

-1
This file was deleted.

changelog.d/10640.misc

-1
This file was deleted.

changelog.d/10642.misc

-1
This file was deleted.

changelog.d/10644.bugfix

-1
This file was deleted.

changelog.d/10645.misc

-1
This file was deleted.

changelog.d/10647.misc

-1
This file was deleted.

changelog.d/10651.misc

-1
This file was deleted.

changelog.d/10654.bugfix

-1
This file was deleted.

changelog.d/10662.misc

-1
This file was deleted.

changelog.d/10664.misc

-1
This file was deleted.

changelog.d/10665.misc

-1
This file was deleted.

changelog.d/10666.misc

-1
This file was deleted.

changelog.d/10667.misc

-1
This file was deleted.

changelog.d/10672.misc

-1
This file was deleted.

changelog.d/10674.misc

-1
This file was deleted.

changelog.d/10677.bugfix

-1
This file was deleted.

changelog.d/10679.bugfix

-1
This file was deleted.

changelog.d/10684.bugfix

-1
This file was deleted.

changelog.d/10686.misc

-1
This file was deleted.

changelog.d/10692.misc

-1
This file was deleted.

changelog.d/10703.bugfix

-1
This file was deleted.

changelog.d/10706.misc

-1
This file was deleted.

changelog.d/10708.doc

-1
This file was deleted.

changelog.d/10711.doc

-1
This file was deleted.

changelog.d/10713.bugfix

-1
This file was deleted.

changelog.d/10723.bugfix

-1
This file was deleted.

changelog.d/10725.feature

-1
This file was deleted.

changelog.d/8830.removal

-1
This file was deleted.

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
matrix-synapse-py3 (1.42.0~rc1) stable; urgency=medium
2+
3+
* New synapse release 1.42.0rc1.
4+
5+
-- Synapse Packaging team <packages@matrix.org> Wed, 01 Sep 2021 11:37:48 +0100
6+
17
matrix-synapse-py3 (1.41.1) stable; urgency=high
28

39
* New synapse release 1.41.1.

docs/upgrade.md

+3-3

synapse/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
except ImportError:
4848
pass
4949

50-
__version__ = "1.41.1"
50+
__version__ = "1.42.0rc1"
5151

5252
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5353
# We import here so that we don't have to install a bunch of deps when

synapse/storage/databases/main/pusher.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,11 @@ def _delete_pushers(txn) -> int:
430430
"""
431431

432432
txn.execute(sql, (last_pusher, batch_size))
433+
rows = txn.fetchall()
433434

434435
last = None
435436
num_deleted = 0
436-
for row in txn:
437+
for row in rows:
437438
last = row[0]
438439
num_deleted += 1
439440
self.db_pool.simple_delete_txn(

tests/push/test_email.py

+44
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,50 @@ def test_no_email_sent_after_removed(self):
379379
pushers = list(pushers)
380380
self.assertEqual(len(pushers), 0)
381381

382+
def test_remove_unlinked_pushers_background_job(self):
383+
"""Checks that all existing pushers associated with unlinked email addresses are removed
384+
upon running the remove_deleted_email_pushers background update.
385+
"""
386+
# disassociate the user's email address manually (without deleting the pusher).
387+
# This resembles the old behaviour, which the background update below is intended
388+
# to clean up.
389+
self.get_success(
390+
self.hs.get_datastore().user_delete_threepid(
391+
self.user_id, "email", "a@example.com"
392+
)
393+
)
394+
395+
# Run the "remove_deleted_email_pushers" background job
396+
self.get_success(
397+
self.hs.get_datastore().db_pool.simple_insert(
398+
table="background_updates",
399+
values={
400+
"update_name": "remove_deleted_email_pushers",
401+
"progress_json": "{}",
402+
"depends_on": None,
403+
},
404+
)
405+
)
406+
407+
# ... and tell the DataStore that it hasn't finished all updates yet
408+
self.hs.get_datastore().db_pool.updates._all_done = False
409+
410+
# Now let's actually drive the updates to completion
411+
while not self.get_success(
412+
self.hs.get_datastore().db_pool.updates.has_completed_background_updates()
413+
):
414+
self.get_success(
415+
self.hs.get_datastore().db_pool.updates.do_next_background_update(100),
416+
by=0.1,
417+
)
418+
419+
# Check that all pushers with unlinked addresses were deleted
420+
pushers = self.get_success(
421+
self.hs.get_datastore().get_pushers_by({"user_name": self.user_id})
422+
)
423+
pushers = list(pushers)
424+
self.assertEqual(len(pushers), 0)
425+
382426
def _check_for_mail(self) -> Tuple[Sequence, Dict]:
383427
"""
384428
Assert that synapse sent off exactly one email notification.

0 commit comments

Comments
 (0)