Eric Eastwood
50f0342594
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
...
Conflicts:
poetry.lock
synapse/api/auth.py
synapse/federation/federation_client.py
synapse/logging/opentracing.py
synapse/rest/client/keys.py
synapse/rest/client/sendtodevice.py
synapse/storage/schema/__init__.py
2022-09-09 16:28:05 -05:00
David Robertson
f2d2481e56
Require SQLite >= 3.27.0 ( #13760 )
2022-09-09 11:14:10 +01:00
Dirk Klimpel
f799eac7ea
Add timestamp to user's consent ( #13741 )
...
Co-authored-by: reivilibre <olivier@librepush.net>
2022-09-08 15:41:48 +00:00
Sean Quah
8ef0c8ff14
Fix error in is_mine_id
when encountering a malformed ID ( #13746 )
...
Previously, `is_mine_id` would raise an exception when passed an ID with
no colons. Return `False` instead.
Fixes #13040 .
Signed-off-by: Sean Quah <seanq@matrix.org>
2022-09-08 15:54:36 +01:00
reivilibre
d3d9ca156e
Cancel the processing of key query requests when they time out. ( #13680 )
2022-09-07 12:03:32 +01:00
reivilibre
c2fe48a6ff
Rename the EventFormatVersions
enum values so that they line up with room version numbers. ( #13706 )
2022-09-07 11:08:20 +01:00
Connor Davis
bb5b47b62a
Add Admin API to Fetch Messages Within a Particular Window ( #13672 )
...
This adds two new admin APIs that allow us to fetch messages from a room within a particular time.
2022-09-07 10:54:44 +01:00
Erik Johnston
c9b7e97355
Add a stub Rust crate ( #12595 )
2022-09-06 19:01:37 +01:00
Patrick Cloke
32fc3b7ba4
Remove configuration options for direct TCP replication. ( #13647 )
...
Removes the ability to configure legacy direct TCP replication. Workers now require Redis to run.
2022-09-06 07:50:02 +00:00
Brendan Abolivier
898fef2789
Share some metrics between the Prometheus exporter and the phone home stats ( #13671 )
2022-09-05 10:26:43 +00:00
Patrick Cloke
390b7ce946
Disable calculating unread counts unless the config flag is enabled. ( #13694 )
...
This avoids doing work that will never be used (since the
resulting unread counts will never be sent in a /sync
response).
The negative of doing this is that unread counts will be
incorrect when the feature is initially enabled.
2022-09-01 16:52:03 +00:00
Šimon Brandner
0e99f07952
Remove support for unstable private read receipts ( #13653 )
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2022-09-01 13:31:54 +01:00
Jacek Kuśnierz
84ddcd7bbf
Drop support for calling /_matrix/client/v3/rooms/{roomId}/invite
without an id_access_token
( #13241 )
...
Fixes #13206
Signed-off-by: Jacek Kusnierz jacek.kusnierz@tum.de
2022-08-31 12:10:25 +00:00
reivilibre
7bc110a19e
Generalise the @cancellable
annotation so it can be used on functions other than just servlet methods. ( #13662 )
2022-08-31 11:16:05 +00:00
David Robertson
a160406d24
Fix admin List Room API return type on sqlite ( #13509 )
2022-08-31 10:38:16 +00:00
Dirk Klimpel
682dfcfc0d
Fix that user cannot /forget
rooms after the last member has left ( #13546 )
2022-08-30 09:58:38 +00:00
Eric Eastwood
1a209efdb2
Update get_users_in_room
mis-use to get hosts with dedicated get_current_hosts_in_room
( #13605 )
...
See https://github.com/matrix-org/synapse/pull/13575#discussion_r953023755
2022-08-24 14:15:37 -05:00
Eric Eastwood
d58615c82c
Directly lookup local membership instead of getting all members in a room first (get_users_in_room
mis-use) ( #13608 )
...
See https://github.com/matrix-org/synapse/pull/13575#discussion_r953023755
2022-08-24 14:13:12 -05:00
reivilibre
be4250c7a8
Add experimental configuration option to allow disabling legacy Prometheus metric names. ( #13540 )
...
Co-authored-by: David Robertson <davidr@element.io>
2022-08-24 11:35:54 +00:00
David Robertson
956e015413
Drop support for delegating email validation, round 2 ( #13596 )
2022-08-23 11:40:00 +00:00
Dirk Klimpel
37f329c9ad
Fix that sending server notices fail if avatar is None
( #13566 )
...
Indroduced in #11846 .
2022-08-23 09:48:35 +01:00
Quentin Gliech
3dd175b628
synapse.api.auth.Auth
cleanup: make permission-related methods use Requester
instead of the UserID
(#13024 )
...
Part of #13019
This changes all the permission-related methods to rely on the Requester instead of the UserID. This is a first step towards enabling scoped access tokens at some point, since I expect the Requester to have scope-related informations in it.
It also changes methods which figure out the user/device/appservice out of the access token to return a Requester instead of something else. This avoids having store-related objects in the methods signatures.
2022-08-22 14:17:59 +01:00
Andrew Morgan
f9f03426de
Implement MSC3852: Expose last_seen_user_agent
to users for their own devices; also expose to Admin API ( #13549 )
2022-08-19 16:17:10 +00:00
Andrew Morgan
40e3e68cd7
Register homeserver modules when creating test homeserver ( #13558 )
2022-08-19 16:52:20 +01:00
Patrick Cloke
f3fba4914d
Reduce the number of tests using TCP replication. ( #13543 )
...
Uses Redis replication in additional test cases (instead of
TCP replication). A small step towards dropping TCP replication.
2022-08-19 08:25:24 -04:00
reivilibre
3a245f6cfe
Fix validation problem that occurs when a user tries to deactivate their account or change their password. ( #13563 )
2022-08-19 11:03:29 +00:00
Eric Eastwood
8def7e4b4b
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
...
Conflicts:
poetry.lock
synapse/federation/federation_client.py
synapse/federation/federation_server.py
synapse/handlers/federation.py
synapse/handlers/federation_event.py
synapse/logging/opentracing.py
synapse/rest/client/room.py
synapse/storage/controllers/persist_events.py
synapse/storage/controllers/state.py
2022-08-18 16:33:22 -05:00
reivilibre
8bdf2bd31e
Fix a bug in the /event_reports
Admin API which meant that the total count could be larger than the number of results you can actually query for. ( #13525 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-17 18:08:23 +00:00
Dirk Klimpel
d75512d19e
Add forgotten status to Room Details API ( #13503 )
2022-08-17 09:42:01 +00:00
Erik Johnston
5442891cbc
Make push rules use proper structures. ( #13522 )
...
This improves load times for push rules:
| Version | Time per user | Time for 1k users |
| -------------------- | ------------- | ----------------- |
| Before | 138 µs | 138ms |
| Now (with custom) | 2.11 µs | 2.11ms |
| Now (without custom) | 49.7 ns | 0.05 ms |
This therefore has a large impact on send times for rooms
with large numbers of local users in the room.
2022-08-16 12:22:17 +01:00
David Robertson
d642ce4b32
Use Pydantic to systematically validate a first batch of endpoints in synapse.rest.client.account
. ( #13188 )
2022-08-15 19:05:57 +00:00
David Robertson
19e5d44886
Revert "Update locked versions of mypy and mypy-zope ( #13521 )"
...
This reverts commit f383b9b3ec
. Other PRs
were seeing mypy failures that looked to be related to mypy-zope.
Confusingly, we didn't see this on #13521 .
Revert this for now and investigate later.
2022-08-15 14:51:05 +01:00
David Robertson
f383b9b3ec
Update locked versions of mypy and mypy-zope ( #13521 )
2022-08-15 11:32:30 +01:00
Dirk Klimpel
2281427175
Use literals in place of HTTPStatus
constants in tests ( #13488 )
...
* Use literals in place of `HTTPStatus` constants in tests
* newsfile
* code style
* code style
2022-08-10 11:01:12 -07:00
Eric Eastwood
7024d7b86e
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
...
Conflicts:
synapse/logging/opentracing.py
tests/logging/test_opentracing.py
2022-08-09 14:46:03 -05:00
Eric Eastwood
1b09b0832e
Allow use of both @trace
and @tag_args
stacked on the same function ( #13453 )
...
```py
@trace
@tag_args
async def get_oldest_event_ids_with_depth_in_room(...)
...
```
Before this PR, you would see a warning in the logs and the span was not exported:
```
2022-08-03 19:11:59,383 - synapse.logging.opentracing - 835 - ERROR - GET-0 - @trace may not have wrapped EventFederationWorkerStore.get_oldest_event_ids_with_depth_in_room correctly! The function is not async but returned a coroutine.
```
2022-08-09 14:32:33 -05:00
Dirk Klimpel
1595052b26
Use literals in place of HTTPStatus
constants in tests ( #13479 )
...
Replace
- `HTTPStatus.NOT_FOUND`
- `HTTPStatus.FORBIDDEN`
- `HTTPStatus.UNAUTHORIZED`
- `HTTPStatus.CONFLICT`
- `HTTPStatus.CREATED`
Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
2022-08-09 14:56:43 +01:00
Patrick Cloke
5ce2887653
Strengthen tests about deleted old push actions. ( #13471 )
2022-08-09 07:56:16 -04:00
Dirk Klimpel
c97042f7ee
Use literals in place of HTTPStatus
constants in tests ( #13469 )
2022-08-08 13:21:27 -07:00
Šimon Brandner
ab18441573
Support stable identifiers for MSC2285: private read receipts. ( #13273 )
...
This adds support for the stable identifiers of MSC2285 while
continuing to support the unstable identifiers behind the configuration
flag. These will be removed in a future version.
2022-08-05 11:09:33 -04:00
Dirk Klimpel
e2ed1b7155
Use literals in place of HTTPStatus
constants in tests ( #13463 )
2022-08-05 16:59:09 +02:00
Matt C
026ac4486c
Update module API "update room membership" method to allow for remote joins ( #13441 )
...
Co-authored-by: MattC <buffless-matt@users.noreply.github.com>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-05 09:37:58 +00:00
Matt C
a91078200d
Add module API method to create a room ( #13429 )
...
Co-authored-by: MattC <buffless-matt@users.noreply.github.com>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-04 09:34:05 +00:00
Brendan Abolivier
845732be45
Fix rooms not being properly excluded from incremental sync ( #13408 )
2022-08-04 11:02:29 +02:00
Eric Eastwood
699dad008c
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
...
Conflicts:
docs/usage/configuration/config_documentation.md
synapse/api/auth.py
2022-08-03 15:15:34 -05:00
andrew do
78a3111c41
Return 404 or member list when getting joined_members after leaving ( #13374 )
...
Signed-off-by: Andrew Doh <andrewddo@gmail.com>
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: Andrew Morgan <andrewm@element.io>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-03 14:26:31 +02:00
Matt C
570bf32bbb
Add module API method to resolve a room alias to a room ID ( #13428 )
...
Co-authored-by: MattC <buffless-matt@users.noreply.github.com>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-03 09:25:36 +00:00
Eric Eastwood
b6f56656ab
Use latested Twisted from source to fix contextvar issues causing OTEL Failed to detach context
errors
...
See https://github.com/matrix-org/synapse/pull/13400#discussion_r936195492
2022-08-03 00:10:14 -05:00
Eric Eastwood
5999132287
Fix lints
2022-08-02 15:12:33 -05:00
Eric Eastwood
72c718df54
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
...
Conflicts:
docs/usage/configuration/config_documentation.md
synapse/logging/opentracing.py
Got changes from:
- https://github.com/matrix-org/synapse/pull/13362/files
2022-08-02 15:05:27 -05:00