1
0
Commit Graph

17474 Commits

Author SHA1 Message Date
Olivier Wilkinson (reivilibre)
8d9f4ba57c Merge remote-tracking branch 'origin/develop' into rei/2528_catchup_fed_outage 2020-09-01 10:43:06 +01:00
Richard van der Hoff
45e8f7726f Rename get_e2e_device_keys to better reflect its purpose (#8205)
... and to show that it does something slightly different to
`_get_e2e_device_keys_txn`.

`include_all_devices` and `include_deleted_devices` were never used (and
`include_deleted_devices` was broken, since that would cause `None`s in the
result which were not handled in the loop below.

Add some typing too.
2020-08-29 00:14:17 +01:00
Richard van der Hoff
8027166dd5 Add a comment about _LimitedHostnameResolver 2020-08-29 00:06:00 +01:00
Patrick Cloke
d2ac767de2 Convert ReadWriteLock to async/await. (#8202) 2020-08-28 16:47:11 -04:00
Andrew Morgan
b4826d6eb1 Fix incorrect return signature 2020-08-28 17:39:48 +01:00
Erik Johnston
3b4556cf87 Fix wait_for_stream_position for multiple waiters. (#8196)
This fixes a bug where having multiple callers waiting on the same
stream and position will cause it to try and compare two deferreds,
which fails (due to the sorted list having an entry of `Tuple[int,
Deferred]`).
2020-08-28 17:12:45 +01:00
Patrick Cloke
d58fda99ff Convert event_push_actions, registration, and roommember datastores to async (#8197) 2020-08-28 11:34:50 -04:00
Richard van der Hoff
22b926c284 Only return devices with keys from /federation/v1/user/devices/ (#8198)
There's not much point in returning all the others, and some people have a
silly number of devices.
2020-08-28 15:59:28 +01:00
Patrick Cloke
aec7085179 Convert state and stream stores and related code to async (#8194) 2020-08-28 09:37:55 -04:00
Patrick Cloke
b055dc9322 Ensure that the OpenID Connect remote ID is a string. (#8190) 2020-08-28 08:56:36 -04:00
Patrick Cloke
5c03134d0f Convert additional database code to async/await. (#8195) 2020-08-28 07:54:27 -04:00
Patrick Cloke
d5e73cb6aa Define StateMap as immutable and add a MutableStateMap type. (#8183) 2020-08-28 07:28:53 -04:00
Andrew Morgan
2c2e649be2 Move and refactor LoginRestServlet helper methods (#8182)
This is split out from https://github.com/matrix-org/synapse/pull/7438, which had gotten rather large.

`LoginRestServlet` has a couple helper methods, `login_submission_legacy_convert` and `login_id_thirdparty_from_phone`. They're primarily used for converting legacy user login submissions to "identifier" dicts ([see spec](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-login)). Identifying information such as usernames or 3PID information used to be top-level in the login body. They're now supposed to be put inside an [identifier](https://matrix.org/docs/spec/client_server/r0.6.1#identifier-types) parameter instead.

#7438's purpose is to allow using the new identifier parameter during User-Interactive Authentication, which is currently handled in AuthHandler. That's why I've moved these helper methods there. I also moved the refactoring of these method from #7438 as they're relevant.
2020-08-28 09:58:17 +01:00
Patrick Cloke
e00816ad98 Do not yield on awaitables in tests. (#8193) 2020-08-27 17:24:46 -04:00
Patrick Cloke
b49a5b9307 Convert stats and related calls to async/await (#8192) 2020-08-27 17:24:37 -04:00
Patrick Cloke
b71d4a094c Convert simple_delete to async/await. (#8191) 2020-08-27 14:16:41 -04:00
Patrick Cloke
9b7ac03af3 Convert calls of async database methods to async (#8166) 2020-08-27 13:38:41 -04:00
Patrick Cloke
c9fa696ea2 simple_search_list_txn should return None, not 0. (#8187) 2020-08-27 12:07:13 -04:00
Erik Johnston
5649b7f3d0 Fix missing _add_persisted_position (#8179)
This was forgotten in #8164.
2020-08-27 13:20:34 +01:00
Patrick Cloke
30426c7063 Convert additional database methods to async (select list, search, insert_many, delete_*) (#8168) 2020-08-27 07:41:01 -04:00
Patrick Cloke
4a739c73b4 Convert simple_update* and simple_select* to async (#8173) 2020-08-27 07:08:38 -04:00
Andrew Morgan
a466b67972 Reduce run-times of tests by advancing the reactor less (#7757) 2020-08-27 11:39:53 +01:00
Brendan Abolivier
9cfc120233 Merge branch 'master' into develop 2020-08-27 11:01:21 +01:00
Brendan Abolivier
eadfda3ebc 1.19.1 v1.19.1 2020-08-27 10:50:39 +01:00
Olivier Wilkinson (reivilibre)
7589a0311c Antilint again :( 2020-08-27 10:41:33 +01:00
Dexter Chua
cf2f6c3d22 Update debian systemd service to use Type=notify (#8169)
This ensures systemctl start matrix-synapse returns only after synapse
is actually started, which is very useful for automated deployments.

Fixes #5761

Signed-off-by: Dexter Chua <dec41@srcf.net>
2020-08-27 10:39:13 +01:00
Olivier Wilkinson (reivilibre)
bf51d2ffc7 Also fix simple_select_onecol_txn 2020-08-27 09:10:07 +01:00
Olivier Wilkinson (reivilibre)
7cfecf3b17 Antilint 2020-08-27 09:02:05 +01:00
Olivier Wilkinson (reivilibre)
e6890c77df Fix the tests after removing event_id column 2020-08-27 09:00:47 +01:00
Olivier Wilkinson (reivilibre)
b1fd67bdf0 Fix wrong type signatures (even if str is Iterable[str]…) 2020-08-27 08:53:23 +01:00
Olivier Wilkinson (reivilibre)
ad7124d3c8 Merge branch 'develop' into rei/2528_catchup_fed_outage 2020-08-27 08:49:00 +01:00
Olivier Wilkinson (reivilibre)
843403f2d4 Remove review question 2020-08-27 08:32:45 +01:00
Olivier Wilkinson (reivilibre)
b0bdadd0bf Antilint 2020-08-27 08:25:39 +01:00
Olivier Wilkinson (reivilibre)
3e308f9e0c Don't explicitly store the event_id 2020-08-27 08:22:02 +01:00
Olivier Wilkinson (reivilibre)
de5caf0928 Catch-up on all cases except federation denial 2020-08-27 07:01:32 +01:00
Olivier Wilkinson (reivilibre)
ef4680df22 Last successful stream ordering is about destinations 2020-08-26 21:01:48 +01:00
Olivier Wilkinson (reivilibre)
92517e95fc Assertion on bug 2020-08-26 21:01:06 +01:00
Olivier Wilkinson (reivilibre)
16eec5cbfa The early bird gets the early return
(hopefully with a worm as the return value)
2020-08-26 20:49:50 +01:00
Olivier Wilkinson (reivilibre)
c1a2b680c4 Behaviour confirmed reasonable-seeming 2020-08-26 20:31:57 +01:00
Olivier Wilkinson (reivilibre)
33874d4e54 SQL column doc 2020-08-26 20:23:41 +01:00
Olivier Wilkinson (reivilibre)
d77e444a85 NOT NULL, foreign key (events) 2020-08-26 20:20:43 +01:00
Olivier Wilkinson (reivilibre)
2c740a79d3 Foreign key on rooms, SQL comment 2020-08-26 20:16:23 +01:00
reivilibre
84dbc43ce1 Apply suggestions from Rich's code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2020-08-26 20:13:15 +01:00
reivilibre
56aaa17c8e Apply suggestions from Rich's code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2020-08-26 20:08:51 +01:00
Andrew Morgan
b8f20e4276 Remove remaining is_guest argument uses from get_room_data calls (#8181)
#8174 removed the `is_guest` parameter from `get_room_data`, at the same time that #8157 was merged using it, colliding together to break unit tests on develop.

This PR removes the `is_guest` parameter from the call in the broken test.

Uses the same changelog as #8174.
2020-08-26 17:26:56 +01:00
Patrick Cloke
6fe12c9512 Do not propagate typing notifications from shadow-banned users. (#8176) 2020-08-26 12:05:36 -04:00
Andrew Morgan
e0d6244beb Remove unused parameter from, and add safeguard in, get_room_data (#8174)
Small cleanup PR.

* Removed the unused `is_guest` argument
* Added a safeguard to a (currently) impossible code path, fixing static checking at the same time.
2020-08-26 15:07:35 +01:00
Christopher May-Townsend
ed18f32e1b Add required Debian dependencies to allow docker builds on the arm platform (#8144)
Signed-off-by: Christopher May-Townsend <chris@maytownsend.co.uk>
2020-08-26 15:03:20 +01:00
Patrick Cloke
98125bba7a Allow running mypy directly. (#8175) 2020-08-26 09:59:37 -04:00
Richard van der Hoff
88b9807ba4 Update the test federation client to handle streaming responses (#8130)
Now that the server supports streaming back JSON responses, it would be nice to
show the response as it is streamed, in the test tool.
2020-08-26 14:11:38 +01:00