Andrew Morgan
34baf76451
1.55.0
2022-03-22 14:02:52 +00:00
Michael Telatynski
01211e0c16
Tweak copy for sso account details template ( #12265 )
...
* Tweak copy for sso account details template
* Update sso footer copyright year
* Add newsfragment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-22 10:22:25 +00:00
Dirk Klimpel
9d21ecf7ce
Add type hints to tests files. ( #12256 )
2022-03-21 09:43:16 -04:00
David Robertson
0a59f977a2
Merge branch 'release-v1.55' into develop
2022-03-21 12:29:53 +00:00
reivilibre
6134b3079e
Reword 'Choose your user name' as 'Choose your account name' in the SSO registration template, in order to comply with SIWA guidelines. ( #12260 )
...
* Reword as 'Choose your account name'
* Newsfile
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-03-21 12:16:46 +00:00
Nick Mills-Barrett
1530cef192
Make it possible to enable compression for the metrics HTTP resource ( #12258 )
...
* Make it possible to enable compression for the metrics HTTP resource
This can provide significant bandwidth savings pulling metrics from
synapse instances.
* Add changelog file.
* Fix type hint
2022-03-21 11:52:10 +00:00
Richard van der Hoff
afa17f0eab
Return a 404 from /state
for an outlier ( #12087 )
...
* Replace `get_state_for_pdu` with `get_state_ids_for_pdu` and `get_events_as_list`.
* Return a 404 from `/state` and `/state_ids` for an outlier
2022-03-21 11:23:32 +00:00
David Robertson
bf9d549e3a
Try to detect borked package installations. ( #12244 )
...
* Try to detect borked package installations.
Fixes #12223 .
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-03-18 19:03:46 +00:00
Patrick Cloke
8fe930c215
Move get_bundled_aggregations to relations handler. ( #12237 )
...
The get_bundled_aggregations code is fairly high-level and uses
a lot of store methods, we move it into the handler as that seems
like a better fit.
2022-03-18 17:49:32 +00:00
Patrick Cloke
80e0e1f35e
Only fetch thread participation for events with threads. ( #12228 )
...
We fetch the thread summary in two phases:
1. The summary that is shared by all users (count of messages and latest event).
2. Whether the requesting user has participated in the thread.
There's no use in attempting step 2 for events which did not return a summary
from step 1.
2022-03-18 17:15:45 +00:00
Patrick Cloke
2177e356bc
Sync more worker regexes in the documentation. ( #12243 )
2022-03-18 12:51:27 -04:00
Dirk Klimpel
c46065fa3d
Add some type hints to datastore ( #12248 )
...
* inherit `MonthlyActiveUsersStore` from `RegistrationWorkerStore`
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-18 15:24:18 +00:00
David Robertson
872dbb0181
Correct check_username_for_spam
annotations and docs ( #12246 )
...
* Formally type the UserProfile in user searches
* export UserProfile in synapse.module_api
* Update docs
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-03-18 13:51:41 +00:00
David Robertson
12d1f82db2
Generate announcement links in release script ( #12242 )
2022-03-17 13:46:05 +00:00
Dirk Klimpel
9e06e22064
Add type hints to more tests files. ( #12240 )
2022-03-17 07:25:50 -04:00
Patrick Cloke
3f7cfbc9e5
Merge branch 'release-v1.55' into develop
2022-03-16 12:22:07 -04:00
Patrick Cloke
f70afbd565
Re-generate changelog.
2022-03-16 12:20:05 -04:00
Patrick Cloke
96274565ff
Fix bundling aggregations if unsigned is not a returned event field. ( #12234 )
...
An error occured if a filter was supplied with `event_fields` which did not include
`unsigned`.
In that case, bundled aggregations are still added as the spec states it is allowed
for servers to add additional fields.
2022-03-16 12:17:39 -04:00
Sean Quah
6121056740
Handle cancellation in DatabasePool.runInteraction()
( #12199 )
...
To handle cancellation, we ensure that `after_callback`s and
`exception_callback`s are always run, since the transaction will
complete on another thread regardless of cancellation.
We also wait until everything is done before releasing the
`CancelledError`, so that logging contexts won't get used after they
have been finished.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-16 15:07:41 +00:00
Patrick Cloke
fc9bd620ce
Add a relations handler to avoid duplication. ( #12227 )
...
Adds a handler layer between the REST and datastore layers for relations.
2022-03-16 10:39:15 -04:00
Patrick Cloke
c486fa5fd9
Add some missing type hints to cache datastore. ( #12216 )
2022-03-16 10:37:04 -04:00
David Robertson
86965605a4
Fix dead link in spam checker warning ( #12231 )
2022-03-16 13:52:59 +00:00
Patrick Cloke
1da0f79d54
Refactor relations tests ( #12232 )
...
* Moves the relation pagination tests to a separate class.
* Move the assertion of the response code into the `_send_relation` helper.
* Moves some helpers into the base-class.
2022-03-16 09:20:57 -04:00
Patrick Cloke
4587b35929
Clean-up logic for rebasing URLs during URL preview. ( #12219 )
...
By using urljoin from the standard library and reducing the number
of places URLs are rebased.
2022-03-16 07:21:36 -04:00
Patrick Cloke
dda9b7fc4d
Use the ignored_users table to test event visibility & sync. ( #12225 )
...
Instead of fetching the raw account data and re-parsing it. The
ignored_users table is a denormalised version of the account data
for quick searching.
2022-03-15 14:06:05 -04:00
Sean Quah
dea577998f
Add tests for database transaction callbacks ( #12198 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-15 15:40:34 +00:00
Dirk Klimpel
5dd949bee6
Add type hints to some tests/handlers files. ( #12224 )
2022-03-15 09:16:37 -04:00
David Robertson
d1130a249b
1.55.0rc1
2022-03-15 11:00:01 +00:00
Sean Quah
2fcf4b3f6c
Add cancellation support to @cached
and @cachedList
decorators ( #12183 )
...
These decorators mostly support cancellation already. Add cancellation
tests and fix use of finished logging contexts by delaying cancellation,
as suggested by @erikjohnston.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 19:04:29 +00:00
Sean Quah
605d161d7d
Add cancellation support to ReadWriteLock
( #12120 )
...
Also convert `ReadWriteLock` to use async context managers.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 18:49:07 +00:00
Sean Quah
8e5706d144
Fix broken background updates when using sqlite with enable_search
off ( #12215 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 17:52:58 +00:00
Sean Quah
90b2327066
Add delay_cancellation
utility function ( #12180 )
...
`delay_cancellation` behaves like `stop_cancellation`, except it
delays `CancelledError`s until the original `Deferred` resolves.
This is handy for unifying cleanup paths and ensuring that uncancelled
coroutines don't use finished logcontexts.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 17:52:15 +00:00
Patrick Cloke
54f674f7a9
Deprecate the groups/communities endpoints and add an experimental configuration flag. ( #12200 )
2022-03-12 13:23:37 -05:00
Shay
ef3619e61d
Add config settings for background update parameters ( #11980 )
2022-03-11 10:46:45 -08:00
Brendan Abolivier
e6a106fd5e
Implement a Jinja2 filter to extract localparts from email addresses ( #12212 )
2022-03-11 15:15:11 +00:00
reivilibre
4a53f35737
Improve code documentation for the typing stream over replication. ( #12211 )
2022-03-11 14:00:15 +00:00
Nick Mills-Barrett
735e89bd3a
Add an additional HTTP pusher + push rule tests. ( #12188 )
...
And rename the field used for caching from _id to _cache_key.
2022-03-11 08:45:26 -05:00
Brendan Abolivier
003cc6910a
Update the SSO username picker template to comply with SIWA guidelines ( #12210 )
...
Fixes https://github.com/matrix-org/synapse/issues/12205
2022-03-11 13:20:00 +00:00
Dirk Klimpel
32c828d0f7
Add type hints to tests/rest
. ( #12208 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-11 12:42:22 +00:00
Patrick Cloke
e10a2fe0c2
Add some type hints to the tests.handlers module. ( #12207 )
2022-03-11 07:07:15 -05:00
Patrick Cloke
bc9dff1d95
Remove unnecessary pass statements. ( #12206 )
2022-03-11 07:06:21 -05:00
Andrew Morgan
3b12f6d61b
Note that contributors can sign off privately ( #12204 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-11 11:10:20 +00:00
Richard van der Hoff
483f2aa2ec
Retention test: avoid relying on state at purged events ( #12202 )
...
This test was relying on poking events which weren't in the database into
filter_events_for_client.
2022-03-11 10:33:49 +00:00
~creme
7577894bec
Document that most streams can only have a single writer. ( #12196 )
...
This includes the `typing`, `to_device`, `account_data`, `receipts`, and `presence`
streams (really anything except the `events` stream).
2022-03-10 18:15:19 +00:00
Shay
ed9aea42fa
fix misleading comment in check_events_for_spam
( #12203 )
2022-03-10 09:40:07 -08:00
reivilibre
72e7f1c420
Remove workaround introduced in Synapse v1.50.0rc1 for Mjolnir compatibility. Breaks compatibility with Mjolnir v1.3.1 and earlier. ( #11700 )
2022-03-10 15:53:23 +00:00
Patrick Cloke
ea27528b5d
Support stable identifiers for MSC3440: Threading ( #12151 )
...
The unstable identifiers are still supported if the experimental configuration
flag is enabled. The unstable identifiers will be removed in a future release.
2022-03-10 15:36:13 +00:00
Richard van der Hoff
52a947dc46
Updates to the Room DAG concepts development document ( #12179 )
...
Some stuff that came up while we were talking about #12173 .
2022-03-10 15:18:31 +00:00
Patrick Cloke
88cd6f9378
Allow retrieving the relations of a redacted event. ( #12130 )
...
This is allowed per MSC2675, although the original implementation did
not allow for it and would return an empty chunk / not bundle aggregations.
The main thing to improve is that the various caches get cleared properly
when an event is redacted, and that edits must not leak if the original
event is redacted (as that would presumably leak something similar to
the original event content).
2022-03-10 09:03:59 -05:00
Patrick Cloke
3e4af36bc8
Rename get_tcp_replication to get_replication_command_handler. ( #12192 )
...
Since the object it returns is a ReplicationCommandHandler.
This is clean-up from adding support to Redis where the command handler
was added as an additional layer of abstraction from the TCP protocol.
2022-03-10 13:01:56 +00:00
Sean Quah
a4c1fdb44a
Remove dead code in tests/storage/test_database.py
( #12197 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-09 18:45:21 +00:00
Will Hunt
15382b1afa
Add third_party module callbacks to check if a user can delete a room and deactivate a user ( #12028 )
...
* Add check_can_deactivate_user
* Add check_can_shutdown_rooms
* Documentation
* callbacks, not functions
* Various suggested tweaks
* Add tests for test_check_can_shutdown_room and test_check_can_deactivate_user
* Update check_can_deactivate_user to not take a Requester
* Fix check_can_shutdown_room docs
* Renegade and use `by_admin` instead of `admin_user_id`
* fix lint
* Update docs/modules/third_party_rules_callbacks.md
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
* Update docs/modules/third_party_rules_callbacks.md
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
* Update docs/modules/third_party_rules_callbacks.md
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
* Update docs/modules/third_party_rules_callbacks.md
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-03-09 18:23:57 +00:00
Patrick Cloke
690cb4f3b3
Allow for ignoring some arguments when caching. ( #12189 )
...
* `@cached` can now take an `uncached_args` which is an iterable of names to not use in the cache key.
* Requires `@cached`, @cachedList` and `@lru_cache` to use keyword arguments for clarity.
* Asserts that keyword-only arguments in cached functions are not accepted. (I tested this briefly and I don't believe this works properly.)
2022-03-09 18:07:41 +00:00
Patrick Cloke
032688854b
Remove some unused variables/parameters. ( #12187 )
2022-03-09 15:29:39 +00:00
Nick Mills-Barrett
180d8ff0d4
Retry some http replication failures ( #12182 )
...
This allows for the target process to be down for around a minute
which provides time for restarts during synapse upgrades/config updates.
Closes : #12178
Signed off by Nick Mills-Barrett nick@beeper.com
2022-03-09 14:53:28 +00:00
Richard van der Hoff
dc8d825ef2
Skip attempt to get state at backwards-extremities ( #12173 )
...
We don't *have* the state at a backwards-extremity, so this is never going to
do anything useful.
2022-03-09 11:00:48 +00:00
Patrick Cloke
9a0172d49f
Clean-up demo scripts & documentation ( #12143 )
...
* Rewrites the demo documentation to be clearer, accurate, and moves it to our documentation tree.
* Improvements to the demo scripts:
* `clean.sh` now runs `stop.sh` first to avoid zombie processes.
* Uses more modern Synapse configuration (and removes some obsolete configuration).
* Consistently use the HTTP ports for server name, etc.
* Remove the `demo/etc` directory and place everything into the `demo/808x` directories.
2022-03-08 15:02:59 -05:00
Sean Quah
5627182788
Use ParamSpec
in type hints for synapse.logging.context
( #12150 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-08 15:58:14 +00:00
Olivier Wilkinson (reivilibre)
0dc9c5653c
Merge branch 'master' into develop
2022-03-08 15:37:35 +00:00
reivilibre
bfa7d6b035
Fix CI not attaching source distributions and wheels to the GitHub releases. ( #12131 )
2022-03-08 15:11:50 +00:00
Erik Johnston
2ce27a24fe
Add experimental environment variable to enable asyncio reactor ( #12135 )
2022-03-08 13:23:18 +00:00
Patrick Cloke
ca9234a9eb
Do not return allowed_room_ids from /hierarchy response. ( #12175 )
...
This field is only to be used in the Server-Server API, and not the
Client-Server API, but was being leaked when a federation response
was used in the /hierarchy API.
2022-03-08 08:09:11 -05:00
Patrick Cloke
d8bab6793c
Fix incorrect type hints for txredis. ( #12042 )
...
Some properties were marked as RedisProtocol instead of ConnectionHandler,
which wraps RedisProtocol instance(s).
2022-03-08 07:26:05 -05:00
Olivier Wilkinson (reivilibre)
ea992adf86
1.54.0
2022-03-08 10:55:26 +00:00
reivilibre
2eef234ae3
Fix a bug introduced in 1.54.0rc1 which meant that Synapse would refuse to start if pre-release versions of dependencies were installed. ( #12177 )
...
* Add failing test to characterise the regression #12176
* Permit pre-release versions of specified packages
* Newsfile (bugfix)
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-03-08 10:47:28 +00:00
Shay
26211fec24
Fix a bug in background updates wherein background updates are never run using the default batch size ( #12157 )
2022-03-07 09:44:33 -08:00
Patrick Cloke
f63bedef07
Invalidate caches when an event with a relation is redacted. ( #12121 )
...
The caches for the target of the relation must be cleared
so that the bundled aggregations are re-calculated after
the redaction is processed.
2022-03-07 14:00:05 +00:00
Richard van der Hoff
0211f18d65
Switch the tests-done
job to an Action ( #12161 )
...
I've factored it out for easier use in other workflows.
2022-03-07 12:24:06 +00:00
Richard van der Hoff
00a67f831a
Merge remote-tracking branch 'origin/release-v1.54' into develop
2022-03-04 22:40:51 +00:00
David Robertson
d2ef1a79cf
Relax version guard for packaging ( #12166 )
...
It’s just occurred to me that #12088 pulled in the “packaging” package (~=21.3). I pulled in the newest version I had at the time.
I only use it for packaging.requirements.Requirements. Which was added in packaging 16.1: https://github.com/pypa/packaging/releases/tag/16.1
https://pkgs.org/download/python3-packaging suggests that the oldest version we care about is 17.1 in Ubuntu Bionic. So I think with this bound we're hunky dory.
2022-03-04 22:40:24 +00:00
Erik Johnston
0752ab7a36
Reduce to-device queries for /sync. ( #12163 )
2022-03-04 17:57:27 +00:00
Sean Quah
75574726a7
Add type hints for ObservableDeferred
attributes ( #12159 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-04 15:37:02 +00:00
Sean Quah
158e0937eb
Add test for ObservableDeferred
's cancellation behaviour ( #12149 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-04 13:10:05 +00:00
Patrick Cloke
cd1ae3d0b4
Remove backwards compatibility with RelationPaginationToken. ( #12138 )
2022-03-04 07:10:10 -05:00
David Robertson
36071d39f7
Changelog ( #12153 )
2022-03-04 12:01:51 +00:00
David Robertson
4aeb00ca20
Move synctl into synapse._scripts
and expose as an entrypoint ( #12140 )
2022-03-04 11:58:49 +00:00
Erik Johnston
423cca9efe
Spread out sending device lists to remote hosts ( #12132 )
2022-03-04 11:48:15 +00:00
Richard van der Hoff
87c230c27c
Update client-visibility filtering for outlier events ( #12155 )
...
Avoid trying to get the state for outliers, which isn't a sensible thing to do.
2022-03-04 10:31:19 +00:00
Richard van der Hoff
d56202b038
Fix type of events
in StateGroupStorage
and StateHandler
( #12156 )
...
We make multiple passes over this, so a regular iterable won't do.
2022-03-04 10:25:18 +00:00
Richard van der Hoff
8533c8b03d
Avoid generating state groups for local out-of-band leaves ( #12154 )
...
If we locally generate a rejection for an invite received over federation, it
is stored as an outlier (because we probably don't have the state for the
room). However, currently we still generate a state group for it (even though
the state in that state group will be nonsense).
By setting the `outlier` param on `create_event`, we avoid the nonsensical
state.
2022-03-03 19:58:08 +00:00
Andrew Morgan
fb0ffa9676
Rename various ApplicationServices interested methods ( #11915 )
2022-03-03 18:14:09 +00:00
David Robertson
9297d040a7
Detox, part 2 of N ( #12152 )
...
I've argued in #11537 that poetry and tox don't cooperate well at the
moment. (See also #12119.) Therefore I'm pruning away bits of tox to make the transition to poetry easier. This change removes the commands for coverage.
We don't use coverage in anger at the moment. It shouldn't be too hard to add coverage as a dev-dependency and reintroduce this if we really want it.
2022-03-03 17:14:09 +00:00
Dirk Klimpel
7e91107be1
Add type hints to tests/rest
( #12146 )
...
* Add type hints to `tests/rest`
* newsfile
* change import from `SigningKey`
2022-03-03 16:05:44 +00:00
Patrick Cloke
1d11b452b7
Use the proper serialization format when bundling aggregations. ( #12090 )
...
This ensures that the `latest_event` field of the bundled aggregation
for threads uses the same format as the other events in the response.
2022-03-03 10:43:06 -05:00
David Robertson
cea1b58c4a
Don't impose version checks on dev extras at runtime ( #12129 )
...
* Fix incorrect argument in test case
* Add copyright header
* Docstring and __all__
* Exclude dev depenencies
* Use changelog from #12088
* Include version in error messages
This will hopefully distinguish between the version of the source code
and the version of the distribution package that is installed.
* Linter script is your friend
2022-03-03 12:47:55 +00:00
Eric Eastwood
a511a890d7
Enable MSC2716 Complement tests in Synapse ( #12145 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-03-03 11:19:20 +00:00
Erik Johnston
61fd2a8f59
Limit the size of the aggregation_key ( #12101 )
...
There's no reason to let people use long keys.
2022-03-03 10:52:35 +00:00
Eric Eastwood
31b125ccec
Enable MSC3030 Complement tests in Synapse ( #12144 )
...
The Complement tests for MSC3030 are now merged, https://github.com/matrix-org/complement/pull/178
Synapse implmentation: https://github.com/matrix-org/synapse/pull/9445
2022-03-03 11:45:23 +01:00
Brendan Abolivier
ae8a616b49
Correctly register deactivation and profile update module callbacks ( #12141 )
2022-03-03 11:39:58 +01:00
David Robertson
11282ade1d
Move the snapcraft
configuration to contrib
. ( #12142 )
...
* Move the `snapcraft` configuration to `contrib`.
We're happy for people to package this as a snap image if it's useful,
but we don't support or maintain it. I'd like to move the config to
`contrib` to reflect this state of affairs.
* Changelog
2022-03-02 19:22:44 +00:00
David Robertson
1fbe0316a9
Add suffices to scripts in scripts-dev ( #12137 )
...
* Rename scripts-dev to have suffices
* Update references to `scripts-dev`
* Changelog
* These scripts don't pass mypy
2022-03-02 18:00:26 +00:00
David Robertson
106959b3cf
Remove unused mocks from test_typing
( #12136 )
...
* Remove unused mocks from `test_typing`
It's not clear what these do. `get_user_by_access_token` has the wrong
signature, including the return type. Tests all pass without these. I
think we should nuke them.
* Changelog
* Fixup imports
2022-03-02 17:24:52 +00:00
Dirk Klimpel
2ffaf30803
Add type hints to tests/rest/client
( #12108 )
...
* Add type hints to `tests/rest/client`
* newsfile
* fix imports
* add `test_account.py`
* Remove one type hint in `test_report_event.py`
* change `on_create_room` to `async`
* update new functions in `test_third_party_rules.py`
* Add `test_filter.py`
* add `test_rooms.py`
* change to `assertEquals` to `assertEqual`
* lint
2022-03-02 16:34:14 +00:00
Andrew Morgan
b4461e7d8a
Enable complexity checking in complexity checking docs example ( #11998 )
2022-03-02 16:11:16 +00:00
Olivier Wilkinson (reivilibre)
594a07ede4
Synapse 1.54.0rc1 (2022-03-02)
...
==============================
Please note that this will be the last release of Synapse that is compatible with Mjolnir 1.3.1 and earlier.
Administrators of servers which have the Mjolnir module installed are advised to upgrade Mjolnir to version 1.3.2 or later.
Features
--------
- Add support for [MSC3202](https://github.com/matrix-org/matrix-doc/pull/3202 ): sending one-time key counts and fallback key usage states to Application Services. ([\#11617](https://github.com/matrix-org/synapse/issues/11617 ))
- Improve the generated URL previews for some web pages. Contributed by @AndrewRyanChama. ([\#11985](https://github.com/matrix-org/synapse/issues/11985 ))
- Track cache invalidations in Prometheus metrics, as already happens for cache eviction based on size or time. ([\#12000](https://github.com/matrix-org/synapse/issues/12000 ))
- Implement experimental support for [MSC3720](https://github.com/matrix-org/matrix-doc/pull/3720 ) (account status endpoints). ([\#12001](https://github.com/matrix-org/synapse/issues/12001 ), [\#12067](https://github.com/matrix-org/synapse/issues/12067 ))
- Enable modules to set a custom display name when registering a user. ([\#12009](https://github.com/matrix-org/synapse/issues/12009 ))
- Advertise Matrix 1.1 and 1.2 support on `/_matrix/client/versions`. ([\#12020](https://github.com/matrix-org/synapse/issues/12020 ), ([\#12022](https://github.com/matrix-org/synapse/issues/12022 ))
- Support only the stable identifier for [MSC3069](https://github.com/matrix-org/matrix-doc/pull/3069 )'s `is_guest` on `/_matrix/client/v3/account/whoami`. ([\#12021](https://github.com/matrix-org/synapse/issues/12021 ))
- Use room version 9 as the default room version (per [MSC3589](https://github.com/matrix-org/matrix-doc/pull/3589 )). ([\#12058](https://github.com/matrix-org/synapse/issues/12058 ))
- Add module callbacks to react to user deactivation status changes (i.e. deactivations and reactivations) and profile updates. ([\#12062](https://github.com/matrix-org/synapse/issues/12062 ))
Bugfixes
--------
- Fix a bug introduced in Synapse 1.48.0 where an edit of the latest event in a thread would not be properly applied to the thread summary. ([\#11992](https://github.com/matrix-org/synapse/issues/11992 ))
- Fix long-standing bug where the `get_rooms_for_user` cache was not correctly invalidated for remote users when the server left a room. ([\#11999](https://github.com/matrix-org/synapse/issues/11999 ))
- Fix a 500 error with Postgres when looking backwards with the [MSC3030](https://github.com/matrix-org/matrix-doc/pull/3030 ) `/timestamp_to_event?dir=b` endpoint. ([\#12024](https://github.com/matrix-org/synapse/issues/12024 ))
- Properly fix a long-standing bug where wrong data could be inserted into the `event_search` table when using SQLite. This could block running `synapse_port_db` with an `argument of type 'int' is not iterable` error. This bug was partially fixed by a change in Synapse 1.44.0. ([\#12037](https://github.com/matrix-org/synapse/issues/12037 ))
- Fix slow performance of `/logout` in some cases where refresh tokens are in use. The slowness existed since the initial implementation of refresh tokens in version 1.38.0. ([\#12056](https://github.com/matrix-org/synapse/issues/12056 ))
- Fix a long-standing bug where Synapse would make additional failing requests over federation for missing data. ([\#12077](https://github.com/matrix-org/synapse/issues/12077 ))
- Fix occasional `Unhandled error in Deferred` error message. ([\#12089](https://github.com/matrix-org/synapse/issues/12089 ))
- Fix a bug introduced in Synapse 1.51.0 where incoming federation transactions containing at least one EDU would be dropped if debug logging was enabled for `synapse.8631_debug`. ([\#12098](https://github.com/matrix-org/synapse/issues/12098 ))
- Fix a long-standing bug which could cause push notifications to malfunction if `use_frozen_dicts` was set in the configuration. ([\#12100](https://github.com/matrix-org/synapse/issues/12100 ))
- Fix an extremely rare, long-standing bug in `ReadWriteLock` that would cause an error when a newly unblocked writer completes instantly. ([\#12105](https://github.com/matrix-org/synapse/issues/12105 ))
- Make a `POST` to `/rooms/<room_id>/receipt/m.read/<event_id>` only trigger a push notification if the count of unread messages is different to the one in the last successfully sent push. This reduces server load and load on the receiving device. ([\#11835](https://github.com/matrix-org/synapse/issues/11835 ))
Updates to the Docker image
---------------------------
- The Docker image no longer automatically creates a temporary volume at `/data`. This is not expected to affect normal usage. ([\#11997](https://github.com/matrix-org/synapse/issues/11997 ))
- Use Python 3.9 in Docker images by default. ([\#12112](https://github.com/matrix-org/synapse/issues/12112 ))
Improved Documentation
----------------------
- Document support for the `to_device`, `account_data`, `receipts`, and `presence` stream writers for workers. ([\#11599](https://github.com/matrix-org/synapse/issues/11599 ))
- Explain the meaning of spam checker callbacks' return values. ([\#12003](https://github.com/matrix-org/synapse/issues/12003 ))
- Clarify information about external Identity Provider IDs. ([\#12004](https://github.com/matrix-org/synapse/issues/12004 ))
Deprecations and Removals
-------------------------
- Deprecate using `synctl` with the config option `synctl_cache_factor` and print a warning if a user still uses this option. ([\#11865](https://github.com/matrix-org/synapse/issues/11865 ))
- Remove support for the legacy structured logging configuration (please see the the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#legacy-structured-logging-configuration-removal ) if you are using `structured: true` in the Synapse configuration). ([\#12008](https://github.com/matrix-org/synapse/issues/12008 ))
- Drop support for [MSC3283](https://github.com/matrix-org/matrix-doc/pull/3283 ) unstable flags now that the stable flags are supported. ([\#12018](https://github.com/matrix-org/synapse/issues/12018 ))
- Remove the unstable `/spaces` endpoint from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946 ). ([\#12073](https://github.com/matrix-org/synapse/issues/12073 ))
Internal Changes
----------------
- Make the `get_room_version` method use `get_room_version_id` to benefit from caching. ([\#11808](https://github.com/matrix-org/synapse/issues/11808 ))
- Remove unnecessary condition on knock -> leave auth rule check. ([\#11900](https://github.com/matrix-org/synapse/issues/11900 ))
- Add tests for device list changes between local users. ([\#11972](https://github.com/matrix-org/synapse/issues/11972 ))
- Optimise calculating `device_list` changes in `/sync`. ([\#11974](https://github.com/matrix-org/synapse/issues/11974 ))
- Add missing type hints to storage classes. ([\#11984](https://github.com/matrix-org/synapse/issues/11984 ))
- Refactor the search code for improved readability. ([\#11991](https://github.com/matrix-org/synapse/issues/11991 ))
- Move common deduplication code down into `_auth_and_persist_outliers`. ([\#11994](https://github.com/matrix-org/synapse/issues/11994 ))
- Limit concurrent joins from applications services. ([\#11996](https://github.com/matrix-org/synapse/issues/11996 ))
- Preparation for faster-room-join work: when parsing the `send_join` response, get the `m.room.create` event from `state`, not `auth_chain`. ([\#12005](https://github.com/matrix-org/synapse/issues/12005 ), [\#12039](https://github.com/matrix-org/synapse/issues/12039 ))
- Preparation for faster-room-join work: parse MSC3706 fields in send_join response. ([\#12011](https://github.com/matrix-org/synapse/issues/12011 ))
- Preparation for faster-room-join work: persist information on which events and rooms have partial state to the database. ([\#12012](https://github.com/matrix-org/synapse/issues/12012 ))
- Preparation for faster-room-join work: Support for calling `/federation/v1/state` on a remote server. ([\#12013](https://github.com/matrix-org/synapse/issues/12013 ))
- Configure `tox` to use `venv` rather than `virtualenv`. ([\#12015](https://github.com/matrix-org/synapse/issues/12015 ))
- Fix bug in `StateFilter.return_expanded()` and add some tests. ([\#12016](https://github.com/matrix-org/synapse/issues/12016 ))
- Use Matrix v1.1 endpoints (`/_matrix/client/v3/auth/...`) in fallback auth HTML forms. ([\#12019](https://github.com/matrix-org/synapse/issues/12019 ))
- Update the `olddeps` CI job to use an old version of `markupsafe`. ([\#12025](https://github.com/matrix-org/synapse/issues/12025 ))
- Upgrade Mypy to version 0.931. ([\#12030](https://github.com/matrix-org/synapse/issues/12030 ))
- Remove legacy `HomeServer.get_datastore()`. ([\#12031](https://github.com/matrix-org/synapse/issues/12031 ), [\#12070](https://github.com/matrix-org/synapse/issues/12070 ))
- Minor typing fixes. ([\#12034](https://github.com/matrix-org/synapse/issues/12034 ), [\#12069](https://github.com/matrix-org/synapse/issues/12069 ))
- After joining a room, create a dedicated logcontext to process the queued events. ([\#12041](https://github.com/matrix-org/synapse/issues/12041 ))
- Tidy up GitHub Actions config which builds distributions for PyPI. ([\#12051](https://github.com/matrix-org/synapse/issues/12051 ))
- Move configuration out of `setup.cfg`. ([\#12052](https://github.com/matrix-org/synapse/issues/12052 ), [\#12059](https://github.com/matrix-org/synapse/issues/12059 ))
- Fix error message when a worker process fails to talk to another worker process. ([\#12060](https://github.com/matrix-org/synapse/issues/12060 ))
- Fix using the `complement.sh` script without specifying a directory or a branch. Contributed by Nico on behalf of Famedly. ([\#12063](https://github.com/matrix-org/synapse/issues/12063 ))
- Add type hints to `tests/rest/client`. ([\#12066](https://github.com/matrix-org/synapse/issues/12066 ), [\#12072](https://github.com/matrix-org/synapse/issues/12072 ), [\#12084](https://github.com/matrix-org/synapse/issues/12084 ), [\#12094](https://github.com/matrix-org/synapse/issues/12094 ))
- Add some logging to `/sync` to try and track down #11916 . ([\#12068](https://github.com/matrix-org/synapse/issues/12068 ))
- Inspect application dependencies using `importlib.metadata` or its backport. ([\#12088](https://github.com/matrix-org/synapse/issues/12088 ))
- Use `assertEqual` instead of the deprecated `assertEquals` in test code. ([\#12092](https://github.com/matrix-org/synapse/issues/12092 ))
- Move experimental support for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440 ) to `/versions`. ([\#12099](https://github.com/matrix-org/synapse/issues/12099 ))
- Add `stop_cancellation` utility function to stop `Deferred`s from being cancelled. ([\#12106](https://github.com/matrix-org/synapse/issues/12106 ))
- Improve exception handling for concurrent execution. ([\#12109](https://github.com/matrix-org/synapse/issues/12109 ))
- Advertise support for Python 3.10 in packaging files. ([\#12111](https://github.com/matrix-org/synapse/issues/12111 ))
- Move CI checks out of tox, to facilitate a move to using poetry. ([\#12119](https://github.com/matrix-org/synapse/issues/12119 ))
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE8SRSDO7gYkSP4chELS76LzL74EcFAmIffxUACgkQLS76LzL7
4EefXxAAvnJb1BxzWwlYyKaDULjmNfsKilRWlT/A1/7VaumB84H4gFQklLuMbJdR
pyktlkmVZrnLG+Vz2JfgFm4wTXvLGieACvlAodQWztQX2szqPAHeq0A0vuMgJEay
mVKVnU6b83CONBr021/lm6NOBetbUqOVyiFsnuBKlLPs4WdSt+3DvBRZ3hsQTrCV
zEOSdzVM67yr0xo3/vmT+nzlfcegJ64EOT+dFwMfKnoWbRK0lMwnob1WZbiOE0+9
9hoqEucbmzf/4IKgURxmNmrUDIPGUlGq4BnKMGMNyrwWv9v+8pXuIqzOYEUnWVBh
upvS88OBswk2EXIIk22/rf5gohNShQDmki41CVTH32G+dP72YxCfTGsafwUpS+Hm
KlojCRccmo2y2sQnLzrhswsOPFiYP0AORPIp3hO1mVTMZ7EgjsP4Y8C/S54Oe03F
6U3M5pv6aqURiAHAnyC4KbPOVqUbEzthUuRINEDp5QhNSFyvtwV9DTaFixMpMdR0
OJU8tMaGmCtqdsqNOZ4vGhzPVD/1kJ0KapPyJbkVSGoRdlI01sqO7Nu+k8AZ1oEc
nkoR5zMTysCAuGCIOtCWB8NOFBNyEgcCdz3356e+wvWx4PazIFsfyEXskzZY50iK
dAIdr+w+kyf4d/e9JpK7YHrPP5uP2s0V8Y4MvDx3wUXJ6VZ834Y=
=jw9M
-----END PGP SIGNATURE-----
Merge tag 'v1.54.0rc1' into develop
Synapse 1.54.0rc1 (2022-03-02)
==============================
Please note that this will be the last release of Synapse that is compatible with Mjolnir 1.3.1 and earlier.
Administrators of servers which have the Mjolnir module installed are advised to upgrade Mjolnir to version 1.3.2 or later.
Features
--------
- Add support for [MSC3202](https://github.com/matrix-org/matrix-doc/pull/3202 ): sending one-time key counts and fallback key usage states to Application Services. ([\#11617](https://github.com/matrix-org/synapse/issues/11617 ))
- Improve the generated URL previews for some web pages. Contributed by @AndrewRyanChama. ([\#11985](https://github.com/matrix-org/synapse/issues/11985 ))
- Track cache invalidations in Prometheus metrics, as already happens for cache eviction based on size or time. ([\#12000](https://github.com/matrix-org/synapse/issues/12000 ))
- Implement experimental support for [MSC3720](https://github.com/matrix-org/matrix-doc/pull/3720 ) (account status endpoints). ([\#12001](https://github.com/matrix-org/synapse/issues/12001 ), [\#12067](https://github.com/matrix-org/synapse/issues/12067 ))
- Enable modules to set a custom display name when registering a user. ([\#12009](https://github.com/matrix-org/synapse/issues/12009 ))
- Advertise Matrix 1.1 and 1.2 support on `/_matrix/client/versions`. ([\#12020](https://github.com/matrix-org/synapse/issues/12020 ), ([\#12022](https://github.com/matrix-org/synapse/issues/12022 ))
- Support only the stable identifier for [MSC3069](https://github.com/matrix-org/matrix-doc/pull/3069 )'s `is_guest` on `/_matrix/client/v3/account/whoami`. ([\#12021](https://github.com/matrix-org/synapse/issues/12021 ))
- Use room version 9 as the default room version (per [MSC3589](https://github.com/matrix-org/matrix-doc/pull/3589 )). ([\#12058](https://github.com/matrix-org/synapse/issues/12058 ))
- Add module callbacks to react to user deactivation status changes (i.e. deactivations and reactivations) and profile updates. ([\#12062](https://github.com/matrix-org/synapse/issues/12062 ))
Bugfixes
--------
- Fix a bug introduced in Synapse 1.48.0 where an edit of the latest event in a thread would not be properly applied to the thread summary. ([\#11992](https://github.com/matrix-org/synapse/issues/11992 ))
- Fix long-standing bug where the `get_rooms_for_user` cache was not correctly invalidated for remote users when the server left a room. ([\#11999](https://github.com/matrix-org/synapse/issues/11999 ))
- Fix a 500 error with Postgres when looking backwards with the [MSC3030](https://github.com/matrix-org/matrix-doc/pull/3030 ) `/timestamp_to_event?dir=b` endpoint. ([\#12024](https://github.com/matrix-org/synapse/issues/12024 ))
- Properly fix a long-standing bug where wrong data could be inserted into the `event_search` table when using SQLite. This could block running `synapse_port_db` with an `argument of type 'int' is not iterable` error. This bug was partially fixed by a change in Synapse 1.44.0. ([\#12037](https://github.com/matrix-org/synapse/issues/12037 ))
- Fix slow performance of `/logout` in some cases where refresh tokens are in use. The slowness existed since the initial implementation of refresh tokens in version 1.38.0. ([\#12056](https://github.com/matrix-org/synapse/issues/12056 ))
- Fix a long-standing bug where Synapse would make additional failing requests over federation for missing data. ([\#12077](https://github.com/matrix-org/synapse/issues/12077 ))
- Fix occasional `Unhandled error in Deferred` error message. ([\#12089](https://github.com/matrix-org/synapse/issues/12089 ))
- Fix a bug introduced in Synapse 1.51.0 where incoming federation transactions containing at least one EDU would be dropped if debug logging was enabled for `synapse.8631_debug`. ([\#12098](https://github.com/matrix-org/synapse/issues/12098 ))
- Fix a long-standing bug which could cause push notifications to malfunction if `use_frozen_dicts` was set in the configuration. ([\#12100](https://github.com/matrix-org/synapse/issues/12100 ))
- Fix an extremely rare, long-standing bug in `ReadWriteLock` that would cause an error when a newly unblocked writer completes instantly. ([\#12105](https://github.com/matrix-org/synapse/issues/12105 ))
- Make a `POST` to `/rooms/<room_id>/receipt/m.read/<event_id>` only trigger a push notification if the count of unread messages is different to the one in the last successfully sent push. This reduces server load and load on the receiving device. ([\#11835](https://github.com/matrix-org/synapse/issues/11835 ))
Updates to the Docker image
---------------------------
- The Docker image no longer automatically creates a temporary volume at `/data`. This is not expected to affect normal usage. ([\#11997](https://github.com/matrix-org/synapse/issues/11997 ))
- Use Python 3.9 in Docker images by default. ([\#12112](https://github.com/matrix-org/synapse/issues/12112 ))
Improved Documentation
----------------------
- Document support for the `to_device`, `account_data`, `receipts`, and `presence` stream writers for workers. ([\#11599](https://github.com/matrix-org/synapse/issues/11599 ))
- Explain the meaning of spam checker callbacks' return values. ([\#12003](https://github.com/matrix-org/synapse/issues/12003 ))
- Clarify information about external Identity Provider IDs. ([\#12004](https://github.com/matrix-org/synapse/issues/12004 ))
Deprecations and Removals
-------------------------
- Deprecate using `synctl` with the config option `synctl_cache_factor` and print a warning if a user still uses this option. ([\#11865](https://github.com/matrix-org/synapse/issues/11865 ))
- Remove support for the legacy structured logging configuration (please see the the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#legacy-structured-logging-configuration-removal ) if you are using `structured: true` in the Synapse configuration). ([\#12008](https://github.com/matrix-org/synapse/issues/12008 ))
- Drop support for [MSC3283](https://github.com/matrix-org/matrix-doc/pull/3283 ) unstable flags now that the stable flags are supported. ([\#12018](https://github.com/matrix-org/synapse/issues/12018 ))
- Remove the unstable `/spaces` endpoint from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946 ). ([\#12073](https://github.com/matrix-org/synapse/issues/12073 ))
Internal Changes
----------------
- Make the `get_room_version` method use `get_room_version_id` to benefit from caching. ([\#11808](https://github.com/matrix-org/synapse/issues/11808 ))
- Remove unnecessary condition on knock -> leave auth rule check. ([\#11900](https://github.com/matrix-org/synapse/issues/11900 ))
- Add tests for device list changes between local users. ([\#11972](https://github.com/matrix-org/synapse/issues/11972 ))
- Optimise calculating `device_list` changes in `/sync`. ([\#11974](https://github.com/matrix-org/synapse/issues/11974 ))
- Add missing type hints to storage classes. ([\#11984](https://github.com/matrix-org/synapse/issues/11984 ))
- Refactor the search code for improved readability. ([\#11991](https://github.com/matrix-org/synapse/issues/11991 ))
- Move common deduplication code down into `_auth_and_persist_outliers`. ([\#11994](https://github.com/matrix-org/synapse/issues/11994 ))
- Limit concurrent joins from applications services. ([\#11996](https://github.com/matrix-org/synapse/issues/11996 ))
- Preparation for faster-room-join work: when parsing the `send_join` response, get the `m.room.create` event from `state`, not `auth_chain`. ([\#12005](https://github.com/matrix-org/synapse/issues/12005 ), [\#12039](https://github.com/matrix-org/synapse/issues/12039 ))
- Preparation for faster-room-join work: parse MSC3706 fields in send_join response. ([\#12011](https://github.com/matrix-org/synapse/issues/12011 ))
- Preparation for faster-room-join work: persist information on which events and rooms have partial state to the database. ([\#12012](https://github.com/matrix-org/synapse/issues/12012 ))
- Preparation for faster-room-join work: Support for calling `/federation/v1/state` on a remote server. ([\#12013](https://github.com/matrix-org/synapse/issues/12013 ))
- Configure `tox` to use `venv` rather than `virtualenv`. ([\#12015](https://github.com/matrix-org/synapse/issues/12015 ))
- Fix bug in `StateFilter.return_expanded()` and add some tests. ([\#12016](https://github.com/matrix-org/synapse/issues/12016 ))
- Use Matrix v1.1 endpoints (`/_matrix/client/v3/auth/...`) in fallback auth HTML forms. ([\#12019](https://github.com/matrix-org/synapse/issues/12019 ))
- Update the `olddeps` CI job to use an old version of `markupsafe`. ([\#12025](https://github.com/matrix-org/synapse/issues/12025 ))
- Upgrade Mypy to version 0.931. ([\#12030](https://github.com/matrix-org/synapse/issues/12030 ))
- Remove legacy `HomeServer.get_datastore()`. ([\#12031](https://github.com/matrix-org/synapse/issues/12031 ), [\#12070](https://github.com/matrix-org/synapse/issues/12070 ))
- Minor typing fixes. ([\#12034](https://github.com/matrix-org/synapse/issues/12034 ), [\#12069](https://github.com/matrix-org/synapse/issues/12069 ))
- After joining a room, create a dedicated logcontext to process the queued events. ([\#12041](https://github.com/matrix-org/synapse/issues/12041 ))
- Tidy up GitHub Actions config which builds distributions for PyPI. ([\#12051](https://github.com/matrix-org/synapse/issues/12051 ))
- Move configuration out of `setup.cfg`. ([\#12052](https://github.com/matrix-org/synapse/issues/12052 ), [\#12059](https://github.com/matrix-org/synapse/issues/12059 ))
- Fix error message when a worker process fails to talk to another worker process. ([\#12060](https://github.com/matrix-org/synapse/issues/12060 ))
- Fix using the `complement.sh` script without specifying a directory or a branch. Contributed by Nico on behalf of Famedly. ([\#12063](https://github.com/matrix-org/synapse/issues/12063 ))
- Add type hints to `tests/rest/client`. ([\#12066](https://github.com/matrix-org/synapse/issues/12066 ), [\#12072](https://github.com/matrix-org/synapse/issues/12072 ), [\#12084](https://github.com/matrix-org/synapse/issues/12084 ), [\#12094](https://github.com/matrix-org/synapse/issues/12094 ))
- Add some logging to `/sync` to try and track down #11916 . ([\#12068](https://github.com/matrix-org/synapse/issues/12068 ))
- Inspect application dependencies using `importlib.metadata` or its backport. ([\#12088](https://github.com/matrix-org/synapse/issues/12088 ))
- Use `assertEqual` instead of the deprecated `assertEquals` in test code. ([\#12092](https://github.com/matrix-org/synapse/issues/12092 ))
- Move experimental support for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440 ) to `/versions`. ([\#12099](https://github.com/matrix-org/synapse/issues/12099 ))
- Add `stop_cancellation` utility function to stop `Deferred`s from being cancelled. ([\#12106](https://github.com/matrix-org/synapse/issues/12106 ))
- Improve exception handling for concurrent execution. ([\#12109](https://github.com/matrix-org/synapse/issues/12109 ))
- Advertise support for Python 3.10 in packaging files. ([\#12111](https://github.com/matrix-org/synapse/issues/12111 ))
- Move CI checks out of tox, to facilitate a move to using poetry. ([\#12119](https://github.com/matrix-org/synapse/issues/12119 ))
2022-03-02 15:26:43 +00:00
Erik Johnston
6d282a9c89
Make release script write correct no-op changelog ( #12127 )
...
As we want to include the previous version in the "No new changes..."
string.
2022-03-02 14:28:18 +00:00
Patrick Cloke
1103c5fe8a
Check if instances are lists, not sequences. ( #12128 )
...
As a str is a sequence, the checks were not granular
enough and would allow lists or strings, when only
lists were valid.
2022-03-02 13:18:51 +00:00
David Robertson
f3f0ab10fe
Move scripts directory inside synapse, exposing as setuptools entry_points ( #12118 )
...
* Two scripts are basically entry_points already
* Move and rename scripts/* to synapse/_scripts/*.py
* Delete sync_room_to_group.pl
* Expose entry points in setup.py
* Update linter script and config
* Fixup scripts & docs mentioning scripts that moved
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2022-03-02 13:00:16 +00:00
Patrick Cloke
6adb89ff00
Improve and refactor the tests for relations. ( #12113 )
...
* Modernizes code (f-strings, etc.)
* Fixes incorrect comments.
* Splits the test case into two.
* Factors out some duplicated code.
2022-03-02 06:56:16 -05:00
Olivier Wilkinson (reivilibre)
879e4a7bd7
1.54.0rc1
2022-03-02 10:45:16 +00:00