Eric Eastwood
4d9e904a03
Merge branch 'develop' into madlittlemods/optimize-msc2716-v1
...
Conflicts:
synapse/handlers/room_batch.py
2022-02-07 18:28:56 -06:00
Eric Eastwood
cb0ff0b0d5
Merge branch 'madlittlemods/return-historical-events-in-order-from-backfill' into madlittlemods/optimize-msc2716-v1
...
Conflicts:
scripts-dev/complement.sh
2022-02-07 18:25:06 -06:00
Eric Eastwood
fef2e792be
Fix historical messages backfilling in random order on remote homeservers (MSC2716) ( #11114 )
...
Fix https://github.com/matrix-org/synapse/issues/11091
Fix https://github.com/matrix-org/synapse/issues/10764 (side-stepping the issue because we no longer have to deal with `fake_prev_event_id`)
1. Made the `/backfill` response return messages in `(depth, stream_ordering)` order (previously only sorted by `depth`)
- Technically, it shouldn't really matter how `/backfill` returns things but I'm just trying to make the `stream_ordering` a little more consistent from the origin to the remote homeservers in order to get the order of messages from `/messages` consistent ([sorted by `(topological_ordering, stream_ordering)`](https://github.com/matrix-org/synapse/blob/develop/docs/development/room-dag-concepts.md#depth-and-stream-ordering )).
- Even now that we return backfilled messages in order, it still doesn't guarantee the same `stream_ordering` (and more importantly the [`/messages` order](https://github.com/matrix-org/synapse/blob/develop/docs/development/room-dag-concepts.md#depth-and-stream-ordering )) on the other server. For example, if a room has a bunch of history imported and someone visits a permalink to a historical message back in time, their homeserver will skip over the historical messages in between and insert the permalink as the next message in the `stream_order` and totally throw off the sort.
- This will be even more the case when we add the [MSC3030 jump to date API endpoint](https://github.com/matrix-org/matrix-doc/pull/3030 ) so the static archives can navigate and jump to a certain date.
- We're solving this in the future by switching to [online topological ordering](https://github.com/matrix-org/gomatrixserverlib/issues/187 ) and [chunking](https://github.com/matrix-org/synapse/issues/3785 ) which by its nature will apply retroactively to fix any inconsistencies introduced by people permalinking
2. As we're navigating `prev_events` to return in `/backfill`, we order by `depth` first (newest -> oldest) and now also tie-break based on the `stream_ordering` (newest -> oldest). This is technically important because MSC2716 inserts a bunch of historical messages at the same `depth` so it's best to be prescriptive about which ones we should process first. In reality, I think the code already looped over the historical messages as expected because the database is already in order.
3. Making the historical state chain and historical event chain float on their own by having no `prev_events` instead of a fake `prev_event` which caused backfill to get clogged with an unresolvable event. Fixes https://github.com/matrix-org/synapse/issues/11091 and https://github.com/matrix-org/synapse/issues/10764
4. We no longer find connected insertion events by finding a potential `prev_event` connection to the current event we're iterating over. We now solely rely on marker events which when processed, add the insertion event as an extremity and the federating homeserver can ask about it when time calls.
- Related discussion, https://github.com/matrix-org/synapse/pull/11114#discussion_r741514793
Before | After
--- | ---
 | 
#### Why aren't we sorting topologically when receiving backfill events?
> The main reason we're going to opt to not sort topologically when receiving backfill events is because it's probably best to do whatever is easiest to make it just work. People will probably have opinions once they look at [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) which could change whatever implementation anyway.
>
> As mentioned, ideally we would do this but code necessary to make the fake edges but it gets confusing and gives an impression of “just whyyyy” (feels icky). This problem also dissolves with online topological ordering.
>
> -- https://github.com/matrix-org/synapse/pull/11114#discussion_r741517138
See https://github.com/matrix-org/synapse/pull/11114#discussion_r739610091 for the technical difficulties
2022-02-07 15:54:13 -06:00
Eric Eastwood
b3fcffbd16
Use same txn iteration optimization
...
See https://github.com/matrix-org/synapse/pull/11114#discussion_r799354680
2022-02-07 14:46:52 -06:00
Eric Eastwood
023bd3eb8c
Don't run MSC2716 complement tests for everyone
2022-02-07 14:33:43 -06:00
Andrew Morgan
cf06783d54
Remove optional state of ApplicationService.is_interested's store parameter ( #11911 )
2022-02-07 18:26:42 +00:00
Patrick Cloke
314ca4c86d
Pass the proper type when uploading files. ( #11927 )
...
The Content-Length header should be treated as an int, not
a string. This shouldn't have any user-facing change.
2022-02-07 10:06:52 -05:00
Andrew Morgan
e03dde259b
Clean up an indirect reference to the homeserver datastore ( #11914 )
2022-02-07 13:25:09 +00:00
Andrew Morgan
0c4878caf2
Add a unit test for users receiving their own device list updates ( #11909 )
2022-02-07 13:21:19 +00:00
Eric Eastwood
e5670ff818
Fix lints
2022-02-04 16:32:56 -06:00
Eric Eastwood
3f22e42b8a
Fix unused lint
2022-02-04 16:20:29 -06:00
Eric Eastwood
033360aa29
Fix lints
2022-02-04 16:16:13 -06:00
Eric Eastwood
a38befa07b
Some review optimizations
...
See:
- https://github.com/matrix-org/synapse/pull/11114#discussion_r799350801
- https://github.com/matrix-org/synapse/pull/11114#discussion_r799354680
2022-02-04 16:05:57 -06:00
Eric Eastwood
47590bb19e
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
2022-02-04 15:27:01 -06:00
Dirk Klimpel
65ef21b1c7
Clarify that users' media are also preview images ( #11862 )
2022-02-04 14:39:14 +00:00
kegsay
a3865ed525
Run Complement tests sequentially ( #11910 )
...
Since #11811 there has been general Complement flakiness around networking.
It seems like tests are hitting the wrong containers. In an effort to diagnose
the cause of this, as well as reduce its impact on this project, set the
parallelsim to 1 (no parallelism) when running tests.
If this fixes the flakiness then this indicates the cause and I can diagnose
this further. If this doesn't fix the flakiness then that implies some kind
of test pollution which also helps to diagnose this further.
2022-02-04 13:04:57 +00:00
Jonathan de Jong
02632b3504
Stabilise MSC3231 (Token Based Registration) ( #11867 )
2022-02-04 12:15:13 +00:00
Richard van der Hoff
b3d155a749
Delete MSC1711_certificates_FAQ.md ( #11907 )
...
This document isn't really relevant any more, and its existence is more confusing than helpful.
2022-02-04 11:27:00 +00:00
Richard van der Hoff
ce34ffacb1
Merge remote-tracking branch 'origin/master' into develop
2022-02-04 10:47:55 +00:00
Patrick Cloke
119edf51eb
Remove support for the webclient listener. ( #11895 )
...
Also remove support for non-HTTP(S) web_client_location.
2022-02-03 18:36:49 +00:00
Christian Paul
6b1c265c21
Fix typo: unpind -> unbind ( #11859 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2022-02-03 17:20:44 +00:00
Brendan Abolivier
d80d39b035
Add a ratelimiter for 3pid invite ( #11892 )
2022-02-03 14:28:15 +01:00
reivilibre
833247553f
Allow specifying the application service-specific user_id parameter in the join test helper. ( #11616 )
2022-02-03 13:09:22 +00:00
Richard van der Hoff
964f5b9324
Improve opentracing for federation requests ( #11870 )
...
The idea here is to set the parent span for incoming federation requests to the
*outgoing* span on the other end. That means that you can see (most of) the
full end-to-end flow when you have a process that includes federation requests.
However, in order not to lose information, we still want a link to the
`incoming-federation-request` span from the servlet, so we have to create
another span to do exactly that.
2022-02-03 12:29:16 +00:00
Richard van der Hoff
31b554c297
Fixes for opentracing scopes ( #11869 )
...
`start_active_span` was inconsistent as to whether it would activate the span
immediately, or wait for `scope.__enter__` to happen (it depended on whether
the current logcontext already had an associated scope). The inconsistency was
rather confusing if you were hoping to set up a couple of separate spans before
activating either.
Looking at the other implementations of opentracing `ScopeManager`s, the
intention is that it *should* be activated immediately, as the name
implies. Indeed, the idea is that you don't have to use the scope as a
contextmanager at all - you can just call `.close` on the result. Hence, our
cleanup has to happen in `.close` rather than `.__exit__`.
So, the main change here is to ensure that `start_active_span` does activate
the span, and that `scope.close()` does close the scope.
We also add some tests, which requires a `tracer` param so that we don't have
to rely on the global variable in unit tests.
2022-02-02 22:41:57 +00:00
Patrick Cloke
a8da046907
Invalidate the get_users_in_room{_with_profile} caches only when necessary. ( #11878 )
...
The get_users_in_room and get_users_in_room_with_profiles
are now only invalidated when the membership of a room changes,
instead of during any state change in the room.
2022-02-02 12:24:07 -05:00
reivilibre
41818cda1f
Fix type errors introduced by new annotations in the Prometheus Client library. ( #11832 )
...
Co-authored-by: David Robertson <davidr@element.io >
2022-02-02 16:51:00 +00:00
David Robertson
dd7f825118
Fix losing incoming EDUs if debug logging enabled ( #11890 )
...
* Fix losing incoming EDUs if debug logging enabled
Fixes #11889 . Homeservers should only be affected if the
`synapse.8631_debug` logger was enabled for DEBUG mode.
I am not sure if this merits a bugfix release: I think the logging can
be disabled in config if anyone is affected? But it is still pretty bad.
2022-02-02 16:25:17 +00:00
Richard van der Hoff
23a698f5e6
Disable coverage calculation for olddeps build. ( #11888 )
...
We disabled coverage calculation for most of CI in #11017 , but the olddeps
build uses a separate script and got forgotten.
2022-02-02 15:59:33 +00:00
David Robertson
f510fba4ba
Describe prune_unread_entries in docstrings ( #11876 )
...
Should have been caught in #10826 .
2022-02-02 15:11:23 +00:00
Patrick Cloke
acda9f07c8
Revert experimental push rules from #7997 . ( #11884 )
...
Manually reverts the merge from cdbb8e6d6e .
2022-02-02 09:49:31 -05:00
reivilibre
af795173be
Add a background database update to purge account data for deactivated users. ( #11655 )
2022-02-02 11:37:18 +00:00
reivilibre
513913cc6b
Expose the registered device ID from the register_appservice_user test helper. ( #11615 )
2022-02-02 09:59:55 +00:00
Andrew Morgan
3f72c2a322
Convert ApplicationServiceTestCase to use simple_async_mock ( #11880 )
2022-02-01 17:45:13 +00:00
Brendan Abolivier
5c16c33021
Allow modules to retrieve server and worker names ( #11868 )
...
Fixes #10701
2022-02-01 16:23:55 +01:00
Andrew Morgan
64ec45fc1b
Send to-device messages to application services ( #11215 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2022-02-01 14:13:38 +00:00
David Robertson
b7282fe7d1
Don't mention 3.6 EOL under misc
...
It's already under deps & removals
2022-02-01 11:07:12 +00:00
David Robertson
a35e9db9be
1.52.0rc1
2022-02-01 11:04:17 +00:00
Dirk Klimpel
901b264c0c
Add type hints to tests/rest/admin ( #11851 )
2022-01-31 14:20:05 -05:00
Dirk Klimpel
0da2301b21
Consolidate the access_token information in the admin api ( #11861 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2022-01-31 16:24:29 +00:00
Patrick Cloke
02755c3188
Remove the obsolete MSC1849 configuration flag. ( #11843 )
...
MSC1849 was replaced by MSC2675, which was merged.
The configuration flag, which defaulted to true, is no
longer useful.
2022-01-31 10:13:32 -05:00
Dirk Klimpel
7eb198ddc8
Remove not needed old table of contents in documentation ( #11860 )
2022-01-31 14:40:20 +00:00
Brendan Abolivier
bf60da1a60
Configurable limits on avatars ( #11846 )
...
Only allow files which file size and content types match configured
limits to be set as avatar.
Most of the inspiration from the non-test code comes from matrix-org/synapse-dinsic#19
2022-01-28 15:41:33 +01:00
Brendan Abolivier
6d482ba259
Pass isolation_level to runWithConnection ( #11847 )
...
This was missed in https://github.com/matrix-org/synapse/pull/11799
2022-01-27 17:45:39 +00:00
Richard van der Hoff
57e4786e90
Create singletons for StateFilter.{all,none}() ( #11836 )
...
No point recreating these for each call, since they are frozen
2022-01-27 10:54:27 +00:00
Dirk Klimpel
fd65139714
Fix some indentation inconsistencies in the sample config (modules) ( #11838 )
2022-01-27 10:06:29 +00:00
Shay
ec07062e31
Update installation docs to indicate that we support Python 3.10 ( #11820 )
2022-01-26 16:05:29 -08:00
Vaishnav Nair
cef0d5d90a
Include prev_content field in AS events ( #11798 )
...
* Include 'prev_content' field in AS events
Signed-off-by: Vaishnav Nair <nairvaishnav007@icloud.com >
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2022-01-26 14:48:27 +00:00
Brendan Abolivier
2d3bd9aa67
Add a module callback to set username at registration ( #11790 )
...
This is in the context of mainlining the Tchap fork of Synapse. Currently in Tchap usernames are derived from the user's email address (extracted from the UIA results, more specifically the m.login.email.identity step).
This change also exports the check_username method from the registration handler as part of the module API, so that a module can check if the username it's trying to generate is correct and doesn't conflict with an existing one, and fallback gracefully if not.
Co-authored-by: David Robertson <davidr@element.io >
2022-01-26 14:21:13 +00:00
Patrick Cloke
2897fb6b4f
Improvements to bundling aggregations. ( #11815 )
...
This is some odds and ends found during the review of #11791
and while continuing to work in this code:
* Return attrs classes instead of dictionaries from some methods
to improve type safety.
* Call `get_bundled_aggregations` fewer times.
* Adds a missing assertion in the tests.
* Do not return empty bundled aggregations for an event (preferring
to not include the bundle at all, as the docstring states).
2022-01-26 08:27:04 -05:00
David Robertson
d8df8e6c14
Don't print HTTPStatus.* in "Processed..." logs ( #11827 )
...
* Don't print HTTPStatus.* in "Processed..." logs
Fixes #11812 . See also #7118 and
https://github.com/matrix-org/synapse/pull/7188#r401719326 in
particular.
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2022-01-26 12:47:34 +00:00
David Robertson
c5815567a4
Avoid type annotation problems in prom-client ( #11834 )
2022-01-26 12:06:56 +00:00
Brendan Abolivier
95b3f952fa
Add a config flag to inhibit M_USER_IN_USE during registration ( #11743 )
...
This is mostly motivated by the tchap use case, where usernames are automatically generated from the user's email address (in a way that allows figuring out the email address from the username). Therefore, it's an issue if we respond to requests on /register and /register/available with M_USER_IN_USE, because it can potentially leak email addresses (which include the user's real name and place of work).
This commit adds a flag to inhibit the M_USER_IN_USE errors that are raised both by /register/available, and when providing a username early into the registration process. This error will still be raised if the user completes the registration process but the username conflicts. This is particularly useful when using modules (https://github.com/matrix-org/synapse/pull/11790 adds a module callback to set the username of users at registration) or SSO, since they can ensure the username is unique.
More context is available in the PR that introduced this behaviour to synapse-dinsic: matrix-org/synapse-dinsic#48 - as well as the issue in the matrix-dinsic repo: matrix-org/matrix-dinsic#476
2022-01-26 13:02:54 +01:00
Eric Eastwood
55ef667e96
Add extra potential check
2022-01-25 17:42:58 -06:00
David Robertson
74e4419eb4
Fix another jsonschema typecheck error ( #11830 )
...
Similar to #11817 .
In `_create_power_level_validator` we
- retrieve `validator`. This is a class implementing the
`jsonschema.protocols.Validator` interface. In other words,
`validator: Type[jsonschema.protocols.Validator]`.
- we then create an second validator class by modifying the original
`validator`. We return that class, which is also of type
`Type[jsonschema.protocols.Validator]`.
So the original annotation was incorrect: it claimed we were returning
an instance of jsonSchema.Draft7Validator, not the class (or a subclass)
itself. (Strictly speaking this is incorrect, because `POWER_LEVELS_SCHEMA`
isn't pinned to a particular version of JSON Schema. But there are other
complications with the type stubs if you try to fix this; I felt like
the change herein was a decent compromise that better expresses intent).
(I suspect/hope the typeshed project would welcome an effort to improve
the jsonschema stubs. Let's see if I get some spare time.)
2022-01-25 15:29:28 -05:00
Shay
b8bf600700
Check that gc method is available before using in synapse/app/_base ( #11816 )
...
* add check that gc.freeze is available before calling
* newsfragment
* lint
* Update comment
Co-authored-by: Dan Callahan <danc@element.io >
Co-authored-by: Dan Callahan <danc@element.io >
2022-01-25 10:35:18 -08:00
Dirk Klimpel
6a72c910f1
Add admin API to get a list of federated rooms ( #11658 )
2022-01-25 16:11:40 +00:00
kegsay
0938f32e93
CI: run Complement on the VM, not inside Docker ( #11811 )
...
* CI: run Complement on the VM, not inside Docker
This requires https://github.com/matrix-org/complement/pull/289
We now run Complement on the VM instead of inside a Docker container.
This is to allow Complement to bind to any high-numbered port when it
starts up its own federation servers. We want to do this to allow for
more concurrency when running complement tests. Previously, Complement
only ever bound to `:8448` when running its own federation server. This
prevented multiple federation tests running at the same time as they would
fight each other on the port. This did however allow Complement to run
in Docker, as the host could just port forward `:8448` to allow homeserver
containers to communicate to Complement. Now that we are using random
ports however, we cannot use Docker to run Complement. This ends up
being a good thing because:
- Running Complement tests locally is closer to how they run in CI.
- Allows the `CI` env var to be removed in Complement.
- Slightly speeds up runs as we don't need to pull down the Complement
image prior to running tests. This assumes GHA caches actions sensibly.
* Changelog
* Full stop
* Update .github/workflows/tests.yml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Review comments
* Update .github/workflows/tests.yml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2022-01-25 15:05:22 +00:00
Brendan Abolivier
1d5f7b2cc6
Log modules at startup ( #11813 )
2022-01-25 15:35:35 +01:00
Nick Barrett
b59d285f7c
Db txn set isolation level ( #11799 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2022-01-25 15:14:46 +01:00
Richard van der Hoff
fc8598bc87
Minor updates, and docs, for schema delta files ( #11823 )
...
* Make functions in python deltas optional
It's annoying to always have to write stubs for these.
* Documentation for delta files
* changelog
2022-01-25 14:11:13 +00:00
Forest Johnson
4210143f53
Docs: add missing PR submission process how-tos ( #11821 )
...
* Docs: add missing PR submission process how-tos
The documentation says that in order to submit a pull request you have to run the linter and links to [Run the linters](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#run-the-linters ). IMO "Run the linters" should explain that development dependencies are a pre-requisite.
I also included `pip install wheel` which I had to run inside my virtual environment on ubuntu before I `pip install -e ".[all,dev]"` would succeed.
2022-01-25 14:09:56 +00:00
David Robertson
4e09d727b6
Use changelog from develop
...
It had already accounted for 1.50.2 (ordered chronologically rather than
sem-ver-ically); it just seems this wasn't merged into master when we
released 1.50.2.
2022-01-25 12:53:29 +00:00
David Robertson
6911604a0f
Merge branch 'master' into develop
2022-01-25 12:52:27 +00:00
David Robertson
8e45dfbe25
Merge branch 'release-v1.51'
2022-01-25 12:35:30 +00:00
David Robertson
b500fcbc0c
Merge tag 'v1.51.0'
...
Synapse 1.51.0 (2022-01-25)
===========================
No significant changes since 1.51.0rc2.
Synapse 1.51.0 deprecates `webclient` listeners and non-HTTP(S) `web_client_location`s. Support for these will be removed in Synapse 1.53.0, at which point Synapse will not be capable of directly serving a web client for Matrix.
Synapse 1.51.0rc2 (2022-01-24)
==============================
Bugfixes
--------
- Fix a bug introduced in Synapse 1.40.0 that caused Synapse to fail to process incoming federation traffic after handling a large amount of events in a v1 room. ([\#11806](https://github.com/matrix-org/synapse/issues/11806 ))
Synapse 1.51.0rc1 (2022-01-21)
==============================
Features
--------
- Add `track_puppeted_user_ips` config flag to record client IP addresses against puppeted users, and include the puppeted users in monthly active user counts. ([\#11561](https://github.com/matrix-org/synapse/issues/11561 ), [\#11749](https://github.com/matrix-org/synapse/issues/11749 ), [\#11757](https://github.com/matrix-org/synapse/issues/11757 ))
- Include whether the requesting user has participated in a thread when generating a summary for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440 ). ([\#11577](https://github.com/matrix-org/synapse/issues/11577 ))
- Return an `M_FORBIDDEN` error code instead of `M_UNKNOWN` when a spam checker module prevents a user from creating a room. ([\#11672](https://github.com/matrix-org/synapse/issues/11672 ))
- Add a flag to the `synapse_review_recent_signups` script to ignore and filter appservice users. ([\#11675](https://github.com/matrix-org/synapse/issues/11675 ), [\#11770](https://github.com/matrix-org/synapse/issues/11770 ))
Bugfixes
--------
- Fix a long-standing issue which could cause Synapse to incorrectly accept data in the unsigned field of events
received over federation. ([\#11530](https://github.com/matrix-org/synapse/issues/11530 ))
- Fix a long-standing bug where Synapse wouldn't cache a response indicating that a remote user has no devices. ([\#11587](https://github.com/matrix-org/synapse/issues/11587 ))
- Fix an error that occurs whilst trying to get the federation status of a destination server that was working normally. This admin API was newly introduced in Synapse v1.49.0. ([\#11593](https://github.com/matrix-org/synapse/issues/11593 ))
- Fix bundled aggregations not being included in the `/sync` response, per [MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675 ). ([\#11612](https://github.com/matrix-org/synapse/issues/11612 ), [\#11659](https://github.com/matrix-org/synapse/issues/11659 ), [\#11791](https://github.com/matrix-org/synapse/issues/11791 ))
- Fix the `/_matrix/client/v1/room/{roomId}/hierarchy` endpoint returning incorrect fields which have been present since Synapse 1.49.0. ([\#11667](https://github.com/matrix-org/synapse/issues/11667 ))
- Fix preview of some GIF URLs (like tenor.com). Contributed by Philippe Daouadi. ([\#11669](https://github.com/matrix-org/synapse/issues/11669 ))
- Fix a bug where only the first 50 rooms from a space were returned from the `/hierarchy` API. This has existed since the introduction of the API in Synapse v1.41.0. ([\#11695](https://github.com/matrix-org/synapse/issues/11695 ))
- Fix a bug introduced in Synapse v1.18.0 where password reset and address validation emails would not be sent if their subject was configured to use the 'app' template variable. Contributed by @br4nnigan. ([\#11710](https://github.com/matrix-org/synapse/issues/11710 ), [\#11745](https://github.com/matrix-org/synapse/issues/11745 ))
- Make the 'List Rooms' Admin API sort stable. Contributed by Daniël Sonck. ([\#11737](https://github.com/matrix-org/synapse/issues/11737 ))
- Fix a long-standing bug where space hierarchy over federation would only work correctly some of the time. ([\#11775](https://github.com/matrix-org/synapse/issues/11775 ))
- Fix a bug introduced in Synapse v1.46.0 that prevented `on_logged_out` module callbacks from being correctly awaited by Synapse. ([\#11786](https://github.com/matrix-org/synapse/issues/11786 ))
Improved Documentation
----------------------
- Warn against using a Let's Encrypt certificate for TLS/DTLS TURN server client connections, and suggest using ZeroSSL certificate instead. This works around client-side connectivity errors caused by WebRTC libraries that reject Let's Encrypt certificates. Contibuted by @AndrewFerr. ([\#11686](https://github.com/matrix-org/synapse/issues/11686 ))
- Document the new `SYNAPSE_TEST_PERSIST_SQLITE_DB` environment variable in the contributing guide. ([\#11715](https://github.com/matrix-org/synapse/issues/11715 ))
- Document that the minimum supported PostgreSQL version is now 10. ([\#11725](https://github.com/matrix-org/synapse/issues/11725 ))
- Fix typo in demo docs: differnt. ([\#11735](https://github.com/matrix-org/synapse/issues/11735 ))
- Update room spec URL in config files. ([\#11739](https://github.com/matrix-org/synapse/issues/11739 ))
- Mention `python3-venv` and `libpq-dev` dependencies in the contribution guide. ([\#11740](https://github.com/matrix-org/synapse/issues/11740 ))
- Update documentation for configuring login with Facebook. ([\#11755](https://github.com/matrix-org/synapse/issues/11755 ))
- Update installation instructions to note that Python 3.6 is no longer supported. ([\#11781](https://github.com/matrix-org/synapse/issues/11781 ))
Deprecations and Removals
-------------------------
- Remove the unstable `/send_relation` endpoint. ([\#11682](https://github.com/matrix-org/synapse/issues/11682 ))
- Remove `python_twisted_reactor_pending_calls` Prometheus metric. ([\#11724](https://github.com/matrix-org/synapse/issues/11724 ))
- Remove the `password_hash` field from the response dictionaries of the [Users Admin API](https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html ). ([\#11576](https://github.com/matrix-org/synapse/issues/11576 ))
- **Deprecate support for `webclient` listeners and non-HTTP(S) `web_client_location` configuration. ([\#11774](https://github.com/matrix-org/synapse/issues/11774 ), [\#11783](https://github.com/matrix-org/synapse/issues/11783 ))**
Internal Changes
----------------
- Run `pyupgrade --py37-plus --keep-percent-format` on Synapse. ([\#11685](https://github.com/matrix-org/synapse/issues/11685 ))
- Use buildkit's cache feature to speed up docker builds. ([\#11691](https://github.com/matrix-org/synapse/issues/11691 ))
- Use `auto_attribs` and native type hints for attrs classes. ([\#11692](https://github.com/matrix-org/synapse/issues/11692 ), [\#11768](https://github.com/matrix-org/synapse/issues/11768 ))
- Remove debug logging for #4422 , which has been closed since Synapse 0.99. ([\#11693](https://github.com/matrix-org/synapse/issues/11693 ))
- Remove fallback code for Python 2. ([\#11699](https://github.com/matrix-org/synapse/issues/11699 ))
- Add a test for [an edge case](https://github.com/matrix-org/synapse/pull/11532#discussion_r769104461 ) in the `/sync` logic. ([\#11701](https://github.com/matrix-org/synapse/issues/11701 ))
- Add the option to write SQLite test dbs to disk when running tests. ([\#11702](https://github.com/matrix-org/synapse/issues/11702 ))
- Improve Complement test output for Gitub Actions. ([\#11707](https://github.com/matrix-org/synapse/issues/11707 ))
- Fix docstring on `add_account_data_for_user`. ([\#11716](https://github.com/matrix-org/synapse/issues/11716 ))
- Complement environment variable name change and update `.gitignore`. ([\#11718](https://github.com/matrix-org/synapse/issues/11718 ))
- Simplify calculation of Prometheus metrics for garbage collection. ([\#11723](https://github.com/matrix-org/synapse/issues/11723 ))
- Improve accuracy of `python_twisted_reactor_tick_time` Prometheus metric. ([\#11724](https://github.com/matrix-org/synapse/issues/11724 ), [\#11771](https://github.com/matrix-org/synapse/issues/11771 ))
- Minor efficiency improvements when inserting many values into the database. ([\#11742](https://github.com/matrix-org/synapse/issues/11742 ))
- Invite PR authors to give themselves credit in the changelog. ([\#11744](https://github.com/matrix-org/synapse/issues/11744 ))
- Add optional debugging to investigate [issue 8631](https://github.com/matrix-org/synapse/issues/8631 ). ([\#11760](https://github.com/matrix-org/synapse/issues/11760 ))
- Remove `log_function` utility function and its uses. ([\#11761](https://github.com/matrix-org/synapse/issues/11761 ))
- Add a unit test that checks both `client` and `webclient` resources will function when simultaneously enabled. ([\#11765](https://github.com/matrix-org/synapse/issues/11765 ))
- Allow overriding complement commit using `COMPLEMENT_REF`. ([\#11766](https://github.com/matrix-org/synapse/issues/11766 ))
- Add some comments and type annotations for `_update_outliers_txn`. ([\#11776](https://github.com/matrix-org/synapse/issues/11776 ))
2022-01-25 12:35:11 +00:00
David Robertson
105fbce55c
Point to upgrade notes in changelog
2022-01-25 12:28:30 +00:00
Dirk Klimpel
0d6cfea9b8
Add admin API to reset connection timeouts for remote server ( #11639 )
...
* Fix get federation status of destination if no error occured
2022-01-25 12:06:29 +00:00
David Robertson
343d4f13d8
Correct version number
2022-01-25 11:42:32 +00:00
David Robertson
6e9e923ed5
Call out deprecation
2022-01-25 11:41:31 +00:00
David Robertson
874365fc05
1.51.0
2022-01-25 11:30:02 +00:00
Patrick Cloke
15c2a6a106
Ignore the jsonschema type. ( #11817 )
2022-01-25 12:07:10 +01:00
Richard van der Hoff
2d327d25bf
Skip the initial amd64-only Docker build ( #11810 )
...
PyNaCl's recent 1.5.0 release on PyPi includes arm64 wheels, which means our
arm64 docker images now build in a sensible amount of time, so we can skip the
amd64-only build.
2022-01-24 18:31:23 +00:00
Patrick Cloke
02d99f044e
Apply a timeout to reading the body when fetching a file. ( #11784 )
...
This prevents the URL preview code from reading
a stream forever.
2022-01-24 14:38:37 +00:00
Andrew Morgan
ec2271ac50
Merge branch 'master' into develop
2022-01-24 14:22:39 +00:00
Patrick Cloke
807efd26ae
Support rendering previews with data: URLs in them ( #11767 )
...
Images which are data URLs will no longer break URL
previews and will properly be "downloaded" and
thumbnailed.
2022-01-24 08:58:18 -05:00
Andrew Morgan
c3040dd5cc
Merge tag 'v1.51.0rc2' into develop
...
Synapse 1.51.0rc2 (2022-01-24)
==============================
Bugfixes
--------
- Fix a bug introduced in Synapse 1.40.0 that caused Synapse to fail to process incoming federation traffic after handling a large amount of events in a v1 room. ([\#11806](https://github.com/matrix-org/synapse/issues/11806 ))
2022-01-24 13:55:03 +00:00
Andrew Morgan
36f37acf53
1.50.2
2022-01-24 13:37:20 +00:00
reivilibre
df54c8485a
Remove account data (including client config, push rules and ignored users) upon user deactivation. ( #11621 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2022-01-24 13:37:00 +00:00
Andrew Morgan
8ff465d206
Fix logic for dropping old events in fed queue ( #11806 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
Co-authored-by: Richard van der Hoff <richard@matrix.org >
2022-01-24 13:35:50 +00:00
Andrew Morgan
14b45b25dd
1.51.0rc2
2022-01-24 12:25:18 +00:00
Andrew Morgan
dc671d3ea7
Fix logic for dropping old events in fed queue ( #11806 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
Co-authored-by: Richard van der Hoff <richard@matrix.org >
2022-01-24 12:20:01 +00:00
Shay
9006ee36d1
Drop support for and remove references to EOL Python 3.6 ( #11683 )
...
* remove reference in comments to python3.6
* upgrade tox python env in script
* bump python version in example for completeness
* upgrade python version requirement in setup doc
* upgrade necessary python version in __init__.py
* upgrade python version in setup.py
* newsfragment
* drops refs to bionic and replace with focal
* bump refs to postgres 9.6 to 10
* fix hanging ci
* try installing tzdata first
* revert change made in b979f336
* ignore new random mypy error while debugging other error
* fix lint error for temporary workaround
* revert change to install list
* try passing env var
* export debian frontend var?
* move line and add comment
* bump pillow dependency
* bump lxml depenency
* install libjpeg-dev for pillow
* bump automat version to one compatible with py3.8
* add libwebp for pillow
* bump twisted trunk python version
* change suffix of newsfragment
* remove redundant python 3.7 checks
* lint
2022-01-21 14:23:26 -08:00
Olivier Wilkinson (reivilibre)
f8cf02b200
Remove obsolete newsfile
...
The PR was cherrypicked into v1.51.0rc1.
2022-01-21 14:05:27 +00:00
Olivier Wilkinson (reivilibre)
ffc61d1b69
Merge tag 'v1.51.0rc1' into develop
...
Synapse 1.51.0rc1 (2022-01-21)
==============================
Features
--------
- Add `track_puppeted_user_ips` config flag to record client IP addresses against puppeted users, and include the puppeted users in monthly active user counts. ([\#11561](https://github.com/matrix-org/synapse/issues/11561 ), [\#11749](https://github.com/matrix-org/synapse/issues/11749 ), [\#11757](https://github.com/matrix-org/synapse/issues/11757 ))
- Include whether the requesting user has participated in a thread when generating a summary for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440 ). ([\#11577](https://github.com/matrix-org/synapse/issues/11577 ))
- Return an `M_FORBIDDEN` error code instead of `M_UNKNOWN` when a spam checker module prevents a user from creating a room. ([\#11672](https://github.com/matrix-org/synapse/issues/11672 ))
- Add a flag to the `synapse_review_recent_signups` script to ignore and filter appservice users. ([\#11675](https://github.com/matrix-org/synapse/issues/11675 ), [\#11770](https://github.com/matrix-org/synapse/issues/11770 ))
Bugfixes
--------
- Fix a long-standing issue which could cause Synapse to incorrectly accept data in the unsigned field of events
received over federation. ([\#11530](https://github.com/matrix-org/synapse/issues/11530 ))
- Fix a long-standing bug where Synapse wouldn't cache a response indicating that a remote user has no devices. ([\#11587](https://github.com/matrix-org/synapse/issues/11587 ))
- Fix an error that occurs whilst trying to get the federation status of a destination server that was working normally. This admin API was newly introduced in Synapse v1.49.0. ([\#11593](https://github.com/matrix-org/synapse/issues/11593 ))
- Fix bundled aggregations not being included in the `/sync` response, per [MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675 ). ([\#11612](https://github.com/matrix-org/synapse/issues/11612 ), [\#11659](https://github.com/matrix-org/synapse/issues/11659 ), [\#11791](https://github.com/matrix-org/synapse/issues/11791 ))
- Fix the `/_matrix/client/v1/room/{roomId}/hierarchy` endpoint returning incorrect fields which have been present since Synapse 1.49.0. ([\#11667](https://github.com/matrix-org/synapse/issues/11667 ))
- Fix preview of some GIF URLs (like tenor.com). Contributed by Philippe Daouadi. ([\#11669](https://github.com/matrix-org/synapse/issues/11669 ))
- Fix a bug where only the first 50 rooms from a space were returned from the `/hierarchy` API. This has existed since the introduction of the API in Synapse v1.41.0. ([\#11695](https://github.com/matrix-org/synapse/issues/11695 ))
- Fix a bug introduced in Synapse v1.18.0 where password reset and address validation emails would not be sent if their subject was configured to use the 'app' template variable. Contributed by @br4nnigan. ([\#11710](https://github.com/matrix-org/synapse/issues/11710 ), [\#11745](https://github.com/matrix-org/synapse/issues/11745 ))
- Make the 'List Rooms' Admin API sort stable. Contributed by Daniël Sonck. ([\#11737](https://github.com/matrix-org/synapse/issues/11737 ))
- Fix a long-standing bug where space hierarchy over federation would only work correctly some of the time. ([\#11775](https://github.com/matrix-org/synapse/issues/11775 ))
- Fix a bug introduced in Synapse v1.46.0 that prevented `on_logged_out` module callbacks from being correctly awaited by Synapse. ([\#11786](https://github.com/matrix-org/synapse/issues/11786 ))
Improved Documentation
----------------------
- Warn against using a Let's Encrypt certificate for TLS/DTLS TURN server client connections, and suggest using ZeroSSL certificate instead. This works around client-side connectivity errors caused by WebRTC libraries that reject Let's Encrypt certificates. Contibuted by @AndrewFerr. ([\#11686](https://github.com/matrix-org/synapse/issues/11686 ))
- Document the new `SYNAPSE_TEST_PERSIST_SQLITE_DB` environment variable in the contributing guide. ([\#11715](https://github.com/matrix-org/synapse/issues/11715 ))
- Document that the minimum supported PostgreSQL version is now 10. ([\#11725](https://github.com/matrix-org/synapse/issues/11725 ))
- Fix typo in demo docs: differnt. ([\#11735](https://github.com/matrix-org/synapse/issues/11735 ))
- Update room spec URL in config files. ([\#11739](https://github.com/matrix-org/synapse/issues/11739 ))
- Mention `python3-venv` and `libpq-dev` dependencies in the contribution guide. ([\#11740](https://github.com/matrix-org/synapse/issues/11740 ))
- Update documentation for configuring login with Facebook. ([\#11755](https://github.com/matrix-org/synapse/issues/11755 ))
- Update installation instructions to note that Python 3.6 is no longer supported. ([\#11781](https://github.com/matrix-org/synapse/issues/11781 ))
Deprecations and Removals
-------------------------
- Remove the unstable `/send_relation` endpoint. ([\#11682](https://github.com/matrix-org/synapse/issues/11682 ))
- Remove `python_twisted_reactor_pending_calls` Prometheus metric. ([\#11724](https://github.com/matrix-org/synapse/issues/11724 ))
- Remove the `password_hash` field from the response dictionaries of the [Users Admin API](https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html ). ([\#11576](https://github.com/matrix-org/synapse/issues/11576 ))
- Deprecate support for `webclient` listeners and non-HTTP(S) `web_client_location` configuration. ([\#11774](https://github.com/matrix-org/synapse/issues/11774 ), [\#11783](https://github.com/matrix-org/synapse/issues/11783 ))
Internal Changes
----------------
- Run `pyupgrade --py37-plus --keep-percent-format` on Synapse. ([\#11685](https://github.com/matrix-org/synapse/issues/11685 ))
- Use buildkit's cache feature to speed up docker builds. ([\#11691](https://github.com/matrix-org/synapse/issues/11691 ))
- Use `auto_attribs` and native type hints for attrs classes. ([\#11692](https://github.com/matrix-org/synapse/issues/11692 ), [\#11768](https://github.com/matrix-org/synapse/issues/11768 ))
- Remove debug logging for #4422 , which has been closed since Synapse 0.99. ([\#11693](https://github.com/matrix-org/synapse/issues/11693 ))
- Remove fallback code for Python 2. ([\#11699](https://github.com/matrix-org/synapse/issues/11699 ))
- Add a test for [an edge case](https://github.com/matrix-org/synapse/pull/11532#discussion_r769104461 ) in the `/sync` logic. ([\#11701](https://github.com/matrix-org/synapse/issues/11701 ))
- Add the option to write SQLite test dbs to disk when running tests. ([\#11702](https://github.com/matrix-org/synapse/issues/11702 ))
- Improve Complement test output for Gitub Actions. ([\#11707](https://github.com/matrix-org/synapse/issues/11707 ))
- Fix docstring on `add_account_data_for_user`. ([\#11716](https://github.com/matrix-org/synapse/issues/11716 ))
- Complement environment variable name change and update `.gitignore`. ([\#11718](https://github.com/matrix-org/synapse/issues/11718 ))
- Simplify calculation of Prometheus metrics for garbage collection. ([\#11723](https://github.com/matrix-org/synapse/issues/11723 ))
- Improve accuracy of `python_twisted_reactor_tick_time` Prometheus metric. ([\#11724](https://github.com/matrix-org/synapse/issues/11724 ), [\#11771](https://github.com/matrix-org/synapse/issues/11771 ))
- Minor efficiency improvements when inserting many values into the database. ([\#11742](https://github.com/matrix-org/synapse/issues/11742 ))
- Invite PR authors to give themselves credit in the changelog. ([\#11744](https://github.com/matrix-org/synapse/issues/11744 ))
- Add optional debugging to investigate [issue 8631](https://github.com/matrix-org/synapse/issues/8631 ). ([\#11760](https://github.com/matrix-org/synapse/issues/11760 ))
- Remove `log_function` utility function and its uses. ([\#11761](https://github.com/matrix-org/synapse/issues/11761 ))
- Add a unit test that checks both `client` and `webclient` resources will function when simultaneously enabled. ([\#11765](https://github.com/matrix-org/synapse/issues/11765 ))
- Allow overriding complement commit using `COMPLEMENT_REF`. ([\#11766](https://github.com/matrix-org/synapse/issues/11766 ))
- Add some comments and type annotations for `_update_outliers_txn`. ([\#11776](https://github.com/matrix-org/synapse/issues/11776 ))
2022-01-21 14:04:23 +00:00
Olivier Wilkinson (reivilibre)
2d295a4be9
Edit the changelog according to feedback
2022-01-21 13:15:13 +00:00
Richard van der Hoff
2aa37a4250
Add state_key and rejection_reason to events ( #11792 )
...
... and start populating them for new events
2022-01-21 12:21:28 +00:00
Olivier Wilkinson (reivilibre)
ea579a478a
Edit the changelog for grammar and clarity
2022-01-21 11:44:02 +00:00
Olivier Wilkinson (reivilibre)
266df5c908
1.51.0rc1
2022-01-21 10:47:03 +00:00
Patrick Cloke
7a11509d17
Do not try to serialize raw aggregations dict. ( #11791 )
2022-01-21 10:40:34 +00:00
Patrick Cloke
b784299cbc
Do not try to serialize raw aggregations dict. ( #11791 )
2022-01-21 10:31:31 +00:00
Richard van der Hoff
9f2016e96e
Drop unused table public_room_list_stream. ( #11795 )
...
This is a follow-up to #10565 .
2022-01-21 09:19:56 +00:00
Richard van der Hoff
2277275485
Stop reading from event_reference_hashes ( #11794 )
...
Preparation for dropping this table altogether. Part of #6574 .
2022-01-21 09:18:10 +00:00
Richard van der Hoff
c027bc0e4b
Add FrozenEvent.get_state_key and use it in a couple of places ( #11793 )
...
This is more efficient, since we only have to look up `state_key` in the event
dict once, rather than three (!) times.
2022-01-21 09:10:01 +00:00
reivilibre
4c2096599c
Make the get_global_account_data_by_type_for_user cache be a tree-cache whose key is prefixed with the user ID ( #11788 )
2022-01-21 08:38:36 +00:00
reivilibre
e83520cc42
Make get_account_data_for_room_and_type a tree cache ( #11789 )
2022-01-21 08:01:37 +00:00
Brendan Abolivier
bfe6d5553a
Correctly await on_logged_out callbacks ( #11786 )
2022-01-20 19:19:40 +01:00
Patrick Cloke
d09099642e
Fix redirecting to the webclient for non-HTTP(S) web_client_location. ( #11783 )
...
To not change the behaviour during the deprecation period.
Follow-up to #11774 .
2022-01-20 15:34:45 +00:00
Andrew Morgan
121b9e2475
Add a regression test for using both webclient and client resources simultaneously ( #11765 )
2022-01-20 09:47:29 -05:00
Andrew Morgan
7bf2d6c268
Partially revert #11675 ; prevent attempting to create pushers on workers ( #11770 )
2022-01-20 09:37:34 -05:00
Richard van der Hoff
56834ab779
installation.md: drop python 3.6 support ( #11781 )
...
#11595 dropped support for python 3.6, but forgot to update this doc.
2022-01-20 14:37:11 +00:00
Patrick Cloke
91221b6961
Add deprecation warnings for webclient listener and non-HTTP(S) web_client_location. ( #11774 )
...
This changes the behaviour of the root endpoint to redirect
directly to the configuration of `web_client_location` if it is
given an HTTP(S) URL.
2022-01-20 14:21:06 +00:00
David Robertson
f160fe18e3
Debug for device lists updates ( #11760 )
...
Debug for #8631 .
I'm having a hard time tracking down what's going wrong in that issue.
In the reported example, I could see server A sending federation traffic
to server B and all was well. Yet B reports out-of-sync device updates
from A.
I couldn't see what was _in_ the events being sent from A to B. So I
have added some crude logging to track
- when we have updates to send to a remote HS
- the edus we actually accumulate to send
- when a federation transaction includes a device list update edu
- when such an EDU is received
This is a bit of a sledgehammer.
2022-01-20 13:38:44 +00:00
Nicolas Werner
fa583c2198
Allow overriding the complement ref. ( #11766 )
...
Updates complement.sh to read the ref from an environment
variable (defaulting to master) when downloading a complement
bundle for testing.
2022-01-20 13:04:58 +00:00
Sean Quah
af13a3be29
Fix a bug that corrupted the cache of federated space hierarchies ( #11775 )
...
`FederationClient.get_room_hierarchy()` caches its return values, so
refactor the code to avoid modifying the returned room summary.
2022-01-20 11:03:42 +00:00
Eric Eastwood
7396f7ce24
Restore auth_event_id caching as it does something looking closer at the flame graph
2022-01-19 19:17:24 -06:00
Eric Eastwood
780d35868e
Remove auth_event_id caching is it doesn't make a noticeable difference
2022-01-19 19:01:41 -06:00
Eric Eastwood
a032104058
Only share auth_event_ids when sender and type matches
2022-01-19 18:50:02 -06:00
Eric Eastwood
e0b718622a
We only have to store the state_group for events created by create_event first
...
This gets us down to the ~0.8s per 100 event batch times!
2022-01-19 18:00:03 -06:00
Eric Eastwood
491e91dd40
Cache event creation info and context
...
~1.3s to ~1.1s time savings by re-using some calculations
that will be the same for every event type in the batch
TODO: Find a way to make store_state_group_id_for_event_id batch persist
in the db which brings it down to about 0.8s
2022-01-19 17:42:02 -06:00
Richard van der Hoff
5572e6cc4b
Comments and typing for _update_outliers_txn ( #11776 )
...
A couple of surprises for me here, so thought I'd document them
2022-01-19 19:45:36 +00:00
Patrick Cloke
c072c0b829
Fix mypy for platforms without epoll support. ( #11771 )
2022-01-19 16:50:09 +00:00
Andrew Morgan
7ad7a47e5a
Add missing auto_attribs=True to the _WrappedRustReporter class ( #11768 )
2022-01-19 12:39:11 +00:00
Philippe Daouadi
15ffc4143c
Fix preview of imgur and Tenor URLs. ( #11669 )
...
By scraping Open Graph information from the HTML even
when an autodiscovery endpoint is found. The results are
then combined to capture as much information as possible
from the page.
2022-01-18 13:20:24 -05:00
Andrew Morgan
9eab71aa93
Merge branch 'master' into develop
2022-01-18 16:46:39 +00:00
Patrick Cloke
68acb0a29d
Include whether the requesting user has participated in a thread. ( #11577 )
...
Per updates to MSC3440.
This is implement as a separate method since it needs to be cached
on a per-user basis, instead of a per-thread basis.
2022-01-18 11:38:57 -05:00
Andrew Morgan
fd05a3ed03
Wording fixes to 1.50.0/1 changelog entries
2022-01-18 16:13:54 +00:00
Andrew Morgan
9d0098595e
Reword 1.50.0 warning a bit in the changelog
2022-01-18 16:11:38 +00:00
Andrew Morgan
ab12c909a2
1.50.1
2022-01-18 16:09:04 +00:00
Andrew Morgan
d93ec0a0ba
Partially revert #11602 to prevent webclient overriding client resource ( #11764 )
2022-01-18 16:03:56 +00:00
Richard van der Hoff
251b5567ec
Remove log_function and its uses ( #11761 )
...
I've never found this terribly useful. I think it was added in the early days
of Synapse, without much thought as to what would actually be useful to log,
and has just been cargo-culted ever since.
Rather, it tends to clutter up debug logs with useless information.
2022-01-18 13:06:04 +00:00
Andrew Morgan
47961ea855
Merge branch 'master' into develop
2022-01-18 11:46:24 +00:00
Andrew Morgan
4ec0a309cf
Move python/postgres deprecation notice to the top of 1.50 changelog
2022-01-18 10:47:23 +00:00
Andrew Morgan
3ba9389699
1.50.0
2022-01-18 10:41:36 +00:00
lukasdenk
d8be9924ef
Add a flag to the synapse_review_recent_signups script to ignore and filter appservice users. ( #11675 )
2022-01-17 16:43:25 +00:00
AndrewFerr
cefd4b87a3
Warn against using Let's Encrypt certs for encrypted TURN ( #11686 )
...
* Warn against using Let's Encrypt certs for encrypted TURN
This helps to avoid client-side issues:
* https://github.com/vector-im/element-android/issues/1533
* https://github.com/vector-im/element-ios/issues/2712
Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net >
2022-01-17 15:13:09 +00:00
Richard van der Hoff
86615aa965
Fix up docs for track_puppeted_user_ips (again) ( #11757 )
...
Fixes #11741
2022-01-17 14:55:30 +00:00
Richard van der Hoff
b0352f9c08
Update documentation for configuring facebook login ( #11755 )
...
... and a minor thinko fix in the sample config.
2022-01-17 12:35:00 +00:00
Richard van der Hoff
6a78ede569
Improve reactor_tick_time metric ( #11724 )
...
The existing implementation of the `python_twisted_reactor_tick_time` metric is pretty useless, because it *only*
measures the time taken to execute timed calls and callbacks from threads. That neglects everything that
happens off the back of I/O, which is obviously quite a lot for us.
To improve this, I've hooked into a different place in the reactor - in particular, where it calls `epoll`. That call is
the only place it should wait for something to happen - the rest of the loop *should* be quick.
I've also removed `python_twisted_reactor_pending_calls`, because I don't believe anyone ever looks at it, and
it's a nuisance to populate.
2022-01-17 12:14:40 +00:00
Daniel Sonck
6b241f5286
Make pagination of rooms in admin api stable ( #11737 )
...
Always add state.room_id after the configurable ORDER BY. Otherwise,
for any sort, certain pages can contain results from
other pages. (Especially when sorting by creator, since there may
be many rooms by the same creator)
* Document different order direction of numerical fields
"joined_members", "joined_local_members", "version" and "state_events"
are ordered in descending direction by default (dir=f). Added a note
in tests to explain the differences in ordering.
Signed-off-by: Daniël Sonck <daniel@sonck.nl >
2022-01-17 11:42:51 +00:00
Olivier Wilkinson (reivilibre)
e7da1ced24
Merge branch 'release-v1.50' into develop
2022-01-14 15:25:16 +00:00
Andrew Morgan
18862f20b5
Remove the 'password_hash' from the Users Admin API endpoint response dictionary ( #11576 )
2022-01-14 14:53:33 +00:00
Jason Robinson
904bb04409
Fix sample_config.yaml in regards track_puppeted_user_ips ( #11749 )
...
* Fix sample_config.yaml in regards track_puppeted_user_ips
Closes #11741
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2022-01-14 14:11:55 +00:00
Olivier Wilkinson (reivilibre)
422e33fabf
Tweak the changelog summary section
2022-01-14 12:08:14 +00:00
Olivier Wilkinson (reivilibre)
867443472c
1.50.0rc2
2022-01-14 11:34:57 +00:00
Eric Eastwood
cc4eb72f2e
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
...
Conflicts:
scripts-dev/complement.sh
2022-01-13 22:18:55 -06:00
Patrick Cloke
3e0536cd2a
Replace uses of simple_insert_many with simple_insert_many_values. ( #11742 )
...
This should be (slightly) more efficient and it is simpler
to have a single method for inserting multiple values.
2022-01-13 19:44:18 -05:00
David Robertson
d70169bf9b
Fix missing app variable in mail subject ( #11745 )
...
documentation claims that you can use the %(app)s variable in password_reset and email_validation subjects, but if you do you end up with an error 500
Co-authored-by: br4nnigan <10244835+br4nnigan@users.noreply.github.com >
2022-01-13 20:19:10 +00:00
David Robertson
4ca8fcdd5a
Invite PR submitters to credit themselves ( #11744 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2022-01-13 18:12:59 +00:00
reivilibre
b602ba194b
Fix a bug introduced in Synapse v1.50.0rc1 whereby outbound federation could fail because too many EDUs were produced for device updates. ( #11730 )
...
Co-authored-by: David Robertson <davidr@element.io >
2022-01-13 18:12:18 +00:00
qwertyforce
b9632046fb
update room spec url in config files ( #11739 )
...
* change spec url in config files
* Create 11739.txt
* .txt -> .doc
2022-01-13 17:09:15 +00:00
Andy Balaam
5ff5f17377
Mention python3-venv and libpq-dev dependencies in contribution guide ( #11740 )
2022-01-13 16:33:37 +00:00
Patrick Cloke
0c40c619aa
Include bundled aggregations in the sync response cache. ( #11659 )
2022-01-13 10:45:28 -05:00
Richard van der Hoff
20c6d85c6e
Simplify GC prometheus metrics ( #11723 )
...
Rather than hooking into the reactor loop, just add a timed task that runs every 100 ms to do the garbage collection.
Part 1 of a quest to simplify the reactor monkey-patching.
2022-01-13 14:35:52 +00:00
Patrick Cloke
10a88ba91c
Use auto_attribs/native type hints for attrs classes. ( #11692 )
2022-01-13 13:49:28 +00:00
Andy Balaam
b92a2ff797
Fix typo in demo docs: differnt ( #11735 )
2022-01-13 13:10:42 +00:00
Jason Robinson
2560b1b6b2
Allow tracking puppeted users for MAU ( #11561 )
...
Currently when puppeting another user, the user doing the puppeting is
tracked for client IPs and MAU (if configured).
When tracking MAU is important, it becomes necessary to be possible to
also track the client IPs and MAU of puppeted users. As an example a
client that manages user creation and creation of tokens via the Synapse
admin API, passing those tokens for the client to use.
This PR adds optional configuration to enable tracking of puppeted users
into monthly active users. The default behaviour stays the same.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2022-01-12 16:09:36 +00:00
reivilibre
22abfca8d9
Fix a bug introduced in Synapse v1.0.0 whereby device list updates would not be sent to remote homeservers if there were too many to send at once. ( #11729 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2022-01-12 15:21:13 +00:00
David Robertson
1b1aed38e3
Deal with mypy errors w/ type-hinted pynacl 1.5.0 ( #11714 )
...
* Deal with mypy errors w/ type-hinted pynacl 1.5.0
Fixes #11644 .
I really don't like that we're monkey patching pynacl SignedKey
instances with alg and version objects. But I'm too scared to make the
changes necessary right now.
(Ideally I would replace `signedjson.types.SingingKey` with a runtime class which
wraps or inherits from `nacl.signing.SigningKey`.) C.f. https://github.com/matrix-org/python-signedjson/issues/16
2022-01-12 14:54:06 +00:00
haslersn
2185b28184
Fix documentation of supported PostgreSQL version ( #11725 )
...
Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de >
2022-01-12 14:45:13 +00:00
haslersn
99ba5ae7b7
Fix documentation of supported PostgreSQL version ( #11725 )
...
Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de >
2022-01-12 14:43:48 +00:00
Richard van der Hoff
d41c4654db
Use buildkit's cache feature to speed up docker builds ( #11691 )
...
Having spent much of the last week attempting to run complement tests from somewhere with damp string instead of internet... something had to be done.
2022-01-12 10:37:57 +00:00
Michael Kaye
338e70c617
Complement environment variable name change and update .gitignore. ( #11718 )
2022-01-10 23:18:56 +00:00
Andrew Morgan
7c3408d1a8
Document the SYNAPSE_TEST_PERSIST_SQLITE_DB unit test env var ( #11715 )
2022-01-10 17:06:42 +00:00
reivilibre
ffd227c382
Fix docstring on add_account_data_for_user. ( #11716 )
2022-01-10 15:38:22 +00:00
David Robertson
c43dd4d01b
Deal with mypy errors w/ type-hinted pynacl 1.5.0 ( #11714 )
...
* Deal with mypy errors w/ type-hinted pynacl 1.5.0
Fixes #11644 .
I really don't like that we're monkey patching pynacl SignedKey
instances with alg and version objects. But I'm too scared to make the
changes necessary right now.
(Ideally I would replace `signedjson.types.SingingKey` with a runtime class which
wraps or inherits from `nacl.signing.SigningKey`.) C.f. https://github.com/matrix-org/python-signedjson/issues/16
2022-01-10 13:40:46 +00:00
kegsay
3be63654e4
Prettier complement logs ( #11707 )
...
* Prettier complement logs
* Changelog
2022-01-10 11:46:40 +00:00
Patrick Cloke
8e57584a58
Support spaces with > 50 rooms in the /hierarchy endpoint. ( #11695 )
...
By returning all of the m.space.child state of the space, not just
the first 50. The number of rooms returned is still capped at 50.
For the federation API this implies that the requesting server will
need to individually query for any other rooms it is not joined to.
2022-01-07 19:27:58 -05:00
David Robertson
d3cf0730f8
Optionally use an on-disk sqlite db in tests ( #11702 )
...
* Optionally use an on-disk sqlite db in tests
When debugging a test it is sometimes useful to inspect the state of the
DB. This is not easy when the db is in-memory: one cannot attach the
sqlite CLI to another process's DB.
With this change, if SYNAPSE_TEST_PERSIST_SQLITE_DB is set, we use
`_trial_temp/test.db` as our sqlite database. One can then use
`sqlite3 _trial_temp/test.db` and query to your heart's content.
The DB is destroyed and recreated between different test cases.
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2022-01-07 19:13:41 +00:00
David Robertson
2bb4bd1269
Test that bans win a join against a race when computing /sync response ( #11701 )
2022-01-07 16:43:21 +00:00
Olivier Wilkinson (reivilibre)
6a04767439
Merge branch 'release-v1.50' into develop
2022-01-07 14:22:13 +00:00
Patrick Cloke
6bf81a7a61
Bundle aggregations outside of the serialization method. ( #11612 )
...
This makes the serialization of events synchronous (and it no
longer access the database), but we must manually calculate and
provide the bundled aggregations.
Overall this should cause no change in behavior, but is prep work
for other improvements.
2022-01-07 09:10:46 -05:00
Olivier Wilkinson (reivilibre)
7fe7c45438
Move changelog entry for drop of support to 'Deprecations and Removals'
2022-01-07 12:51:20 +00:00
Patrick Cloke
6c68e874b1
Remove the /send_relation endpoint. ( #11682 )
...
This was removed from MSC2674 before that was approved
and is not used by any known clients.
2022-01-06 19:00:34 +00:00
Patrick Cloke
201c48c8de
Remove a Python 2-ism and improve type hints. ( #11699 )
...
On Python 2, indexing a byte-string gives back a byte-string,
while on Python 3 it gives back the ASCII equivalent as an int.
2022-01-06 18:08:48 +00:00
Olivier Wilkinson (reivilibre)
e87540abb1
Re-run Towncrier to add in the changelog entry for the Mjolnir workaround
2022-01-06 17:54:21 +00:00
Shay
70ce9aea71
Strip unauthorized fields from unsigned object in events received over federation ( #11530 )
...
* add some tests to verify we are stripping unauthorized fields out of unsigned
* add function to strip unauthorized fields from the unsigned object of event
* newsfragment
* update newsfragment number
* add check to on_send_membership_event
* refactor tests
* fix lint error
* slightly refactor tests and add some comments
* slight refactor
* refactor tests
* fix import error
* slight refactor
* remove unsigned filtration code from synapse/handlers/federation_event.py
* lint
* move unsigned filtering code to event base
* refactor tests
* update newsfragment
* requested changes
* remove unused retun values
2022-01-06 09:09:30 -08:00
reivilibre
eec34b1f2a
Work around Mjolnir compatibility issue by adding an import for glob_to_regex in synapse.util, where it moved from. ( #11696 )
2022-01-06 16:36:26 +00:00
lukasdenk
2ef1fea8d2
Make room creations denied by user_may_create_room cause an M_FORBIDDEN error to be returned, not M_UNKNOWN ( #11672 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2022-01-06 13:16:42 +00:00
David Robertson
c9eb678b73
Remove debug logging for #4422 ( #11693 )
...
as per
https://github.com/matrix-org/synapse/pull/11532#discussion_r769123269
2022-01-06 12:44:36 +00:00
Travis Ralston
feb3e006d7
Fix space hierarchy endpoint to match MSC2946 ( #11667 )
...
Fixes minor discrepancies between the /hierarchy endpoint described
in MSC2946 and the implementation.
Note that the changes impact the stable and unstable /hierarchy and
unstable /spaces endpoints for both client and federation APIs.
2022-01-05 20:33:43 +00:00
Dirk Klimpel
3b51c763ba
Fix get federation status of destination if no error occured ( #11593 )
2022-01-05 14:46:50 -05:00
Olivier Wilkinson (reivilibre)
daea7bcc34
Tweak changelog for #11677
2022-01-05 18:16:10 +00:00
Shay
d8f94eeec2
Run pyupgrade --py37-plus --keep-percent-format on Synapse ( #11685 )
...
* newsfragment
* fix newsfragment number
* update changelog
* remove extra space
2022-01-05 09:53:05 -08:00
Patrick Cloke
83acdb23fe
Re-run towncrier.
2022-01-05 12:09:15 -05:00
Patrick Cloke
877b45e812
Include io.element.thread capability for MSC3440. ( #11690 )
2022-01-05 12:08:03 -05:00
Olivier Wilkinson (reivilibre)
102f4d3598
Mention drop of support in changelog
2022-01-05 14:14:57 +00:00
Olivier Wilkinson (reivilibre)
ffd71029ab
Add support removal notice to the upgrade notes
2022-01-05 14:14:16 +00:00
Olivier Wilkinson (reivilibre)
5f98d8e6fd
Tweak changelog
2022-01-05 14:05:15 +00:00
David Robertson
88a78c6577
Cache empty responses from /user/devices ( #11587 )
...
If we've never made a request to a remote homeserver, we should cache the response---even if the response is "this user has no devices".
2022-01-05 13:33:28 +00:00
Olivier Wilkinson (reivilibre)
9be5aacc2d
1.50.0rc1
2022-01-05 12:39:48 +00:00
Richard van der Hoff
0fb3dd0830
Refactor the way we set outlier ( #11634 )
...
* `_auth_and_persist_outliers`: mark persisted events as outliers
Mark any events that get persisted via `_auth_and_persist_outliers` as, well,
outliers.
Currently this will be a no-op as everything will already be flagged as an
outlier, but I'm going to change that.
* `process_remote_join`: stop flagging as outlier
The events are now flagged as outliers later on, by `_auth_and_persist_outliers`.
* `send_join`: remove `outlier=True`
The events created here are returned in the result of `send_join` to
`FederationHandler.do_invite_join`. From there they are passed into
`FederationEventHandler.process_remote_join`, which passes them to
`_auth_and_persist_outliers`... which sets the `outlier` flag.
* `get_event_auth`: remove `outlier=True`
stop flagging the events returned by `get_event_auth` as outliers. This method
is only called by `_get_remote_auth_chain_for_event`, which passes the results
into `_auth_and_persist_outliers`, which will flag them as outliers.
* `_get_remote_auth_chain_for_event`: remove `outlier=True`
we pass all the events into `_auth_and_persist_outliers`, which will now flag
the events as outliers.
* `_check_sigs_and_hash_and_fetch`: remove unused `outlier` parameter
This param is now never set to True, so we can remove it.
* `_check_sigs_and_hash_and_fetch_one`: remove unused `outlier` param
This is no longer set anywhere, so we can remove it.
* `get_pdu`: remove unused `outlier` parameter
... and chase it down into `get_pdu_from_destination_raw`.
* `event_from_pdu_json`: remove redundant `outlier` param
This is never set to `True`, so can be removed.
* changelog
* update docstring
2022-01-05 12:26:11 +00:00
Philipp Matthias Schäfer
eedb4527f1
Fix link from generated configuration file to documentation ( #11678 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
Co-authored-by: reivilibre <oliverw@matrix.org >
2022-01-05 12:16:52 +00:00
Fr3shTea
0201c6371c
Fix SimpleHttpClient not sending Accept header in get_json ( #11677 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2022-01-05 11:59:29 +00:00
Dirk Klimpel
7a1cefc6e3
Add admin API to get users' account data ( #11664 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2022-01-05 11:49:06 +00:00
reivilibre
84bfe47b01
Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common #11505 ( #11687 )
...
Co-authored-by: Sean Quah <seanq@element.io >
2022-01-05 11:41:49 +00:00
reivilibre
84d790a32e
Clarify SSO mapping provider documentation by writing def or async def before the names of methods, as appropriate. ( #11681 )
2022-01-05 11:25:32 +00:00
Callum Macdonald
7013e06e2f
Improve Docker docs for use with Postgres ( #11640 )
2022-01-05 10:50:28 +00:00
Donny Johnson
0715e77b06
Correct Synapse install command for FreeBSD. ( #11267 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2022-01-05 10:38:51 +00:00
Richard van der Hoff
79f6d3550a
update ngnix reverse-proxy example ( #11680 )
...
this should not be a case-insensitive match.
2022-01-04 22:31:45 +00:00
Richard van der Hoff
b38bdae3a2
Fix AssertionErrors after purging events ( #11642 )
...
* Fix AssertionErrors after purging events
If you purged a bunch of events from your database, and then restarted synapse
without receiving more events, then you would get a bunch of AssertionErrors on
restart.
This fixes the situation by rewinding the stream processors.
* `check-newsfragment`: ignore deleted newsfiles
2022-01-04 16:36:33 +00:00
Richard van der Hoff
878aa55293
FederationClient.backfill: stop flagging events as outliers (#11632 )
...
Events returned by `backfill` should not be flagged as outliers.
Fixes:
```
AssertionError: null
File "synapse/handlers/federation.py", line 313, in try_backfill
dom, room_id, limit=100, extremities=extremities
File "synapse/handlers/federation_event.py", line 517, in backfill
await self._process_pulled_events(dest, events, backfilled=True)
File "synapse/handlers/federation_event.py", line 642, in _process_pulled_events
await self._process_pulled_event(origin, ev, backfilled=backfilled)
File "synapse/handlers/federation_event.py", line 669, in _process_pulled_event
assert not event.internal_metadata.is_outlier()
```
See https://sentry.matrix.org/sentry/synapse-matrixorg/issues/231992
Fixes #8894 .
2022-01-04 16:31:32 +00:00
Richard van der Hoff
2359ee3864
Remove redundant get_current_events_token ( #11643 )
...
* Push `get_room_{min,max_stream_ordering}` into StreamStore
Both implementations of this are identical, so we may as well push it down and
get rid of the abstract base class nonsense.
* Remove redundant `StreamStore` class
This is empty now
* Remove redundant `get_current_events_token`
This was an exact duplicate of `get_room_max_stream_ordering`, so let's get rid
of it.
* newsfile
2022-01-04 16:10:27 +00:00
Richard van der Hoff
bd9821f7f1
Better error messages from get_create_event_for_room ( #11638 )
...
"Unknown room" can mean a multitude of things here. To help with debugging, add
some more words to the exception text.
2022-01-04 16:10:05 +00:00
Patrick Cloke
8422a7f7f6
Include the topic event in the prejoin state, per MSC3173. ( #11666 )
...
Invites and knocks will now include the topic in the stripped state
send to clients before joining the room.
2022-01-04 11:08:08 -05:00
Shay
13c974ed35
Drop Bionic from Debian builds ( #11633 )
...
* update Trove classifiers to remove py36
* stop building bionic
* update dh-virtualenv
* newsfragment
* fix newsfragment
* update version refs
* another try at correct tag
* Update changelog
2022-01-03 11:17:16 -08:00
Patrick Cloke
cbd82d0b2d
Convert all namedtuples to attrs. ( #11665 )
...
To improve type hints throughout the code.
2021-12-30 18:47:12 +00:00
Dirk Klimpel
07a3b5daba
Add type hints to synapse/storage/databases/main/events_bg_updates.py ( #11654 )
2021-12-30 07:22:31 -05:00
reivilibre
2c7f5e74e5
Fix a type annotation in test_account_data.py and remove it from the Mypy exclusion list. ( #11657 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-12-29 15:12:30 +00:00
Dirk Klimpel
f82d38ed2e
Improve type hints in storage classes. ( #11652 )
...
By using cast and making ignores more specific.
2021-12-29 13:04:28 +00:00
Patrick Cloke
f58b300d27
Do not attempt to bundled aggregations for /members and /state. ( #11623 )
...
Both of those APIs return state events, which will not have bundled
aggregations added anyway.
2021-12-29 08:02:03 -05:00
Dirk Klimpel
15bb1c8511
Add type hints to synapse/storage/databases/main/stats.py ( #11653 )
2021-12-29 08:01:13 -05:00
Shay
fcfe67578f
Update to the current version of Black and run it on Synapse codebase ( #11596 )
...
* update black version
* run updated version of black on code
* newsfragment
* enumerate python versions
2021-12-23 20:22:15 -08:00
Patrick Cloke
66d7aa783a
Fix mypy error with opentracing.tags. ( #11622 )
2021-12-23 11:47:24 +00:00
AndrewFerr
c500bf37d6
Add details for how to set up TURN behind NAT ( #11553 )
...
Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net >
2021-12-23 10:42:50 +00:00
Shay
87da37374a
Drop EOL python 3.6 from CI ( #11595 )
...
* remove python 3.6 and postgres 9.6 from github workflow
* remove python 3.6 env from tox
* newsfragment
* correct postgres version
* add py310 to tox env list
2021-12-21 11:37:04 -08:00
Richard van der Hoff
144b9ede89
Merge branch 'master' into develop
2021-12-21 18:13:05 +00:00
Richard van der Hoff
9ec46d6231
Merge branch 'release-v1.49'
2021-12-21 18:12:18 +00:00
Richard van der Hoff
6b6dcdc338
update changelog
...
postgres 10 _+_
2021-12-21 17:41:34 +00:00
Richard van der Hoff
aa874a1390
1.49.2
2021-12-21 17:32:16 +00:00
Richard van der Hoff
2bf31f7807
Pin to frozendict<2.1.2 ( #11625 )
...
... to work around breakage on buster
(https://github.com/Marco-Sulla/python-frozendict/issues/41 )
2021-12-21 17:26:04 +00:00
reivilibre
e6897e7383
Refactor tests.util.setup_test_homeserver and tests.server.setup_test_homeserver. ( #11503 )
2021-12-21 16:12:05 +00:00
Patrick Cloke
b6102230a7
Add type hints to event_push_actions. ( #11594 )
2021-12-21 13:25:34 +00:00
Richard van der Hoff
57ca8ab10f
Add notes about dropping support for Python 3.6 and Postgres 9.6.
2021-12-21 12:06:31 +00:00
Richard van der Hoff
aa58e8a28a
typopo
2021-12-21 11:24:24 +00:00
Richard van der Hoff
b9f2f6d3c4
more words
2021-12-21 11:23:35 +00:00
Richard van der Hoff
2215954147
Various opentracing enhancements ( #11619 )
...
* Wrap `auth.get_user_by_req` in an opentracing span
give `get_user_by_req` its own opentracing span, since it can result in a
non-trivial number of sub-spans which it is useful to group together.
This requires a bit of reorganisation because it also sets some tags (and may
force tracing) on the servlet span.
* Emit opentracing span for encoding json responses
This can be a significant time sink.
* Rename all sync spans with a prefix
* Write an opentracing span for encoding sync response
* opentracing span to group generate_room_entries
* opentracing spans within sync.encode_response
* changelog
* Use the `trace` decorator instead of context managers
2021-12-21 11:10:36 +00:00
Richard van der Hoff
8c36d332d5
1.49.1
2021-12-21 11:07:41 +00:00
Patrick Cloke
dd47788752
Do not bundle aggregations for APIs which shouldn't include them. ( #11592 )
...
And make bundling aggregations opt-in, instead of opt-out to avoid
having APIs to include extraneous data (and being much heavier than
necessary).
2021-12-20 14:14:38 -05:00
Richard van der Hoff
c3e38b88f2
Improve opentracing support for ResponseCache ( #11607 )
...
This adds some opentracing annotations to ResponseCache, to make it easier to see what's going on; in particular, it adds a link back to the initial trace which is actually doing the work of generating the response.
2021-12-20 18:12:08 +00:00
Richard van der Hoff
60fa4935b5
Improve opentracing for incoming HTTP requests ( #11618 )
...
* remove `start_active_span_from_request`
Instead, pull out a separate function, `span_context_from_request`, to extract
the parent span, which we can then pass into `start_active_span` as
normal. This seems to be clearer all round.
* Remove redundant tags from `incoming-federation-request`
These are all wrapped up inside a parent span generated in AsyncResource, so
there's no point duplicating all the tags that are set there.
* Leave request spans open until the request completes
It may take some time for the response to be encoded into JSON, and that JSON
to be streamed back to the client, and really we want that inside the top-level
span, so let's hand responsibility for closure to the SynapseRequest.
* opentracing logs for HTTP request events
* changelog
2021-12-20 17:45:03 +00:00
Richard van der Hoff
8e4083e2f6
Merge remote-tracking branch 'origin/release-v1.49' into develop
2021-12-20 16:34:01 +00:00
Richard van der Hoff
76aa5537ad
Disable aggregation bundling on /sync responses ( #11583 )
...
* Disable aggregation bundling on `/sync` responses
A partial revert of #11478 . This turns out to have had a significant CPU impact
on initial-sync handling. For now, let's disable it, until we find a more
efficient way of achieving this.
* Fix tests.
Co-authored-by: Patrick Cloke <patrickc@matrix.org >
2021-12-20 16:33:35 +00:00
Patrick Cloke
3e0cfd447e
Return JSON errors for unknown resources under /matrix/client. ( #11602 )
...
Instead of returning 404 errors with HTML bodies when an unknown
prefix was requested (e.g. /matrix/client/v1 before Synapse v1.49.0).
2021-12-20 16:00:13 +00:00
V02460
7a7ca8f226
Use mock from standard library ( #11588 )
...
Instead of the backported version.
2021-12-20 10:34:46 -05:00
Shay
8ad39438fa
Add opentracing types ( #11603 )
2021-12-20 12:18:09 +00:00
Eric Eastwood
df2a1523fc
Fix NPE when trying to grab event from wrong roomId (fix sytest)
...
See https://github.com/matrix-org/synapse/pull/11114#discussion_r741687508
2021-12-16 17:52:13 -06:00
Eric Eastwood
3810ae10aa
Clarify comments
2021-12-16 15:51:27 -06:00
Eric Eastwood
b99efa8026
Plumb allow_no_prev_events through create_and_send_nonmember_event
2021-12-16 15:31:12 -06:00
Dirk Klimpel
8428ef66c7
Add type hints to synapse/tests/rest/admin ( #11590 )
2021-12-16 14:59:56 -05:00
Dirk Klimpel
1847d027e6
Add type hints to synapse/storage/databases/main/transactions.py ( #11589 )
2021-12-16 14:59:35 -05:00
Eric Eastwood
43f5cc7adc
Add MSC2716 and MSC3030 to /versions -> unstable_features ( #11582 )
...
As suggested in https://github.com/matrix-org/matrix-react-sdk/pull/7372#discussion_r769523369
2021-12-16 11:25:37 -06:00
Eric Eastwood
ec33a40201
Make the historical events float separately from the state chain
...
See https://github.com/matrix-org/synapse/pull/11114#discussion_r760843910
2021-12-15 23:20:53 -06:00
Eric Eastwood
b071426a63
Plumb allow_no_prev_events through for MSC2716
2021-12-15 23:12:37 -06:00
Eric Eastwood
1d0004312a
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
...
Conflicts:
synapse/handlers/message.py
synapse/handlers/room_member.py
2021-12-15 22:38:29 -06:00
Sean Quah
c7fe32edb4
Add type hints to synapse/storage/databases/main/room.py ( #11575 )
2021-12-15 18:00:48 +00:00
Patrick Cloke
f901f8b70e
Require Collections as the parameters for simple_* methods. ( #11580 )
...
Instead of Iterable since the generators are not allowed due
to the potential for their re-use.
2021-12-15 17:00:50 +00:00
Patrick Cloke
323151b787
Convert EventStreamResult to attrs. ( #11574 )
2021-12-15 11:10:02 -05:00
reivilibre
17886d2603
Add experimental support for MSC3202: allowing application services to masquerade as specific devices. ( #11538 )
2021-12-15 10:40:52 +00:00
Sean Quah
ecfcd9bbbe
Add type hints to synapse/storage/databases/main/e2e_room_keys.py ( #11549 )
2021-12-14 17:46:47 +00:00
Sean Quah
0147b3de20
Add missing type hints to synapse.logging.context ( #11556 )
2021-12-14 17:35:28 +00:00
Patrick Cloke
2519beaad2
Add missing type hints to synapse.appservice ( #11360 )
2021-12-14 17:02:46 +00:00
Olivier Wilkinson (reivilibre)
70ca05373b
Merge branch 'master' into develop
2021-12-14 14:22:48 +00:00
Olivier Wilkinson (reivilibre)
a91698df90
Merge tag 'v1.49.0'
...
Synapse 1.49.0 (2021-12-14)
===========================
No significant changes since version 1.49.0rc1.
Support for Ubuntu 21.04 ends next month on the 20th of January
---------------------------------------------------------------
For users of Ubuntu 21.04 (Hirsute Hippo), please be aware that [upstream support for this version of Ubuntu will end next month][Ubuntu2104EOL].
We will stop producing packages for Ubuntu 21.04 after upstream support ends.
[Ubuntu2104EOL]: https://lists.ubuntu.com/archives/ubuntu-announce/2021-December/000275.html
The wiki has been migrated to the documentation website
-------------------------------------------------------
We've decided to move the existing, somewhat stagnant pages from the GitHub wiki
to the [documentation website](https://matrix-org.github.io/synapse/latest/ ).
This was done for two reasons. The first was to ensure that changes are checked by
multiple authors before being committed (everyone makes mistakes!) and the second
was visibility of the documentation. Not everyone knows that Synapse has some very
useful information hidden away in its GitHub wiki pages. Bringing them to the
documentation website should help with visibility, as well as keep all Synapse documentation
in one, easily-searchable location.
Note that contributions to the documentation website happen through [GitHub pull
requests](https://github.com/matrix-org/synapse/pulls ). Please visit [#synapse-dev:matrix.org](https://matrix.to/#/#synapse-dev:matrix.org )
if you need help with the process!
Synapse 1.49.0rc1 (2021-12-07)
==============================
Features
--------
- Add [MSC3030](https://github.com/matrix-org/matrix-doc/pull/3030 ) experimental client and federation API endpoints to get the closest event to a given timestamp. ([\#9445](https://github.com/matrix-org/synapse/issues/9445 ))
- Include bundled relation aggregations during a limited `/sync` request and `/relations` request, per [MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675 ). ([\#11284](https://github.com/matrix-org/synapse/issues/11284 ), [\#11478](https://github.com/matrix-org/synapse/issues/11478 ))
- Add plugin support for controlling database background updates. ([\#11306](https://github.com/matrix-org/synapse/issues/11306 ), [\#11475](https://github.com/matrix-org/synapse/issues/11475 ), [\#11479](https://github.com/matrix-org/synapse/issues/11479 ))
- Support the stable API endpoints for [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946 ): the room `/hierarchy` endpoint. ([\#11329](https://github.com/matrix-org/synapse/issues/11329 ))
- Add admin API to get some information about federation status with remote servers. ([\#11407](https://github.com/matrix-org/synapse/issues/11407 ))
- Support expiry of refresh tokens and expiry of the overall session when refresh tokens are in use. ([\#11425](https://github.com/matrix-org/synapse/issues/11425 ))
- Stabilise support for [MSC2918](https://github.com/matrix-org/matrix-doc/blob/main/proposals/2918-refreshtokens.md#msc2918-refresh-tokens ) refresh tokens as they have now been merged into the Matrix specification. ([\#11435](https://github.com/matrix-org/synapse/issues/11435 ), [\#11522](https://github.com/matrix-org/synapse/issues/11522 ))
- Update [MSC2918 refresh token](https://github.com/matrix-org/matrix-doc/blob/main/proposals/2918-refreshtokens.md#msc2918-refresh-tokens ) support to confirm with the latest revision: accept the `refresh_tokens` parameter in the request body rather than in the URL parameters. ([\#11430](https://github.com/matrix-org/synapse/issues/11430 ))
- Support configuring the lifetime of non-refreshable access tokens separately to refreshable access tokens. ([\#11445](https://github.com/matrix-org/synapse/issues/11445 ))
- Expose `synapse_homeserver` and `synapse_worker` commands as entry points to run Synapse's main process and worker processes, respectively. Contributed by @Ma27. ([\#11449](https://github.com/matrix-org/synapse/issues/11449 ))
- `synctl stop` will now wait for Synapse to exit before returning. ([\#11459](https://github.com/matrix-org/synapse/issues/11459 ), [\#11490](https://github.com/matrix-org/synapse/issues/11490 ))
- Extend the "delete room" admin api to work correctly on rooms which have previously been partially deleted. ([\#11523](https://github.com/matrix-org/synapse/issues/11523 ))
- Add support for the `/_matrix/client/v3/login/sso/redirect/{idpId}` API from Matrix v1.1. This endpoint was overlooked when support for v3 endpoints was added in Synapse 1.48.0rc1. ([\#11451](https://github.com/matrix-org/synapse/issues/11451 ))
Bugfixes
--------
- Fix using [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) batch sending in combination with event persistence workers. Contributed by @tulir at Beeper. ([\#11220](https://github.com/matrix-org/synapse/issues/11220 ))
- Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection, properly this time. Also fix a race condition introduced in the previous insufficient fix in Synapse 1.47.0. ([\#11376](https://github.com/matrix-org/synapse/issues/11376 ))
- The `/send_join` response now includes the stable `event` field instead of the unstable field from [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083 ). ([\#11413](https://github.com/matrix-org/synapse/issues/11413 ))
- Fix a bug introduced in Synapse 1.47.0 where `send_join` could fail due to an outdated `ijson` version. ([\#11439](https://github.com/matrix-org/synapse/issues/11439 ), [\#11441](https://github.com/matrix-org/synapse/issues/11441 ), [\#11460](https://github.com/matrix-org/synapse/issues/11460 ))
- Fix a bug introduced in Synapse 1.36.0 which could cause problems fetching event-signing keys from trusted key servers. ([\#11440](https://github.com/matrix-org/synapse/issues/11440 ))
- Fix a bug introduced in Synapse 1.47.1 where the media repository would fail to work if the media store path contained any symbolic links. ([\#11446](https://github.com/matrix-org/synapse/issues/11446 ))
- Fix an `LruCache` corruption bug, introduced in Synapse 1.38.0, that would cause certain requests to fail until the next Synapse restart. ([\#11454](https://github.com/matrix-org/synapse/issues/11454 ))
- Fix a long-standing bug where invites from ignored users were included in incremental syncs. ([\#11511](https://github.com/matrix-org/synapse/issues/11511 ))
- Fix a regression in Synapse 1.48.0 where presence workers would not clear their presence updates over replication on shutdown. ([\#11518](https://github.com/matrix-org/synapse/issues/11518 ))
- Fix a regression in Synapse 1.48.0 where the module API's `looping_background_call` method would spam errors to the logs when given a non-async function. ([\#11524](https://github.com/matrix-org/synapse/issues/11524 ))
Updates to the Docker image
---------------------------
- Update `Dockerfile-workers` to healthcheck all workers in the container. ([\#11429](https://github.com/matrix-org/synapse/issues/11429 ))
Improved Documentation
----------------------
- Update the media repository documentation. ([\#11415](https://github.com/matrix-org/synapse/issues/11415 ))
- Update section about backward extremities in the room DAG concepts doc to correct the misconception about backward extremities indicating whether we have fetched an events' `prev_events`. ([\#11469](https://github.com/matrix-org/synapse/issues/11469 ))
Internal Changes
----------------
- Add `Final` annotation to string constants in `synapse.api.constants` so that they get typed as `Literal`s. ([\#11356](https://github.com/matrix-org/synapse/issues/11356 ))
- Add a check to ensure that users cannot start the Synapse master process when `worker_app` is set. ([\#11416](https://github.com/matrix-org/synapse/issues/11416 ))
- Add a note about postgres memory management and hugepages to postgres doc. ([\#11467](https://github.com/matrix-org/synapse/issues/11467 ))
- Add missing type hints to `synapse.config` module. ([\#11465](https://github.com/matrix-org/synapse/issues/11465 ))
- Add missing type hints to `synapse.federation`. ([\#11483](https://github.com/matrix-org/synapse/issues/11483 ))
- Add type annotations to `tests.storage.test_appservice`. ([\#11488](https://github.com/matrix-org/synapse/issues/11488 ), [\#11492](https://github.com/matrix-org/synapse/issues/11492 ))
- Add type annotations to some of the configuration surrounding refresh tokens. ([\#11428](https://github.com/matrix-org/synapse/issues/11428 ))
- Add type hints to `synapse/tests/rest/admin`. ([\#11501](https://github.com/matrix-org/synapse/issues/11501 ))
- Add type hints to storage classes. ([\#11411](https://github.com/matrix-org/synapse/issues/11411 ))
- Add wiki pages to documentation website. ([\#11402](https://github.com/matrix-org/synapse/issues/11402 ))
- Clean up `tests.storage.test_main` to remove use of legacy code. ([\#11493](https://github.com/matrix-org/synapse/issues/11493 ))
- Clean up `tests.test_visibility` to remove legacy code. ([\#11495](https://github.com/matrix-org/synapse/issues/11495 ))
- Convert status codes to `HTTPStatus` in `synapse.rest.admin`. ([\#11452](https://github.com/matrix-org/synapse/issues/11452 ), [\#11455](https://github.com/matrix-org/synapse/issues/11455 ))
- Extend the `scripts-dev/sign_json` script to support signing events. ([\#11486](https://github.com/matrix-org/synapse/issues/11486 ))
- Improve internal types in push code. ([\#11409](https://github.com/matrix-org/synapse/issues/11409 ))
- Improve type annotations in `synapse.module_api`. ([\#11029](https://github.com/matrix-org/synapse/issues/11029 ))
- Improve type hints for `LruCache`. ([\#11453](https://github.com/matrix-org/synapse/issues/11453 ))
- Preparation for database schema simplifications: disambiguate queries on `state_key`. ([\#11497](https://github.com/matrix-org/synapse/issues/11497 ))
- Refactor `backfilled` into specific behavior function arguments (`_persist_events_and_state_updates` and downstream calls). ([\#11417](https://github.com/matrix-org/synapse/issues/11417 ))
- Refactor `get_version_string` to fix-up types and duplicated code. ([\#11468](https://github.com/matrix-org/synapse/issues/11468 ))
- Refactor various parts of the `/sync` handler. ([\#11494](https://github.com/matrix-org/synapse/issues/11494 ), [\#11515](https://github.com/matrix-org/synapse/issues/11515 ))
- Remove unnecessary `json.dumps` from `tests.rest.admin`. ([\#11461](https://github.com/matrix-org/synapse/issues/11461 ))
- Save the OpenID Connect session ID on login. ([\#11482](https://github.com/matrix-org/synapse/issues/11482 ))
- Update and clean up recently ported documentation pages. ([\#11466](https://github.com/matrix-org/synapse/issues/11466 ))
2021-12-14 14:22:16 +00:00
Olivier Wilkinson (reivilibre)
4dd9ea8f4f
Revert "Revert accidental fast-forward merge from v1.49.0rc1"
...
This reverts commit 158d73ebdd .
2021-12-14 14:22:01 +00:00
Olivier Wilkinson (reivilibre)
92906e1b60
Restructure changelog
2021-12-14 13:00:46 +00:00
Olivier Wilkinson (reivilibre)
9f3c7e85a4
1.49.0
2021-12-14 12:56:14 +00:00
Sean Quah
a4dce5b53d
Remove redundant COALESCE()s around COUNT()s in database queries ( #11570 )
...
`COUNT()` never returns `NULL`. A `COUNT(*)` over 0 rows is 0 and a
`COUNT(NULL)` is also 0.
2021-12-14 12:34:30 +00:00
Patrick Cloke
33abbc3278
Add missing type hints to synapse.http. ( #11571 )
2021-12-14 07:00:47 -05:00
Richard van der Hoff
ff6fd52160
checks for generators in database functions ( #11564 )
...
A couple of safety-checks to hopefully stop people doing what I just did, and create a storage
function which only works the first time it is called (and not when it is re-run due to a database
concurrency error or similar).
2021-12-13 19:01:27 +00:00
Patrick Cloke
eb39da6782
Move HTML parsing to a separate file for URL previews. ( #11566 )
...
* Splits the logic for parsing HTML from the resource handling code.
* Fix a circular import in the oEmbed code (which uses the HTML parsing code).
* Renames some of the HTML parsing methods to:
* Make it clear which methods are "internal" to the module.
* Clarify what the methods do.
2021-12-13 17:55:07 +00:00
Sean Quah
5305a5e881
Type hint the constructors of the data store classes ( #11555 )
2021-12-13 17:05:00 +00:00
Sean Quah
1abfb15f07
Add type hints to synapse/storage/databases/main/end_to_end_keys.py ( #11551 )
2021-12-13 16:28:26 +00:00
Sean Quah
6da8591f2e
Add type hints to synapse/storage/databases/main/account_data.py ( #11546 )
2021-12-13 16:28:10 +00:00
reivilibre
e5cdb9e233
Make get_device return None if the device doesn't exist rather than raising an exception. ( #11565 )
...
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
2021-12-13 15:39:43 +00:00
Eric Eastwood
aa8708ebed
Allow events to be created with no prev_events (MSC2716) ( #11243 )
...
The event still needs to have `auth_events` defined to be valid.
Split out from https://github.com/matrix-org/synapse/pull/11114
2021-12-10 23:08:51 -06:00
Eric Eastwood
8391bd6ab5
Test to ensure we share the same state_group across the whole historical batch (MSC2716) ( #11487 )
...
Part of MSC2716: https://github.com/matrix-org/matrix-doc/pull/2716
We did some work on making sure the `state_groups` were shared in
https://github.com/matrix-org/synapse/pull/10975
2021-12-10 20:59:20 -06:00
David Robertson
fd2dadb815
Adjust _get_rooms_changed comments ( #11550 )
...
C.f. https://github.com/matrix-org/synapse/pull/11494#pullrequestreview-827780886
2021-12-10 19:19:48 +00:00
Richard van der Hoff
f0562183e7
skip some dict munging in event persistence ( #11560 )
...
Create a new dict helper method `simple_insert_many_values_txn`, which takes
raw row values, rather than {key=>value} dicts. This saves us a bunch of dict
munging, and makes it easier to use generators rather than creating
intermediate lists and dicts.
2021-12-10 15:02:33 +00:00
Richard van der Hoff
86e7a6d16e
Stop populating state_events.prev_state ( #11558 )
...
this field is never read, so we may as well stop populating it.
2021-12-10 14:13:23 +00:00
Patrick Cloke
9562f0c2f1
Ensure emails are canonicalized before fetching associated user. ( #11547 )
...
This should fix pushers with an email in non-canonical form is used as
the pushkey.
2021-12-10 07:17:28 -05:00
Patrick Cloke
3b8872299a
Do not allow cross-room relations, per MSC2674. ( #11516 )
2021-12-09 13:16:01 -05:00
Patrick Cloke
0cc3bf97b4
Additional type hints for the config module, part 2. ( #11480 )
2021-12-09 16:15:46 +00:00
Dirk Klimpel
941ebe49ff
Use HTTPStatus constants in place of literals in synapse.http ( #11543 )
2021-12-09 11:58:25 +00:00
Hubert Chathi
b47d10dc46
Support unprefixed versions of fallback key property names. ( #11541 )
2021-12-09 11:41:27 +00:00
Dirk Klimpel
b3bcacf3c1
Add missing errcode to parse_string and parse_boolean ( #11542 )
2021-12-09 11:23:34 +00:00
Robert Long
afa0a5e4fc
Allow guests to send state events ( #11378 )
2021-12-09 11:02:05 +00:00
Eric Eastwood
6b64184585
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
...
Conflicts:
scripts-dev/complement.sh
synapse/handlers/room_batch.py
2021-12-09 02:53:17 -06:00
Patrick Cloke
d93362d87f
Add a constant for receipt types (m.read). ( #11531 )
...
And expand some type hints in the receipts storage module.
2021-12-08 12:26:29 -05:00
Dirk Klimpel
7ecaa3b976
Clean up synapse.rest.admin ( #11535 )
2021-12-08 16:59:40 +00:00
reivilibre
83a74d9350
Document the usage of refresh tokens. ( #11427 )
...
Co-authored-by: David Robertson <davidr@element.io >
2021-12-08 15:31:17 +00:00
reivilibre
365e9482fe
Use HTTPStatus constants in place of literals in tests.rest.client.test_auth. ( #11520 )
2021-12-08 14:54:47 +00:00
Richard van der Hoff
ff7cc17b57
Improve log messages for stream ids ( #11536 )
...
Somehow I'd managed to get my database in a pickle with stream ids. These
changes were useful to debug.
2021-12-08 14:15:14 +00:00
Hubert Chathi
8541809cb9
Send and handle cross-signing messages using the stable prefix. ( #10520 )
2021-12-08 10:01:38 +00:00
Andrew Morgan
d6fb96e056
Fix case in wait_for_background_updates where self.store does not exist ( #11331 )
...
Pull the DataStore from the HomeServer instance, which
always exists.
2021-12-07 11:51:53 -05:00
Sean Quah
158d73ebdd
Revert accidental fast-forward merge from v1.49.0rc1
...
Revert "Sort internal changes in changelog"
Revert "Update CHANGES.md"
Revert "1.49.0rc1"
Revert "Revert "Move `glob_to_regex` and `re_word_boundary` to `matrix-python-common` (#11505 ) (#11527 )"
Revert "Refactors in `_generate_sync_entry_for_rooms` (#11515 )"
Revert "Correctly register shutdown handler for presence workers (#11518 )"
Revert "Fix `ModuleApi.looping_background_call` for non-async functions (#11524 )"
Revert "Fix 'delete room' admin api to work on incomplete rooms (#11523 )"
Revert "Correctly ignore invites from ignored users (#11511 )"
Revert "Fix the test breakage introduced by #11435 as a result of concurrent PRs (#11522 )"
Revert "Stabilise support for MSC2918 refresh tokens as they have now been merged into the Matrix specification. (#11435 )"
Revert "Save the OIDC session ID (sid) with the device on login (#11482 )"
Revert "Add admin API to get some information about federation status (#11407 )"
Revert "Include bundled aggregations in /sync and related fixes (#11478 )"
Revert "Move `glob_to_regex` and `re_word_boundary` to `matrix-python-common` (#11505 )"
Revert "Update backward extremity docs to make it clear that it does not indicate whether we have fetched an events' `prev_events` (#11469 )"
Revert "Support configuring the lifetime of non-refreshable access tokens separately to refreshable access tokens. (#11445 )"
Revert "Add type hints to `synapse/tests/rest/admin` (#11501 )"
Revert "Revert accidental commits to develop."
Revert "Newsfile"
Revert "Give `tests.server.setup_test_homeserver` (nominally!) the same behaviour"
Revert "Move `tests.utils.setup_test_homeserver` to `tests.server`"
Revert "Convert one of the `setup_test_homeserver`s to `make_test_homeserver_synchronous`"
Revert "Disambiguate queries on `state_key` (#11497 )"
Revert "Comments on the /sync tentacles (#11494 )"
Revert "Clean up tests.storage.test_appservice (#11492 )"
Revert "Clean up `tests.storage.test_main` to remove use of legacy code. (#11493 )"
Revert "Clean up `tests.test_visibility` to remove legacy code. (#11495 )"
Revert "Minor cleanup on recently ported doc pages (#11466 )"
Revert "Add most of the missing type hints to `synapse.federation`. (#11483 )"
Revert "Avoid waiting for zombie processes in `synctl stop` (#11490 )"
Revert "Fix media repository failing when media store path contains symlinks (#11446 )"
Revert "Add type annotations to `tests.storage.test_appservice`. (#11488 )"
Revert "`scripts-dev/sign_json`: support for signing events (#11486 )"
Revert "Add MSC3030 experimental client and federation API endpoints to get the closest event to a given timestamp (#9445 )"
Revert "Port wiki pages to documentation website (#11402 )"
Revert "Add a license header and comment. (#11479 )"
Revert "Clean-up get_version_string (#11468 )"
Revert "Link background update controller docs to summary (#11475 )"
Revert "Additional type hints for config module. (#11465 )"
Revert "Register the login redirect endpoint for v3. (#11451 )"
Revert "Update openid.md"
Revert "Remove mention of OIDC certification from Dex (#11470 )"
Revert "Add a note about huge pages to our Postgres doc (#11467 )"
Revert "Don't start Synapse master process if `worker_app` is set (#11416 )"
Revert "Expose worker & homeserver as entrypoints in `setup.py` (#11449 )"
Revert "Bundle relations of relations into the `/relations` result. (#11284 )"
Revert "Fix `LruCache` corruption bug with a `size_callback` that can return 0 (#11454 )"
Revert "Eliminate a few `Any`s in `LruCache` type hints (#11453 )"
Revert "Remove unnecessary `json.dumps` from `tests.rest.admin` (#11461 )"
Revert "Merge branch 'master' into develop"
This reverts commit 26b5d2320f .
This reverts commit bce4220f38 .
This reverts commit 966b5d0fa0 .
This reverts commit 088d748f2c .
This reverts commit 14d593f72d .
This reverts commit 2a3ec6facf .
This reverts commit eccc49d755 .
This reverts commit b1ecd19c5d .
This reverts commit 9c55dedc8c .
This reverts commit 2d42e586a8 .
This reverts commit 2f053f3f82 .
This reverts commit a15a893df8 .
This reverts commit 8b4b153c9e .
This reverts commit 494ebd7347 .
This reverts commit a77c369897 .
This reverts commit 4eb77965cd .
This reverts commit 637df95de6 .
This reverts commit e5f426cd54 .
This reverts commit 8cd68b8102 .
This reverts commit 6cae125e20 .
This reverts commit 7be88fbf48 .
This reverts commit b3fd99b74a .
This reverts commit f7ec6e7d9e .
This reverts commit 5640992d17 .
This reverts commit d26808dd85 .
This reverts commit f91624a595 .
This reverts commit 16d39a5490 .
This reverts commit 8a4c296987 .
This reverts commit 49e1356ee3 .
This reverts commit d2279f471b .
This reverts commit b50e39df57 .
This reverts commit 858d80bf0f .
This reverts commit 435f044807 .
This reverts commit f61462e1be .
This reverts commit a6f1a3abec .
This reverts commit 84dc50e160 .
This reverts commit ed635d3285 .
This reverts commit 7b62791e00 .
This reverts commit 153194c771 .
This reverts commit f44d729d4c .
This reverts commit a265fbd397 .
This reverts commit b9fef1a7cd .
This reverts commit b0eb64ff7b .
This reverts commit f1795463bf .
This reverts commit 70cbb1a5e3 .
This reverts commit 42bf020463 .
This reverts commit 379f2650cf .
This reverts commit 7ff22d6da4 .
This reverts commit 5a0b652d36 .
This reverts commit 432a174bc1 .
This reverts commit b14f8a1baf , reversing
changes made to e713855dca .
2021-12-07 16:47:31 +00:00
Sean Quah
26b5d2320f
Sort internal changes in changelog
2021-12-07 14:46:37 +00:00
Sean Quah
bce4220f38
Update CHANGES.md
2021-12-07 14:41:06 +00:00
Sean Quah
966b5d0fa0
1.49.0rc1
2021-12-07 13:56:09 +00:00
Sean Quah
088d748f2c
Revert "Move glob_to_regex and re_word_boundary to matrix-python-common ( #11505 ) ( #11527 )
...
This reverts commit a77c369897 .
2021-12-07 13:51:11 +00:00
David Robertson
14d593f72d
Refactors in _generate_sync_entry_for_rooms ( #11515 )
...
* Move sync_token up to the top
* Pull out _get_ignored_users
* Try to signpost the body of `_generate_sync_entry_for_rooms`
* Pull out _calculate_user_changes
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-12-07 12:42:05 +00:00
David Robertson
2a3ec6facf
Correctly register shutdown handler for presence workers ( #11518 )
...
Fixes #11517
2021-12-07 12:34:38 +00:00
Sean Quah
eccc49d755
Fix ModuleApi.looping_background_call for non-async functions ( #11524 )
...
After #10847 , `looping_background_call` would print an error in the logs
every time a non-async function was called. Since the error would be
caught and ignored immediately, there were no other side effects.
2021-12-07 11:41:31 +00:00
Richard van der Hoff
b1ecd19c5d
Fix 'delete room' admin api to work on incomplete rooms ( #11523 )
...
If, for some reason, we don't have the create event, we should still be able to
purge a room.
2021-12-07 11:37:54 +00:00
David Robertson
9c55dedc8c
Correctly ignore invites from ignored users ( #11511 )
2021-12-07 11:24:31 +00:00
reivilibre
2d42e586a8
Fix the test breakage introduced by #11435 as a result of concurrent PRs ( #11522 )
2021-12-07 10:49:39 +00:00
reivilibre
2f053f3f82
Stabilise support for MSC2918 refresh tokens as they have now been merged into the Matrix specification. ( #11435 )
2021-12-06 19:11:43 +00:00
Quentin Gliech
a15a893df8
Save the OIDC session ID (sid) with the device on login ( #11482 )
...
As a step towards allowing back-channel logout for OIDC.
2021-12-06 12:43:06 -05:00
Dirk Klimpel
8b4b153c9e
Add admin API to get some information about federation status ( #11407 )
2021-12-06 16:59:50 +00:00
Patrick Cloke
494ebd7347
Include bundled aggregations in /sync and related fixes ( #11478 )
...
Due to updates to MSC2675 this includes a few fixes:
* Include bundled aggregations for /sync.
* Do not include bundled aggregations for /initialSync and /events.
* Do not bundle aggregations for state events.
* Clarifies comments and variable names.
2021-12-06 15:51:15 +00:00
Sean Quah
a77c369897
Move glob_to_regex and re_word_boundary to matrix-python-common ( #11505 )
2021-12-06 11:36:08 +00:00
Eric Eastwood
4eb77965cd
Update backward extremity docs to make it clear that it does not indicate whether we have fetched an events' prev_events ( #11469 )
...
Spawning from https://github.com/matrix-org/synapse/pull/9445#discussion_r758958181
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-12-03 18:25:04 -06:00
reivilibre
637df95de6
Support configuring the lifetime of non-refreshable access tokens separately to refreshable access tokens. ( #11445 )
2021-12-03 16:42:44 +00:00
Dirk Klimpel
e5f426cd54
Add type hints to synapse/tests/rest/admin ( #11501 )
2021-12-03 13:57:13 +00:00
Olivier Wilkinson (reivilibre)
8cd68b8102
Revert accidental commits to develop.
2021-12-03 12:31:28 +00:00
Olivier Wilkinson (reivilibre)
6cae125e20
Newsfile
...
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org >
2021-12-03 12:25:37 +00:00
Olivier Wilkinson (reivilibre)
7be88fbf48
Give tests.server.setup_test_homeserver (nominally!) the same behaviour
...
by calling into `make_test_homeserver_synchronous`.
The function *could* have been inlined at this point but the function is big enough
and it felt fine to leave it as is.
At least there isn't a confusing name clash anymore!
2021-12-03 11:40:05 +00:00
Olivier Wilkinson (reivilibre)
b3fd99b74a
Move tests.utils.setup_test_homeserver to tests.server
...
It had no users.
We have just taken the identity of a previous function but don't provide the same
behaviour, so we need to fix this in the next commit...
2021-12-03 11:38:14 +00:00
Olivier Wilkinson (reivilibre)
f7ec6e7d9e
Convert one of the setup_test_homeservers to make_test_homeserver_synchronous
...
and pass in the homeserver rather than calling a same-named function to ask for one.
Later commits will jiggle things around to make this sensible.
2021-12-03 11:35:24 +00:00
Richard van der Hoff
5640992d17
Disambiguate queries on state_key ( #11497 )
...
We're going to add a `state_key` column to the `events` table, so we need to
add some disambiguation to queries which use it.
2021-12-02 22:42:58 +00:00
David Robertson
d26808dd85
Comments on the /sync tentacles ( #11494 )
...
This mainly consists of docstrings and inline comments. There are one or two type annotations and variable renames thrown in while I was here.
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-12-02 20:58:32 +00:00
reivilibre
f91624a595
Clean up tests.storage.test_appservice ( #11492 )
2021-12-02 18:43:33 +00:00
reivilibre
16d39a5490
Clean up tests.storage.test_main to remove use of legacy code. ( #11493 )
2021-12-02 18:13:43 +00:00
reivilibre
8a4c296987
Clean up tests.test_visibility to remove legacy code. ( #11495 )
2021-12-02 18:13:30 +00:00
Shay
49e1356ee3
Minor cleanup on recently ported doc pages ( #11466 )
...
* move wiki pages to synapse/docs and add a few titles where necessary
* update SUMMARY.md with added pages
* add changelog
* move incorrectly located newsfragment
* update changelog number
* snake case added files and update summary.md accordingly
* update issue/pr links
* update relative links to docs
* update changelog to indicate that we moved wiki pages to the docs and state reasoning
* requested changes to admin_faq.md
* requested changes to database_maintenance_tools.md
* requested changes to understanding_synapse_through_graphana_graphs.md
* add changelog
* fix leftover merge errata
* fix unwanted changes from merge
* use two spaces between entries
* outdent code blocks
2021-12-02 09:46:20 -08:00
Patrick Cloke
d2279f471b
Add most of the missing type hints to synapse.federation. ( #11483 )
...
This skips a few methods which are difficult to type.
2021-12-02 16:18:10 +00:00
Sean Quah
b50e39df57
Avoid waiting for zombie processes in synctl stop ( #11490 )
2021-12-02 16:07:06 +00:00
Sean Quah
858d80bf0f
Fix media repository failing when media store path contains symlinks ( #11446 )
2021-12-02 16:05:24 +00:00
reivilibre
435f044807
Add type annotations to tests.storage.test_appservice. ( #11488 )
2021-12-02 15:30:05 +00:00
Richard van der Hoff
f61462e1be
scripts-dev/sign_json: support for signing events (#11486 )
2021-12-02 15:18:40 +00:00
Eric Eastwood
a6f1a3abec
Add MSC3030 experimental client and federation API endpoints to get the closest event to a given timestamp ( #9445 )
...
MSC3030: https://github.com/matrix-org/matrix-doc/pull/3030
Client API endpoint. This will also go and fetch from the federation API endpoint if unable to find an event locally or we found an extremity with possibly a closer event we don't know about.
```
GET /_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>
{
"event_id": ...
"origin_server_ts": ...
}
```
Federation API endpoint:
```
GET /_matrix/federation/unstable/org.matrix.msc3030/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>
{
"event_id": ...
"origin_server_ts": ...
}
```
Co-authored-by: Erik Johnston <erik@matrix.org >
2021-12-02 01:02:20 -06:00
Shay
84dc50e160
Port wiki pages to documentation website ( #11402 )
...
* move wiki pages to synapse/docs and add a few titles where necessary
* update SUMMARY.md with added pages
* add changelog
* move incorrectly located newsfragment
* update changelog number
* snake case added files and update summary.md accordingly
* update issue/pr links
* update relative links to docs
* update changelog to indicate that we moved wiki pages to the docs and state reasoning
* revert unintentional change to CHANGES.md
* add link
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
* Update CHANGES.md
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-12-01 10:12:19 -08:00
Patrick Cloke
ed635d3285
Add a license header and comment. ( #11479 )
2021-12-01 12:51:14 -05:00
Patrick Cloke
7b62791e00
Clean-up get_version_string ( #11468 )
2021-12-01 12:43:32 -05:00
Brendan Abolivier
153194c771
Link background update controller docs to summary ( #11475 )
2021-12-01 14:13:01 +00:00
Patrick Cloke
f44d729d4c
Additional type hints for config module. ( #11465 )
...
This adds some misc. type hints to helper methods used
in the `synapse.config` module.
2021-12-01 07:28:23 -05:00
Patrick Cloke
a265fbd397
Register the login redirect endpoint for v3. ( #11451 )
...
As specified for Matrix v1.1.
2021-12-01 07:25:58 -05:00
Richard van der Hoff
b9fef1a7cd
Update openid.md
...
fix header level
2021-12-01 10:57:55 +00:00
Etienne Dysli Metref
b0eb64ff7b
Remove mention of OIDC certification from Dex ( #11470 )
...
Dex isn't yet [1,2] a certified OpenID Provider implementation. As of today, it's not on the list maintained by the OpenID Foundation. [3]
[1] https://github.com/dexidp/dex/issues/42
[2] https://github.com/dexidp/dex/issues/262
[3] https://openid.net/certification/
2021-12-01 09:40:51 +00:00
Shay
f1795463bf
Add a note about huge pages to our Postgres doc ( #11467 )
...
* Add note to postgres doc about hugepages
* Newsfragment
2021-11-30 19:05:20 -08:00
Shay
70cbb1a5e3
Don't start Synapse master process if worker_app is set ( #11416 )
...
* Add check to catch syanpse master process starting when workers are configured
* add test to verify that starting master process with worker config raises error
* newsfragment
* specify config.worker.worker_app in check
* update test
* report specific config option that triggered the error
Co-authored-by: reivilibre <oliverw@matrix.org >
* clarify error message
Co-authored-by: reivilibre <oliverw@matrix.org >
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-11-30 10:12:18 -08:00
Maximilian Bosch
42bf020463
Expose worker & homeserver as entrypoints in setup.py ( #11449 )
...
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-11-30 16:52:45 +00:00
Patrick Cloke
379f2650cf
Bundle relations of relations into the /relations result. ( #11284 )
...
Per updates to MSC2675 which now states that bundled
aggregations should be included from the `/relations`
endpoint.
2021-11-30 11:33:33 -05:00
Sean Quah
7ff22d6da4
Fix LruCache corruption bug with a size_callback that can return 0 ( #11454 )
...
When all entries in an `LruCache` have a size of 0 according to the
provided `size_callback`, and `drop_from_cache` is called on a cache
node, the node would be unlinked from the LRU linked list but remain in
the cache dictionary. An assertion would be later be tripped due to the
inconsistency.
Avoid unintentionally calling `__len__` and use a strict `is None`
check instead when unwrapping the weak reference.
2021-11-30 16:28:02 +00:00
Sean Quah
5a0b652d36
Eliminate a few Anys in LruCache type hints ( #11453 )
2021-11-30 15:39:07 +00:00
Dirk Klimpel
432a174bc1
Remove unnecessary json.dumps from tests.rest.admin ( #11461 )
...
The tests helpers automatically convert dictionaries to
JSON payloads, no need to do it manually for each
test.
2021-11-30 14:51:04 +00:00
Brendan Abolivier
b14f8a1baf
Merge branch 'master' into develop
2021-11-30 14:28:30 +00:00
Patrick Cloke
28f5252c1f
Add missing copyright header. ( #11460 )
2021-11-30 13:23:53 +00:00
Richard van der Hoff
f13a8d1c69
synctl stop: wait for processes to exit ( #11459 )
...
If you're trying to shut down Synapse, it's rather handy if it *actually* shuts
down before you move on.
2021-11-30 11:51:12 +00:00
Marcus
a9481223d1
Improved push typing ( #11409 )
...
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
2021-11-30 11:49:20 +00:00
Brendan Abolivier
e713855dca
Merge trust_identity_server_for_password_resets PRs
2021-11-30 11:48:06 +00:00
Brendan Abolivier
f663426804
Move notices up
2021-11-30 11:26:18 +00:00
Brendan Abolivier
3d831415cc
Fixup changelog
2021-11-30 11:25:11 +00:00
Brendan Abolivier
4bdad80de1
1.48.0
2021-11-30 11:24:21 +00:00
Dirk Klimpel
35b1900f00
Convert status codes to HTTPStatus in tests.rest.admin ( #11455 )
2021-11-30 09:53:54 +00:00
Dirk Klimpel
e8ae94a223
Convert status codes to HTTPStatus in synapse.rest.admin ( #11452 )
2021-11-29 22:19:45 +00:00
Eric Eastwood
fb58611d21
Refactor backfilled into specific behavior function arguments (_persist_events_and_state_updates) ( #11417 )
...
Part of https://github.com/matrix-org/synapse/issues/11300
Call stack:
- `_persist_events_and_state_updates` (added `use_negative_stream_ordering`)
- `_persist_events_txn`
- `_update_room_depths_txn` (added `update_room_forward_stream_ordering`)
- `_update_metadata_tables_txn`
- `_store_room_members_txn` (added `inhibit_local_membership_updates`)
Using keyword-only arguments (`*`) to reduce the mistakes from `backfilled` being left as a positional argument somewhere and being interpreted wrong by our new arguments.
2021-11-29 16:01:54 -06:00
Patrick Cloke
a4521ce0a8
Support the stable /hierarchy endpoint from MSC2946 ( #11329 )
...
This also makes additional updates where the implementation
had drifted from the approved MSC.
Unstable endpoints will be removed at a later data.
2021-11-29 14:32:20 -05:00
Erik Johnston
d08ef6f155
Make background updates controllable via a plugin ( #11306 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-11-29 17:57:06 +01:00
Patrick Cloke
9d1971a5c4
Return the stable event field from /send_join per MSC3083. ( #11413 )
...
This does not remove the unstable field and still parses both.
Handling of the unstable field will need to be removed in the
future.
2021-11-29 15:43:20 +00:00
Sean Quah
7564b8e118
Update the media repository documentation ( #11415 )
2021-11-29 15:37:56 +00:00
reivilibre
a82b90ab32
Add type annotations to some of the configuration surrounding refresh tokens. ( #11428 )
2021-11-29 13:34:14 +00:00
Richard van der Hoff
9cd13c5f63
Fix perspectives requests for multiple keys for the same server ( #11440 )
...
If we tried to request multiple keys for the same server, we would end up
dropping some of those requests.
2021-11-29 13:15:36 +00:00
Tulir Asokan
7b4e228e41
Fix using MSC2716 batch sending with event persistence workers ( #11220 )
...
Signed-off-by: Tulir Asokan <tulir@beeper.com >
2021-11-29 13:13:23 +00:00
David Robertson
dc0a3cd596
disallow-untyped-defs for the module_api ( #11029 )
2021-11-29 11:28:12 +00:00
David Robertson
aa457b625e
Fix changelog filename in #11441
2021-11-29 11:15:28 +00:00
David Robertson
776ad3e5e9
Add a test case for the SendJoinParser ( #11441 )
...
This would have caught the bug #11438 introduced in #11217 and fixed in #11439 .
2021-11-29 11:11:46 +00:00
Daniel Molkentin
e5c5e213ea
Bump ijson dependency to 3.1 ( #11438 ) ( #11439 )
...
Since e81fa92648 , Synapse depends on
the use_float flag which has been introduced in ijson 3.1 and
is not available in 3.0. This is known to cause runtime errors
with send_join.
Signed-off-by: Daniel Molkentin <danimo@infra.run >
Co-authored-by: Daniel Molkentin <danimo@infra.run >
2021-11-26 20:51:22 +00:00
reivilibre
1b6691dce4
Update MSC2918 refresh token support to confirm with the latest revision: accept the refresh_tokens parameter in the request body rather than in the URL parameters. ( #11430 )
2021-11-26 19:06:16 +00:00
Sean Quah
ffd858aa68
Add type hints to synapse/storage/databases/main/events_worker.py ( #11411 )
...
Also refactor the stream ID trackers/generators a bit and try to
document them better.
2021-11-26 18:41:31 +00:00
reivilibre
1d8b80b334
Support expiry of refresh tokens and expiry of the overall session when refresh tokens are in use. ( #11425 )
2021-11-26 14:27:14 +00:00
Michael Kaye
e2c300e7e4
Create healthcheck script for synapse-workers container ( #11429 )
...
The intent is to iterate through all the worker ports and only
report healthy when all are healthy, starting with the main process.
2021-11-26 14:05:20 +00:00
Sean Quah
c675a18071
Track ongoing event fetches correctly (again) ( #11376 )
...
The previous fix for the ongoing event fetches counter
(8eec25a1d9 ) was both insufficient and
incorrect.
When the database is unreachable, `_do_fetch` never gets run and so
`_event_fetch_ongoing` is never decremented.
The previous fix also moved the `_event_fetch_ongoing` decrement outside
of the `_event_fetch_lock` which allowed race conditions to corrupt the
counter.
2021-11-26 13:47:24 +00:00
Brendan Abolivier
c54c9df286
Fix docker hub name
2021-11-25 16:22:54 +00:00
Brendan Abolivier
d4dcc0524f
Incorporate review from synapse-dev
2021-11-25 16:21:00 +00:00
Sean Quah
7862f821de
Annotate string constants in synapse.api.constants with Final ( #11356 )
...
This change makes mypy complain if the constants are ever reassigned,
and, more usefully, makes mypy type them as `Literal`s instead of `str`s,
allowing code of the following form to pass mypy:
```py
def do_something(membership: Literal["join", "leave"], ...): ...
do_something(Membership.JOIN, ...)
```
2021-11-25 16:14:23 +00:00
Brendan Abolivier
b757b68454
Fixup changelog
2021-11-25 16:07:23 +00:00
Brendan Abolivier
946c102ac9
1.48.0rc1
2021-11-25 15:57:04 +00:00
Brendan Abolivier
0d88c4f903
Improve performance of remove_{hidden,deleted}_devices_from_device_inbox ( #11421 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-11-25 15:14:54 +00:00
Brendan Abolivier
7f9841bdec
Lower minumum batch size to 1 for background updates ( #11422 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-11-24 19:21:44 +00:00
reivilibre
f25c75d376
Rename unstable access_token_lifetime configuration option to refreshable_access_token_lifetime to make it clear it only concerns refreshable access tokens. ( #11388 )
2021-11-23 17:01:34 +00:00
Patrick Cloke
55669bd3de
Add missing type hints to config base classes ( #11377 )
2021-11-23 15:21:19 +00:00
Shay
7cebaf9644
Remove code invalidated by deprecated config flag 'trust_identity_servers_for_password_resets' ( #11395 )
...
* remove background update code related to deprecated config flag
* changelog entry
* update changelog
* Delete 11394.removal
Duplicate, wrong number
* add no-op background update and change newfragment so it will be consolidated with associated work
* remove unused code
* Remove code associated with deprecated flag from legacy docker dynamic config file
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-11-23 06:46:40 -08:00
Sean Quah
454c3d7694
Merge branch 'master' into develop
2021-11-23 13:06:56 +00:00
Sean Quah
fcb9441791
Merge tag 'v1.47.1'
...
Synapse 1.47.1 (2021-11-23)
===========================
This release fixes a security issue in the media store, affecting all prior releases of Synapse. Server administrators are encouraged to update Synapse as soon as possible. We are not aware of these vulnerabilities being exploited in the wild.
Server administrators who are unable to update Synapse may use the workarounds described in the linked GitHub Security Advisory below.
Security advisory
-----------------
The following issue is fixed in 1.47.1.
- **[GHSA-3hfw-x7gx-437c](https://github.com/matrix-org/synapse/security/advisories/GHSA-3hfw-x7gx-437c ) / [CVE-2021-41281](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41281 ): Path traversal when downloading remote media.**
Synapse instances with the media repository enabled can be tricked into downloading a file from a remote server into an arbitrary directory, potentially outside the media store directory.
The last two directories and file name of the path are chosen randomly by Synapse and cannot be controlled by an attacker, which limits the impact.
Homeservers with the media repository disabled are unaffected. Homeservers configured with a federation whitelist are also unaffected.
Fixed by [91f2bd090 ](https://github.com/matrix-org/synapse/commit/91f2bd090 ).
2021-11-23 12:39:09 +00:00
Patrick Cloke
6a5dd485bd
Refactor the code to inject bundled relations during serialization. ( #11408 )
2021-11-23 06:43:56 -05:00
Kostas
1035663833
Add config for customizing the claim used for JWT logins. ( #11361 )
...
Allows specifying a different claim (from the default "sub") to use
when calculating the localpart of the Matrix ID used during the
JWT login.
2021-11-22 13:01:03 -05:00
Patrick Cloke
3d893b8cf2
Store arbitrary relations from events. ( #11391 )
...
Instead of only known relation types. This also reworks the background
update for thread relations to crawl events and search for any relation
type, not just threaded relations.
2021-11-22 12:01:47 -05:00
Shay
d9e9771d6b
Update README.md
2021-11-19 14:01:55 -08:00
Dirk Klimpel
ea20937084
Add an admin API to run background jobs. ( #11352 )
...
Instead of having admins poke into the database directly.
Can currently run jobs to populate stats and to populate
the user directory.
2021-11-19 19:39:46 +00:00
Sean Quah
8fa83999d6
Add CVE number
2021-11-19 18:40:13 +00:00
Patrick Cloke
7ae559944a
Fix checking whether a room can be published on creation. ( #11392 )
...
If `room_list_publication_rules` was configured with a rule with a
non-wildcard alias and a room was created with an alias then an
internal server error would have been thrown.
This fixes the error and properly applies the publication rules
during room creation.
2021-11-19 15:19:32 +00:00
Sean Quah
9c21a68995
Refer to 1.47.1 without the v
2021-11-19 14:11:35 +00:00
Sean Quah
8d4dcac7e9
Update 1.47.1 release date in CHANGES.md
2021-11-19 14:11:05 +00:00
Sean Quah
97a402302c
1.47.1
2021-11-19 14:08:59 +00:00
Sean Quah
91f2bd0907
Prevent the media store from writing outside of the configured directory
...
Also tighten validation of server names by forbidding invalid characters
in IPv6 addresses and empty domain labels.
2021-11-19 13:39:15 +00:00
Patrick Cloke
4d6d38ac2f
Remove dead code from acme support. ( #11393 )
2021-11-19 07:07:22 -05:00
Patrick Cloke
5505da2109
Remove msc2716 from the list of tests for complement. ( #11389 )
...
As the tests are currently failing and not run in CI.
2021-11-19 07:06:16 -05:00
Hubert Chathi
eca7cffb73
Keep fallback key marked as used if it's re-uploaded ( #11382 )
2021-11-19 11:40:12 +00:00
Richard van der Hoff
e2e9bea1ce
Publish a develop docker image ( #11380 )
...
I'd find it helpful to have a docker image corresponding to current develop,
without having to build my own.
2021-11-19 10:56:59 +00:00
Richard van der Hoff
a6f7f84570
Fix verification of objects signed with old local keys ( #11379 )
...
Fixes a bug introduced in #11129 : objects signed by the local server, but with
keys other than the current one, could not be successfully verified.
We need to check the key id in the signature, and track down the right key.
2021-11-19 10:55:09 +00:00
Eric Eastwood
7ffddd819c
Prevent historical state from being pushed to an application service via /transactions (MSC2716) ( #11265 )
...
Mark historical state from the MSC2716 `/batch_send` endpoint as `historical` which makes it `backfilled` and have a negative `stream_ordering` so it doesn't get queried by `/transactions`.
Fix https://github.com/matrix-org/synapse/issues/11241
Complement tests: https://github.com/matrix-org/complement/pull/221
2021-11-18 14:16:08 -06:00
Shay
92b75388f5
Remove legacy code related to deprecated trust_identity_server_for_password_resets config flag ( #11333 )
...
* remove code legacy code related to deprecated config flag "trust_identity_server_for_password_resets" from synapse/config/emailconfig.py
* remove legacy code supporting depreciated config flag "trust_identity_server_for_password_resets" from synapse/config/registration.py
* remove legacy code supporting depreciated config flag "trust_identity_server_for_password_resets" from synapse/handlers/identity.py
* add tests to ensure config error is thrown and synapse refuses to start when depreciated config flag is found
* add changelog
* slightly change behavior to only check for deprecated flag if set to 'true'
* Update changelog.d/11333.misc
Co-authored-by: reivilibre <oliverw@matrix.org >
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-11-18 10:56:32 -08:00
Dirk Klimpel
81b18fe5c0
Add dedicated admin API for blocking a room ( #11324 )
2021-11-18 17:43:49 +00:00
reivilibre
5f81c0ce9c
Add/Unerase annotations to Module API ( #11341 )
2021-11-18 16:55:33 +00:00
reivilibre
433ee159cb
Rename get_refresh_token_for_user_id to create_refresh_token_for_user_id ( #11370 )
2021-11-18 14:45:38 +00:00
reivilibre
539e441399
Use auto_attribs for RefreshTokenLookupResult ( #11386 )
2021-11-18 14:40:26 +00:00
Patrick Cloke
4bd54b263e
Do not allow MSC3440 threads to fork threads ( #11161 )
...
Adds validation to the Client-Server API to ensure that
the potential thread head does not relate to another event
already. This results in not allowing a thread to "fork" into
other threads.
If the target event is unknown for some reason (maybe it isn't
visible to your homeserver), but is the target of other events
it is assumed that the thread can be created from it. Otherwise,
it is rejected as an unknown event.
2021-11-18 13:43:09 +00:00
Nicolai Søborg
e2dabec996
Docs: Quote wildcard federation_certificate_verification_whitelist ( #11381 )
...
Otherwise I get this beautiful stacktrace:
```
python3 -m synapse.app.homeserver --config-path /etc/matrix/homeserver.yaml
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/synapse/synapse/app/homeserver.py", line 455, in <module>
main()
File "/root/synapse/synapse/app/homeserver.py", line 445, in main
hs = setup(sys.argv[1:])
File "/root/synapse/synapse/app/homeserver.py", line 345, in setup
config = HomeServerConfig.load_or_generate_config(
File "/root/synapse/synapse/config/_base.py", line 671, in load_or_generate_config
config_dict = read_config_files(config_files)
File "/root/synapse/synapse/config/_base.py", line 717, in read_config_files
yaml_config = yaml.safe_load(file_stream)
File "/root/synapse/env/lib/python3.8/site-packages/yaml/__init__.py", line 125, in safe_load
return load(stream, SafeLoader)
File "/root/synapse/env/lib/python3.8/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/root/synapse/env/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/root/synapse/env/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/root/synapse/env/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
File "/root/synapse/env/lib/python3.8/site-packages/yaml/composer.py", line 110, in compose_sequence_node
while not self.check_event(SequenceEndEvent):
File "/root/synapse/env/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/parser.py", line 379, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/parser.py", line 384, in parse_block_sequence_entry
if not self.check_token(BlockEntryToken, BlockEndToken):
File "/root/synapse/env/lib/python3.8/site-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/scanner.py", line 227, in fetch_more_tokens
return self.fetch_alias()
File "/root/synapse/env/lib/python3.8/site-packages/yaml/scanner.py", line 610, in fetch_alias
self.tokens.append(self.scan_anchor(AliasToken))
File "/root/synapse/env/lib/python3.8/site-packages/yaml/scanner.py", line 922, in scan_anchor
raise ScannerError("while scanning an %s" % name, start_mark,
yaml.scanner.ScannerError: while scanning an alias
in "/etc/matrix/homeserver.yaml", line 614, column 5
expected alphabetic or numeric character, but found '.'
in "/etc/matrix/homeserver.yaml", line 614, column 6
```
Signed-off-by: Nicolai Søborg <git@xn--sb-lka.org >
2021-11-18 12:24:40 +00:00
Sean Quah
84fac0f814
Add type annotations to synapse.metrics ( #10847 )
2021-11-17 19:07:02 +00:00
Aaron R
d993c3bb1e
Add support for /_matrix/media/v3 APIs ( #11371 )
...
* Add support for `/_matrix/media/v3` APIs
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Update `workers.md` to use v3 client and media APIs
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-11-17 15:30:24 +00:00
David Robertson
b76337fdf8
Merge branch 'master' into develop
2021-11-17 14:19:56 +00:00
David Robertson
077b74929f
Merge remote-tracking branch 'origin/release-v1.47'
2021-11-17 14:19:27 +00:00
reivilibre
0d86f6334a
Rename get_access_token_for_user_id method to create_access_token_for_user_id ( #11369 )
2021-11-17 14:10:57 +00:00
Patrick Cloke
60ecb6b4d4
Fix running complement.sh script. ( #11368 )
...
By reverting changes from #11166 in this script. Specifically commit
13f084eb58 .
2021-11-17 09:04:50 -05:00
David Robertson
9f9d82aa84
1.47.0
2021-11-17 13:10:12 +00:00
Patrick Cloke
319dcb955e
Fix incorrect return value in tests. ( #11359 )
2021-11-16 16:36:46 +00:00
David Robertson
0caf20883c
Merge tag 'v1.47.0rc3' into develop
...
Synapse 1.47.0rc3 (2021-11-16)
==============================
Bugfixes
--------
- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\#11346](https://github.com/matrix-org/synapse/issues/11346 ))
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\#11303](https://github.com/matrix-org/synapse/issues/11303 ), [\#11353](https://github.com/matrix-org/synapse/issues/11353 ))
2021-11-16 15:46:45 +00:00
Sean Quah
88375beeaa
Avoid sharing room hierarchy responses between users ( #11355 )
...
Different users may be allowed to see different rooms within a space,
so sharing responses between users is inadvisable.
2021-11-16 15:40:47 +00:00
Andrew Morgan
7baa671dc8
fix up changelog language
2021-11-16 14:42:21 +00:00
Andrew Morgan
729acd82c8
mark the migration file migration as a bug
2021-11-16 14:41:21 +00:00
Andrew Morgan
edcdc5fd82
1.47.0rc3
2021-11-16 14:34:46 +00:00
Aaron R
dfa536490e
Add support for /_matrix/client/v3 APIs ( #11318 )
...
This is one of the changes required to support Matrix 1.1
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-11-16 14:47:58 +01:00
Patrick Cloke
7468723697
Add most missing type hints to synapse.util ( #11328 )
2021-11-16 08:47:36 -05:00
Andrew Morgan
6e084b62b8
Rename remove_deleted_devices_from_device_inbox to ensure it is always run ( #11353 )
...
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-11-16 13:16:43 +00:00
reivilibre
3a1462f7e0
Properly register all callback hooks for legacy password authentication providers ( #11340 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-11-16 12:53:31 +00:00
Patrick Cloke
24b61f379a
Add ability to un-shadow-ban via the admin API. ( #11347 )
2021-11-16 12:43:53 +00:00
David Robertson
0dda1a7968
Misc typing fixes for tests, part 2 of N ( #11330 )
2021-11-16 10:41:35 +00:00
Ashwin Nair
e72135b9d3
change 'Home Server' to one word 'homeserver' ( #11320 )
...
Signed-off-by: Ashwin S. Nair <58840757+Ashwin-exe@users.noreply.github.com >
2021-11-16 10:21:01 +00:00
Andrew Morgan
9c59e117db
Run _upgrade_existing_database on workers if at current schema_version ( #11346 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-11-15 17:34:15 +00:00
David Robertson
e605e4b8f2
Database storage profile passes mypy ( #11342 )
...
It already seems to pass mypy. I wonder what changed, given that it was
on the exclusion list. So this commit consists of me ensuring
`--disallow-untyped-defs` passes and a minor fixup to a function that
returned either `True` or `None`.
2021-11-15 12:59:33 +00:00
David Robertson
5562ce6a53
Get directory db file to pass mypy ( #11339 )
2021-11-15 12:59:05 +00:00
Dirk Klimpel
b596a1eb80
Move sql file for remove_deleted_devices_from_device_inbox into v65 ( #11303 )
2021-11-15 11:47:30 +00:00
Tulir Asokan
6f862c5c28
Add support for the stable version of MSC2778 ( #11335 )
...
* Add support for the stable version of MSC2778
Signed-off-by: Tulir Asokan <tulir@maunium.net >
* Expect m.login.application_service in login and password provider tests
Signed-off-by: Tulir Asokan <tulir@maunium.net >
2021-11-15 10:31:22 +00:00
Shay
605921bc6b
Remove unused tables room_stats_historical and user_stats_historical ( #11280 )
...
* remove unused tables room_stats_historical and user_stats_historical
* update changelog number
* Bump schema compat version comment
* make linter happy
* Update comment to give more info
Co-authored-by: reivilibre <oliverw@matrix.org >
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-11-12 16:47:56 -08:00
David Robertson
fe58672546
Annotations for state_deltas.py ( #11316 )
...
I was sad that I couldn't do better for
`_curr_state_delta_stream_cache`. At least it's explicitly called out in
a comment with #TODO.
2021-11-12 20:24:12 +00:00
Patrick Cloke
3fad4e3fe5
Rollback #11322 due to wrong syntax in mypy.ini. ( #11332 )
...
This was only checking the __init__ files in modules instead of
all files in a module, which don't pass yet.
2021-11-12 20:10:03 +00:00
David Robertson
bea815cec8
Test room alias deletion ( #11327 )
...
* Prefer `HTTPStatus` over plain `int`
This is an Opinion that no-one has seemed to object to yet.
* `--disallow-untyped-defs` for `tests.rest.client.test_directory`
* Improve synapse's annotations for deleting aliases
* Test case for deleting a room alias
* Changelog
2021-11-12 19:56:00 +00:00
Shay
0bcae8ad56
Change display names/avatar URLs to None if they contain null bytes before storing in DB ( #11230 )
...
* change display names/avatar URLS to None if they contain null bytes
* add changelog
* add POC test, requested changes
* add a saner test and remove old one
* update test to verify that display name has been changed to None
* make test less fragile
2021-11-12 10:38:24 -08:00
Patrick Cloke
9b90b9454b
Add type hints to media repository storage module ( #11311 )
2021-11-12 11:05:26 -05:00
David Robertson
6f8f3d4bc5
Attempt to annotate events_forward_extremities ( #11314 )
...
* Make DataStore inherit from EventForwardExtremitiesStore before CacheInvalidationWorkerStore
the former implicitly inherits from the latter, so they should be
ordered like this when used.
2021-11-12 15:58:17 +00:00
David Robertson
4c96ce396e
Misc typing fixes for tests, part 1 of N ( #11323 )
...
* Annotate HomeserverTestCase.servlets
* Correct annotation of federation_auth_origin
* Use AnyStr custom_headers instead of a Union
This allows (str, str) and (bytes, bytes).
This disallows (str, bytes) and (bytes, str)
* DomainSpecificString.SIGIL is a ClassVar
2021-11-12 15:50:54 +00:00
Patrick Cloke
95547e5300
Generalize the disallowed_untyped_defs in mypy.ini ( #11322 )
2021-11-12 14:27:45 +00:00
Patrick Cloke
b64b6d12d4
Add more type hints to synapse.util. ( #11321 )
2021-11-12 13:43:06 +00:00
reivilibre
2fffcb24d8
Suggest using /etc/matrix-synapse/conf.d/ for configuration with Debian packages ( #11281 )
2021-11-12 13:17:06 +00:00
reivilibre
4ad5ee9996
Correct target of link to the modules page from the Password Auth Providers page ( #11309 )
2021-11-12 12:58:39 +00:00
Dirk Klimpel
8840a7b7f1
Convert delete room admin API to async endpoint ( #11223 )
...
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2021-11-12 12:35:31 +00:00
David Robertson
c99da2d079
Annotations for user_erasure_store ( #11313 )
...
I'm not sure why this was excluded---it seemed to be passing for me. But
it's easy enough to fixup.
2021-11-11 19:22:19 +00:00
David Robertson
6a605f4a77
Get db signatures file to pass mypy ( #11312 )
2021-11-11 17:04:44 +00:00
David Robertson
8dc666f785
Correct type hint for room_batch.py ( #11310 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-11-11 16:49:28 +00:00
Dirk Klimpel
48278a0d09
Move sql file for remove_deleted_devices_from_device_inbox into v65 ( #11303 )
2021-11-11 15:01:13 +00:00
Patrick Cloke
64ef25391d
Add type hints to some storage classes ( #11307 )
2021-11-11 08:47:31 -05:00
Eric Eastwood
b559e2326b
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
...
Conflicts:
synapse/rest/client/room_batch.py
2021-11-11 00:56:50 -06:00
Eric Eastwood
d771fbd3b1
Only run the tests package to get streaming Complement output
2021-11-11 00:49:57 -06:00
Neeeflix
6ce19b94e8
Fix error in thumbnail generation ( #11288 )
...
Signed-off-by: Jonas Zeunert <jonas@zeunert.org >
2021-11-10 20:49:43 +00:00
Patrick Cloke
5cace20bf1
Add missing type hints to synapse.app. ( #11287 )
2021-11-10 15:06:54 -05:00
Patrick Cloke
66c4b774fd
Add type hints to synapse._scripts ( #11297 )
2021-11-10 17:55:32 +00:00
Andrew Morgan
5f277ffe89
Add documentation page stubs for Single Sign-On, SAML and CAS pages ( #11298 )
2021-11-10 17:54:56 +00:00
Richard van der Hoff
73cbb284b9
Remove redundant parameters on _check_event_auth ( #11292 )
...
as of #11012 , these parameters are unused.
2021-11-10 14:16:06 +00:00
Olivier Wilkinson (reivilibre)
68c258a604
Merge tag 'v1.47.0rc2' into develop
...
Synapse 1.47.0rc2 (2021-11-10)
==============================
This fixes an issue with publishing the Debian packages for 1.47.0rc1.
It is otherwise identical to 1.47.0rc1.
2021-11-10 13:01:08 +00:00
Olivier Wilkinson (reivilibre)
595f28529c
Changelog tweak from feedback
2021-11-10 09:54:34 +00:00
Olivier Wilkinson (reivilibre)
ef7f9286d1
Move Debian changelog entries to rc2 since rc1 was not published
2021-11-10 09:48:50 +00:00
Olivier Wilkinson (reivilibre)
82e62b488a
1.47.0rc2
2021-11-10 09:44:38 +00:00
Olivier Wilkinson (reivilibre)
af6374905a
Correct the Debian changelog
2021-11-10 09:37:48 +00:00
Stanislav Motylkov
b09d90cac9
Fix typos in the username_available admin API documentation. ( #11286 )
2021-11-09 21:11:05 +00:00
Eric Eastwood
f1d5c2f269
Split out federated PDU retrieval into a non-cached version ( #11242 )
...
Context: https://github.com/matrix-org/synapse/pull/11114/files#r741643968
2021-11-09 15:07:57 -06:00
Patrick Cloke
0ef69ddbdc
Ignore missing imports for parameterized. ( #11285 )
...
This was due to a conflict between #11282 , which changed
mypy configuration, and #11228 , a normal change.
2021-11-09 19:04:53 +00:00
Dan Callahan
3b951445a7
Require mypy for synapse/ & tests/ unless excluded ( #11282 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-11-09 16:22:47 +00:00
Andrew Morgan
a026695083
Clarifications and small fixes to to-device related code ( #11247 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-11-09 14:31:15 +00:00
Olivier Wilkinson (reivilibre)
dc5f524974
Update __init__.py
2021-11-09 13:51:08 +00:00
Olivier Wilkinson (reivilibre)
a754510f28
Changelog tweaks from review
2021-11-09 13:22:36 +00:00
David Robertson
b6f4d122ef
Allow admins to proactively block rooms ( #11228 )
...
Co-authored-by: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com >
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-11-09 13:11:47 +00:00
Patrick Cloke
a19d01c3d9
Support filtering by relations per MSC3440 ( #11236 )
...
Adds experimental support for `relation_types` and `relation_senders`
fields for filters.
2021-11-09 08:10:58 -05:00
Olivier Wilkinson (reivilibre)
b67a7c62a2
Make Deprecations and Removals more prominent
2021-11-09 12:32:05 +00:00
Olivier Wilkinson (reivilibre)
1a4f10045f
Changelog tweaks
2021-11-09 12:30:15 +00:00
Olivier Wilkinson (reivilibre)
01f61da77f
1.47.0rc1
2021-11-09 12:17:35 +00:00
Andrew Morgan
4b3e30c276
Fix typo in RelationAggregationPaginationServlet error response ( #11278 )
2021-11-09 12:11:50 +00:00
Erik Johnston
af784644c3
Include cross-signing signatures when syncing remote devices for the first time ( #11234 )
...
When fetching remote devices for the first time, we did not correctly include the cross signing keys in the returned results.
c.f. #11159
2021-11-09 11:45:36 +00:00
rogersheu
820337e6a4
Require body for read receipts with user-agent exceptions ( #11157 )
...
Co-authored-by: reivilibre <olivier@librepush.net >
2021-11-09 10:26:07 +00:00
Eric Eastwood
84f235aea4
Rename to more clear get_insertion_event_id_by_batch_id (MSC2716) ( #11244 )
...
`get_insertion_event_by_batch_id` -> `get_insertion_event_id_by_batch_id`
Split out from https://github.com/matrix-org/synapse/pull/11114
2021-11-08 21:21:10 -06:00
Erik Johnston
4ee71b9637
Add some background update admin APIs ( #11263 )
...
Fixes #11259
2021-11-08 16:08:02 +00:00
Patrick Cloke
0c82d4aabe
Fix typo in comment from #11255 . ( #11276 )
2021-11-08 14:36:49 +00:00
Richard van der Hoff
86a497efaa
Default value for public_baseurl ( #11210 )
...
We might as well use a default value for `public_baseurl` based on
`server_name` - in many cases, it will be correct.
2021-11-08 14:13:10 +00:00
Dan Callahan
556a488209
Address review feedback from #11269 ( #11273 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-11-08 11:57:37 +00:00
Erik Johnston
a55e1ec9af
Blacklist new sytest validation test ( #11270 )
2021-11-08 10:37:43 +00:00
jmcparland
02742fd058
Wrong DTLS port in "Troubleshooting" ( #11268 )
...
Port 5349, not 5479.
2021-11-08 10:34:39 +00:00
Erik Johnston
98c8fc6ce8
Handle federation inbound instances being killed more gracefully ( #11262 )
...
* Make lock better handle process being killed
If the process gets killed and restarted (so that it didn't have a
chance to drop its locks gracefully) then there may still be locks in
the DB that are for the same instance that haven't yet timed out but are
safe to delete.
We handle this case by a) checking if the current instance already has
taken out the lock, and b) if not then ignoring locks that are for the
same instance.
* Periodically check for old staged events
This is to protect against other instances dying and their locks timing
out.
2021-11-08 09:54:47 +00:00
Dan Callahan
9799c569bb
Minor cleanup to Debian packaging ( #11269 )
...
* Remove unused Vagrant scripts
* Change package Architecture to any
* Preinstall the wheel package when building venvs.
Addresses the following warnings during Debian builds:
Using legacy 'setup.py install' for jaeger-client, since package 'wheel' is not installed.
Using legacy 'setup.py install' for matrix-synapse-ldap3, since package 'wheel' is not installed.
Using legacy 'setup.py install' for opentracing, since package 'wheel' is not installed.
Using legacy 'setup.py install' for psycopg2, since package 'wheel' is not installed.
Using legacy 'setup.py install' for systemd-python, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pympler, since package 'wheel' is not installed.
Using legacy 'setup.py install' for threadloop, since package 'wheel' is not installed.
Using legacy 'setup.py install' for thrift, since package 'wheel' is not installed.
* Allow /etc/default/matrix-synapse to be missing
Per the systemd.exec manpage, prefixing an EnvironmentFile with "-":
> indicates that if the file does not exist, it will not be read and no
> error or warning message is logged.
Signed-off-by: Dan Callahan <danc@element.io >
2021-11-07 21:18:33 +00:00
Julian
09cb441a04
Add doc to integrate synapse with LemonLDAP OIDC ( #11257 )
...
Co-authored-by: David Robertson <david.m.robertson1@gmail.com >
Co-authored-by: Julian Vanden Broeck <julian.vandenbroeck@dalibo.com >
2021-11-05 12:08:02 +00:00
Erik Johnston
a37df1b091
Fix rolling back when using workers ( #11255 )
...
Fixes #11252
2021-11-05 11:12:10 +00:00
reivilibre
499c44d696
Make minor correction to type of auth_checkers callbacks ( #11253 )
2021-11-04 17:10:11 +00:00
Richard van der Hoff
f36434590c
Additional test for cachedList ( #11246 )
...
I was trying to understand how `cachedList` works, and ended up writing this
extra test. I figure we may as well keep it.
2021-11-04 14:45:34 +00:00
Sean Quah
8eec25a1d9
Track ongoing event fetches correctly in the presence of failure ( #11240 )
...
When an event fetcher aborts due to an exception, `_event_fetch_ongoing`
must be decremented, otherwise the event fetcher would never be
replaced. If enough event fetchers were to fail, no more events would be
fetched and requests would get stuck waiting for events.
2021-11-04 10:33:53 +00:00
Eric Eastwood
363aed60e7
Revert unused refactor to get PDU raw
...
Code split out into https://github.com/matrix-org/synapse/pull/11242
2021-11-03 18:31:32 -05:00
Nick Barrett
a271e233e9
Add a linearizer on (appservice, stream) when handling ephemeral events. ( #11207 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-11-03 16:51:00 +00:00
Nick Barrett
af54167516
Enable passing typing stream writers as a list. ( #11237 )
...
This makes the typing stream writer config match the other stream writers
that only currently support a single worker.
2021-11-03 14:25:47 +00:00
Patrick Cloke
2735b3e6f2
Remove a debug statement from tests. ( #11239 )
2021-11-03 13:11:16 +00:00
Erik Johnston
bcc115c28d
Add twine and towncrier as dev dependencies ( #11233 )
...
We don't pin them as we execute them as commands, rather than use them
as libs.
2021-11-03 11:10:25 +00:00
Andrew Morgan
d688a6dee5
fix a small typo in the delete room api docs
2021-11-03 11:09:00 +00:00
Eric Eastwood
da0040785e
Support sending no state_events_at_start in the MSC2716 /batch_send endpoint ( #11188 )
...
As brought up by @tulir, https://matrix.to/#/!SBYNQlpqkwJzFIdzxI:nevarro.space/$Gwnb2ZvXHc3poYXuBhho0cmoYq4KJ11Jh3m5s8kjNOM?via=nevarro.space&via=beeper.com&via=matrix.org
This use case only works if the user is already joined in the current room state
at the given `?prev_event_id`
2021-11-03 03:13:51 -05:00
Eric Eastwood
bc0ba8c094
Protect from no auth events for non-existent provided prev_event
2021-11-03 02:39:39 -05:00
Eric Eastwood
ec35be57e0
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
...
Conflicts:
scripts-dev/complement.sh
synapse/handlers/federation_event.py
synapse/handlers/message.py
synapse/storage/databases/main/event_federation.py
2021-11-03 02:10:07 -05:00
Eric Eastwood
246278e9a3
Fix lints
2021-11-03 01:29:26 -05:00
Eric Eastwood
7f2105ad06
Remove topological sort when receiving backfill events
...
See https://github.com/matrix-org/synapse/pull/11114#discussion_r741517138
2021-11-03 01:14:55 -05:00
Eric Eastwood
f3b7b3e882
Add better explanatory comment
...
See https://github.com/matrix-org/synapse/pull/11114#discussion_r741304767
2021-11-03 01:07:35 -05:00
Eric Eastwood
e96fd5c3fd
Add comment docs
2021-11-03 00:51:05 -05:00
Eric Eastwood
5db717ab85
Always process marker events regardless if backfilled
...
Before, we could rely on the `connected_insertion_event_query`
to navigate the and find the historical branch. But now
we solely rely on the marker event to point out the
historical branch. So we need to make sure to add
the insertion event extremeties whenever we see a marker event.
Whether it be a live event or backfilled.
2021-11-02 21:27:08 -05:00
Eric Eastwood
15c3282be7
Remove the new backfill implementation and pull some good parts of the refactor
2021-11-02 18:18:56 -05:00
Eric Eastwood
321f9ea68b
Move back to the old get_backfill_events and simplify backfill.
...
We now rely on the marker events to backfill the base insertion event
which puts it as a insertion event extremity. This functionality was
already in place (see `handle_marker_event`) and was an easy transition.
This way, remote federated homeserver will have the insertion extremity
to ask about in backfill and goes down the historical branch no problem
because of the depth order and the rest of the DAG navigation happens as
normal. Yay simplification!
The key breakthrough was discussing all the ways we can find connected insertion events.
https://docs.google.com/document/d/1KCEmpnGr4J-I8EeaVQ8QJZKBDu53ViI7V62y5BzfXr0/edit#bookmark=id.1hbt9acs963h
The three options we came up were:
- Find by insertion event prev_events (this is what we were doing before)
- Find connected insertion events by depth
- Find connected insertion events by the marker event
- This made the most sense since we already backfill the insertion event
when a marker event is processed (see `handle_marker_event`).
- Gets rid of the extra insertion event lookup in backfill because we
know it's already backfilled from the marker processing.
- And gets rid of the extra federated lookup we added in this to PR
to ask whether the homeserver requesting backfill already has the
insertion event (deciding whether we fork
to the history branch before we go down the "live" DAG)
2021-11-02 17:27:04 -05:00
Erik Johnston
6250b95efe
Add index to local_group_updates.stream_id ( #11231 )
...
This should speed up startup times and generally increase performance of
groups.
2021-11-02 15:46:48 +00:00
Erik Johnston
237f7eb87a
Merge remote-tracking branch 'origin/master' into develop
2021-11-02 14:28:27 +00:00
Patrick Cloke
c01bc5f43d
Add remaining type hints to synapse.events. ( #11098 )
2021-11-02 09:55:52 -04:00
Erik Johnston
2d44ee6868
Update changelog
2021-11-02 13:25:42 +00:00
Erik Johnston
df84ad602b
1.46.0
2021-11-02 13:23:01 +00:00
Dirk Klimpel
4535532526
Delete messages for hidden devices from device_inbox ( #11199 )
2021-11-02 13:18:30 +00:00
Andrew Morgan
c9c3aea9b1
Fix providing a RoomStreamToken instance to _notify_app_services_ephemeral ( #11137 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-11-02 10:39:02 +00:00
Dirk Klimpel
7537201840
Add search by room ID and room alias to List Room admin API ( #11099 )
...
Fixes : #10874
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2021-11-02 10:01:13 +00:00
Richard van der Hoff
46d0937447
ObservableDeferred: run observers in order ( #11229 )
2021-11-02 00:17:35 +00:00
Dirk Klimpel
93aa670642
Update outdated links in PULL_REQUEST_TEMPLATE.md ( #11225 )
2021-11-01 17:29:51 +00:00
Shay
f5c6a80886
Handle missing Content-Type header when accessing remote media ( #11200 )
...
* add code to handle missing content-type header and a test to verify that it works
* add handling for missing content-type in the /upload endpoint as well
* slightly refactor test code to put private method in approriate place
* handle possible null value for content-type when pulling from the local db
* add changelog
* refactor test and add code to handle missing content-type in cached remote media
* requested changes
* Update changelog.d/11200.bugfix
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
2021-11-01 10:26:02 -07:00
Shay
e81fa92648
Add use_float=true to ijson calls in Synapse ( #11217 )
...
* add use_float=true to ijson calls
* lints
* add changelog
* Update changelog.d/11217.bugfix
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
2021-11-01 09:28:04 -07:00
Dirk Klimpel
caa706d825
Fix a bug in unit test test_block_room_and_not_purge ( #11226 )
2021-11-01 16:10:09 +00:00
reivilibre
69ab3dddbc
Make check_event_allowed module API callback not fail open (accept events) when an exception is raised ( #11033 )
2021-11-01 15:45:56 +00:00
Dirk Klimpel
66bdca3e31
Remove deprecated delete room admin API ( #11213 )
...
Remove deprecated delete room admin API,
`POST /_synapse/admin/v1/rooms/<room_id>/delete`
2021-11-01 15:11:24 +00:00
Richard van der Hoff
71f9966f27
Support for serving server well-known files ( #11211 )
...
Fixes https://github.com/matrix-org/synapse/issues/8308
2021-11-01 15:10:16 +00:00
Brett Bethke
2014098d01
Add domain specific matching for haproxy config ( #11128 )
2021-11-01 14:16:02 +00:00
Richard van der Hoff
0b99d4c8d2
Docker: avoid changing userid unnecessarily ( #11209 )
...
* Docker image: avoid changing user during `generate`
The intention was always that the config files get written as the initial user
(normally root) - only the data directory needs to be writable by Synapse. This
got changed in https://github.com/matrix-org/synapse/pull/5970 , but that seems
to have been a mistake.
* Avoid changing user if no explicit UID is given
* changelog
2021-11-01 13:55:30 +00:00
Aaron R
3ae1464efd
Support Client-Server API r0.6.1 ( #11097 )
...
Fixes #11064
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-11-01 13:28:39 +00:00
Sumner Evans
ece84f2c45
Improve code formatting and fix a few typos in docs ( #11221 )
...
* Labeled a lot more code blocks with the appropriate type
* Fixed a couple of minor typos (missing/extraneous commas)
Signed-off-by: Sumner Evans <me@sumnerevans.com >
2021-11-01 11:35:55 +00:00
Erik Johnston
82d2168a15
Add metrics to the threadpools ( #11178 )
2021-11-01 11:21:36 +00:00
Sean Quah
2451003f6f
Test that ClientIpStore combines database and in-memory data correctly ( #11179 )
2021-11-01 11:20:54 +00:00
JohannesKleine
29ffd680bf
Stop synapse from saving messages in device_inbox for hidden devices. ( #10097 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-11-01 10:40:41 +00:00
Brendan Abolivier
e320f5dba3
Deprecate user_may_create_room_with_invites ( #11206 )
2021-11-01 10:46:08 +01:00
Eric Eastwood
3529449310
Fix lints
2021-10-30 01:07:26 -05:00
Eric Eastwood
76d454f81d
Some backfill receive sorting fixes but not using it yet
2021-10-30 00:46:02 -05:00
Eric Eastwood
e0ff66dfd9
Fix backfill being able to cleanly branch into history and back to "live"
...
Fix https://github.com/matrix-org/synapse/pull/11114#discussion_r731363046
- When we see a connected insertion event indicating a branch of history,
we now don't accidentally leak the base event we're branching from
in the backfill chunk until all of the events in the historical brach
are exhausted.
- Backfill will now check whether the federating homeserver asking
has a given insertion event when we see one connected to the DAG.
This allows backfill to initially decide to give all the historical
messages in the branch, then next time when the base event we branched
from comes up in backfill again, it sees that federated homeserver
already has the insertion event, and we can continue down the normal
DAG prev_event path instead.
Example Backfill response (in order yay):
Overview:
```
eventIDsAfter
batch0
batch1
eventIDsBefore
```
```
new implementation backfill events(100)=[
"event_id=$q3w2dF5mWBkgUF1ADdVgS_bX7YQuqODJ2HC33bln4Ho,depth=11,body=Message 1 (eventIDsAfter),prevs=['$Com3-ZIR35FvYcBQvHdpxGsS1iW-DO_Z5x1zZ5R5Az8']",
"event_id=$Com3-ZIR35FvYcBQvHdpxGsS1iW-DO_Z5x1zZ5R5Az8,depth=10,body=Message 0 (eventIDsAfter),prevs=['$T5-OUXAW3CCYAHskqk5s0V2ZzJoQy5D8lQJ7LZFWvTI']",
"event_id=$78Yy5bqa9XuQ5fhcw9AF36Xf4W5EDcjsraSInif7nYU,depth=10,body=org.matrix.msc2716.insertion,prevs=['$T5-OUXAW3CCYAHskqk5s0V2ZzJoQy5D8lQJ7LZFWvTI']",
"event_id=$GEzF4euV8StAtdCDCtWmpdhxRE3KQWgreyr1_ePqlpM,depth=10,body=org.matrix.msc2716.batch,prevs=['$ot97LEPqM55EV1ka8YM445c6q-ny4jBBRxjgQnGxihQ']",
"event_id=$ot97LEPqM55EV1ka8YM445c6q-ny4jBBRxjgQnGxihQ,depth=10,body=Historical 99 (batch=0),prevs=['$i53GQczFiX-tqXgcxudp5AWR9C-A0yJiET_ZXe9D49I']",
"event_id=$i53GQczFiX-tqXgcxudp5AWR9C-A0yJiET_ZXe9D49I,depth=10,body=Historical 98 (batch=0),prevs=['$lqjhSBLzbi2WfWNAIm1mngStqsPfQJUwPO0NAFtB8lo']",
"event_id=$lqjhSBLzbi2WfWNAIm1mngStqsPfQJUwPO0NAFtB8lo,depth=10,body=Historical 97 (batch=0),prevs=['$k8OC791p_vB-Hz36Byn-o3vK9x_rc0qkVufBpxYRcaA']",
"event_id=$k8OC791p_vB-Hz36Byn-o3vK9x_rc0qkVufBpxYRcaA,depth=10,body=Historical 96 (batch=0),prevs=['$9obrnkfP2HpDfKUkWyHrtHML5_31MZ3T9sKQOb6eUV8']",
"event_id=$9obrnkfP2HpDfKUkWyHrtHML5_31MZ3T9sKQOb6eUV8,depth=10,body=Historical 95 (batch=0),prevs=['$PSNLMD1RhBvR9ffpbEOKtUHE9PUUiacJ2g8_DA9nSjM']",
"event_id=$PSNLMD1RhBvR9ffpbEOKtUHE9PUUiacJ2g8_DA9nSjM,depth=10,body=Historical 94 (batch=0),prevs=['$vGkUiP049MLeapDGHegqdiGZRkuc6WxEJ-iOAN7mqr4']",
"event_id=$vGkUiP049MLeapDGHegqdiGZRkuc6WxEJ-iOAN7mqr4,depth=10,body=Historical 93 (batch=0),prevs=['$reYXzhTXHlqqk6XMLK_mEIFQGIesn4NJ70JYa7EziQc']",
"event_id=$reYXzhTXHlqqk6XMLK_mEIFQGIesn4NJ70JYa7EziQc,depth=10,body=Historical 92 (batch=0),prevs=['$dg8ZPPPqh1SbIhcg-GMvEGz49h53TUMoZ8yO4zbfA4U']",
"event_id=$dg8ZPPPqh1SbIhcg-GMvEGz49h53TUMoZ8yO4zbfA4U,depth=10,body=Historical 91 (batch=0),prevs=['$QW7wied5SyHtJElJTo4SUkc-zNLlAh6tbCiAa5EJXg4']",
"event_id=$QW7wied5SyHtJElJTo4SUkc-zNLlAh6tbCiAa5EJXg4,depth=10,body=Historical 90 (batch=0),prevs=['$COQuVmW8z0geXFZ2fPdo_kW0q1NK1LLZSI7fZNIwvgM']",
"event_id=$COQuVmW8z0geXFZ2fPdo_kW0q1NK1LLZSI7fZNIwvgM,depth=10,body=Historical 89 (batch=0),prevs=['$04k2wOdm-L41JDQ73KPpDe1njG3L9FYjOsNVamFsDQ0']",
"event_id=$04k2wOdm-L41JDQ73KPpDe1njG3L9FYjOsNVamFsDQ0,depth=10,body=Historical 88 (batch=0),prevs=['$70BsBGyeg4Pf3VhGhXjtk4N5XKNNSit4vjnrirwTmic']",
"event_id=$70BsBGyeg4Pf3VhGhXjtk4N5XKNNSit4vjnrirwTmic,depth=10,body=Historical 87 (batch=0),prevs=['$Y_6AET6hMZY42rPki4r0GxMfs8E_TCJyepNL1Vfwnh4']",
"event_id=$Y_6AET6hMZY42rPki4r0GxMfs8E_TCJyepNL1Vfwnh4,depth=10,body=Historical 86 (batch=0),prevs=['$jSk0bO6PFUcqxHsjTvFPyJZoXL4N9nEGex7I-yyvBj8']",
"event_id=$jSk0bO6PFUcqxHsjTvFPyJZoXL4N9nEGex7I-yyvBj8,depth=10,body=Historical 85 (batch=0),prevs=['$wPV_BB23RIolkHz0yGTvwt1-TJbqpGPqZc33vR5DUMw']",
"event_id=$wPV_BB23RIolkHz0yGTvwt1-TJbqpGPqZc33vR5DUMw,depth=10,body=Historical 84 (batch=0),prevs=['$X2FJ_Jmoy5sx9u0UWTN1bkds6diO0uDxxRGco4r9Msw']",
"event_id=$X2FJ_Jmoy5sx9u0UWTN1bkds6diO0uDxxRGco4r9Msw,depth=10,body=Historical 83 (batch=0),prevs=['$jrmzKa3aDmpZg5HgDHQqQ_lgl9L4rDWiWk7xd1igfAE']",
"event_id=$jrmzKa3aDmpZg5HgDHQqQ_lgl9L4rDWiWk7xd1igfAE,depth=10,body=Historical 82 (batch=0),prevs=['$8Ov9djlzX3ixwCWaULf6-SJNBuV8eeslfBVvt5b1Uds']",
"event_id=$8Ov9djlzX3ixwCWaULf6-SJNBuV8eeslfBVvt5b1Uds,depth=10,body=Historical 81 (batch=0),prevs=['$Xflk7Gara-ISOAblxE3Vh5qbRDxJal8NLWSD6BC3wfY']",
"event_id=$Xflk7Gara-ISOAblxE3Vh5qbRDxJal8NLWSD6BC3wfY,depth=10,body=Historical 80 (batch=0),prevs=['$cd4vq5xB0kqHa7HziMmI1U5njSwDr6NOz0qkvCrUeiA']",
"event_id=$cd4vq5xB0kqHa7HziMmI1U5njSwDr6NOz0qkvCrUeiA,depth=10,body=Historical 79 (batch=0),prevs=['$xblwBKeHnnXlcK9nusq0mWw712br9ySr3elpt5vqYG8']",
"event_id=$xblwBKeHnnXlcK9nusq0mWw712br9ySr3elpt5vqYG8,depth=10,body=Historical 78 (batch=0),prevs=['$cAnav2OUp8QsmQRbPc-PcX6A4rRW9UUsGFEGb1lgSyI']",
"event_id=$cAnav2OUp8QsmQRbPc-PcX6A4rRW9UUsGFEGb1lgSyI,depth=10,body=Historical 77 (batch=0),prevs=['$3janYqE-QmrenClP9K2jxr-TM2AvG5H-kcgkM6F9UgA']",
"event_id=$3janYqE-QmrenClP9K2jxr-TM2AvG5H-kcgkM6F9UgA,depth=10,body=Historical 76 (batch=0),prevs=['$UqMZVF90ZR0kzwt5q2noHEGCS8UFp_IAN4EbiMYVl4o']",
"event_id=$UqMZVF90ZR0kzwt5q2noHEGCS8UFp_IAN4EbiMYVl4o,depth=10,body=Historical 75 (batch=0),prevs=['$D6IL83wLN4nkNwwikin8olaPEZCpzUh7-1PAOdD7HSY']",
"event_id=$D6IL83wLN4nkNwwikin8olaPEZCpzUh7-1PAOdD7HSY,depth=10,body=Historical 74 (batch=0),prevs=['$MWVNPcLeQ_INUKlCdoOaySGlGeP5WwDt0myistqnTVk']",
"event_id=$MWVNPcLeQ_INUKlCdoOaySGlGeP5WwDt0myistqnTVk,depth=10,body=Historical 73 (batch=0),prevs=['$Co1eNgILBaxBR_Gt7Vz_tIs0LutTc9CPvtYRyElNMj8']",
"event_id=$Co1eNgILBaxBR_Gt7Vz_tIs0LutTc9CPvtYRyElNMj8,depth=10,body=Historical 72 (batch=0),prevs=['$ahJyDyEY1Oo8OAkrMZAeYDeTWNzx0B36GsQxcZWchFE']",
"event_id=$ahJyDyEY1Oo8OAkrMZAeYDeTWNzx0B36GsQxcZWchFE,depth=10,body=Historical 71 (batch=0),prevs=['$JfGy5KmG-3KFMJFfcHsci6YvhvLq9pWok6GgcZlaXX8']",
"event_id=$JfGy5KmG-3KFMJFfcHsci6YvhvLq9pWok6GgcZlaXX8,depth=10,body=Historical 70 (batch=0),prevs=['$VEfiWOEPPyCpN9z305k4IJySpEj5tl4InJb5mhFs7EA']",
"event_id=$VEfiWOEPPyCpN9z305k4IJySpEj5tl4InJb5mhFs7EA,depth=10,body=Historical 69 (batch=0),prevs=['$FZswJ09DFvJSzGDFiA3JIdLuzFnG_TfObeEOES1fVTA']",
"event_id=$FZswJ09DFvJSzGDFiA3JIdLuzFnG_TfObeEOES1fVTA,depth=10,body=Historical 68 (batch=0),prevs=['$fnzsLJ8duVIJ_S74QIozUaEwOp4G7j7fN5yRV-bzDHQ']",
"event_id=$fnzsLJ8duVIJ_S74QIozUaEwOp4G7j7fN5yRV-bzDHQ,depth=10,body=Historical 67 (batch=0),prevs=['$vBWTNsLkJHP9bK0L1Wx3HdND6Rh8HhPmxBtXP7klwvE']",
"event_id=$vBWTNsLkJHP9bK0L1Wx3HdND6Rh8HhPmxBtXP7klwvE,depth=10,body=Historical 66 (batch=0),prevs=['$y5PGi9vY9UcTEwTzeE18JB6-bjhf1GVeSEOph4ko-SE']",
"event_id=$y5PGi9vY9UcTEwTzeE18JB6-bjhf1GVeSEOph4ko-SE,depth=10,body=Historical 65 (batch=0),prevs=['$7pM8GWYvhzxZ3zGkc76RLtsw7w02IT-sAiV8JkKeQCU']",
"event_id=$7pM8GWYvhzxZ3zGkc76RLtsw7w02IT-sAiV8JkKeQCU,depth=10,body=Historical 64 (batch=0),prevs=['$wKaeK8hHhwLb1zHZaRJFE1C-n2kOtWnf076sNeWqaMc']",
"event_id=$wKaeK8hHhwLb1zHZaRJFE1C-n2kOtWnf076sNeWqaMc,depth=10,body=Historical 63 (batch=0),prevs=['$8OHC-bni0whbdGfis5cfWL3--JACd0fx-pUBs5LuBXM']",
"event_id=$8OHC-bni0whbdGfis5cfWL3--JACd0fx-pUBs5LuBXM,depth=10,body=Historical 62 (batch=0),prevs=['$nZ1WO04o85g1lkLQYlb72bZfx195YwuA-mQ3SsLEsuI']",
"event_id=$nZ1WO04o85g1lkLQYlb72bZfx195YwuA-mQ3SsLEsuI,depth=10,body=Historical 61 (batch=0),prevs=['$rdA6ksM5YpvBrm9vHREi-d7x5AJCPZzrAAqxNN5I2ms']",
"event_id=$rdA6ksM5YpvBrm9vHREi-d7x5AJCPZzrAAqxNN5I2ms,depth=10,body=Historical 60 (batch=0),prevs=['$v-3prgvdtmX8ySVzXby4Lw6zrncPxKdiLrDnM94y3K4']",
"event_id=$v-3prgvdtmX8ySVzXby4Lw6zrncPxKdiLrDnM94y3K4,depth=10,body=Historical 59 (batch=0),prevs=['$ahhYJXd-_gSSZ_mROiEvBI37nYgYCi4WsrvG8sfEQ6g']",
"event_id=$ahhYJXd-_gSSZ_mROiEvBI37nYgYCi4WsrvG8sfEQ6g,depth=10,body=Historical 58 (batch=0),prevs=['$JHFT5ugpxzbU6MmFJZ3wXN0hK33EX3-9As0MemxjsX0']",
"event_id=$JHFT5ugpxzbU6MmFJZ3wXN0hK33EX3-9As0MemxjsX0,depth=10,body=Historical 57 (batch=0),prevs=['$JYLcmedG2JdmtBQnnXbIEI34QyeaJrMGLAJt_Mi_vuY']",
"event_id=$JYLcmedG2JdmtBQnnXbIEI34QyeaJrMGLAJt_Mi_vuY,depth=10,body=Historical 56 (batch=0),prevs=['$nFeaEcPilAYFoXcid_5mz5jDEqIyvTZLYX4erRf2jlM']",
"event_id=$nFeaEcPilAYFoXcid_5mz5jDEqIyvTZLYX4erRf2jlM,depth=10,body=Historical 55 (batch=0),prevs=['$ig5cEWTkkNG-ox84UUjG35G6WEHu-qpqAwYKQSOwHxQ']",
"event_id=$ig5cEWTkkNG-ox84UUjG35G6WEHu-qpqAwYKQSOwHxQ,depth=10,body=Historical 54 (batch=0),prevs=['$2MDm0b5ztPCyLlAThSBT38Ie3F0ZG3sAE0r3to3yhtc']",
"event_id=$2MDm0b5ztPCyLlAThSBT38Ie3F0ZG3sAE0r3to3yhtc,depth=10,body=Historical 53 (batch=0),prevs=['$gZ_e1ws9bh_uKzY4UskhVCO4IFikMi-waYooJbSJAOI']",
"event_id=$gZ_e1ws9bh_uKzY4UskhVCO4IFikMi-waYooJbSJAOI,depth=10,body=Historical 52 (batch=0),prevs=['$pOBdCutp83GhxQkP9_tCyYeaN7YvEo0fuf5MiRsu_ew']",
"event_id=$pOBdCutp83GhxQkP9_tCyYeaN7YvEo0fuf5MiRsu_ew,depth=10,body=Historical 51 (batch=0),prevs=['$HCC02P42Zfcn-vYaZrhQu1IdHOMVQrsc6XsfIGPrWNE']",
"event_id=$HCC02P42Zfcn-vYaZrhQu1IdHOMVQrsc6XsfIGPrWNE,depth=10,body=Historical 50 (batch=0),prevs=['$R4sIu0EhjycD9c7qHb1Sfdw34PqzIFOiTzCsPs_Z-Fk']",
"event_id=$R4sIu0EhjycD9c7qHb1Sfdw34PqzIFOiTzCsPs_Z-Fk,depth=10,body=Historical 49 (batch=0),prevs=['$Gdo7IK1ZUK3pHvHvOETByF8J_PLqVP6BDk1qI_3AZ90']",
"event_id=$Gdo7IK1ZUK3pHvHvOETByF8J_PLqVP6BDk1qI_3AZ90,depth=10,body=Historical 48 (batch=0),prevs=['$VJ5qpulzoG4vkhkWnbwpgtBMHAMQSmhUB76lrI_2KXc']",
"event_id=$VJ5qpulzoG4vkhkWnbwpgtBMHAMQSmhUB76lrI_2KXc,depth=10,body=Historical 47 (batch=0),prevs=['$-h0DqfdRxhEi6RMiaoKEHqzRDqA5Qy8ZskPGAp5rUI0']",
"event_id=$-h0DqfdRxhEi6RMiaoKEHqzRDqA5Qy8ZskPGAp5rUI0,depth=10,body=Historical 46 (batch=0),prevs=['$_L-oB9rLJsXOnJkjnUQNDUL1C3jw2-YNbTBDiKG958Q']",
"event_id=$_L-oB9rLJsXOnJkjnUQNDUL1C3jw2-YNbTBDiKG958Q,depth=10,body=Historical 45 (batch=0),prevs=['$iQeszxPn42bPGUQknk5TCYIWxVqnGDG-h4Bk1JFH_-4']",
"event_id=$iQeszxPn42bPGUQknk5TCYIWxVqnGDG-h4Bk1JFH_-4,depth=10,body=Historical 44 (batch=0),prevs=['$raFQyAel7PT5FUymMwF3SIOXxuMpX7aJyRFDfsyFTpo']",
"event_id=$raFQyAel7PT5FUymMwF3SIOXxuMpX7aJyRFDfsyFTpo,depth=10,body=Historical 43 (batch=0),prevs=['$bYfZTSvNiI6nOE7NvnwsaJBlDt8eGifjNWiBoOd-4JQ']",
"event_id=$bYfZTSvNiI6nOE7NvnwsaJBlDt8eGifjNWiBoOd-4JQ,depth=10,body=Historical 42 (batch=0),prevs=['$iflmqGrv2ERr58y8QWMW8cAYjIwctoOqc_S8Zpxf2LE']",
"event_id=$iflmqGrv2ERr58y8QWMW8cAYjIwctoOqc_S8Zpxf2LE,depth=10,body=Historical 41 (batch=0),prevs=['$84bhYzG__UwK-Rc1T4UGKzQUcLGOTMB9cWikG6Np_hM']",
"event_id=$84bhYzG__UwK-Rc1T4UGKzQUcLGOTMB9cWikG6Np_hM,depth=10,body=Historical 40 (batch=0),prevs=['$xqS8HMfkjk_9j2aHTisNv8oeocOq38nxxU8MrepqgMU']",
"event_id=$xqS8HMfkjk_9j2aHTisNv8oeocOq38nxxU8MrepqgMU,depth=10,body=Historical 39 (batch=0),prevs=['$EChQxibb9iOk8GqNnZRL3dQ0EfcXJpbl942hiEf1uxo']",
"event_id=$EChQxibb9iOk8GqNnZRL3dQ0EfcXJpbl942hiEf1uxo,depth=10,body=Historical 38 (batch=0),prevs=['$bzBMsp8mhPIhbhv8RBjSP8zwvJ6ix2HYoEeourkeRJE']",
"event_id=$bzBMsp8mhPIhbhv8RBjSP8zwvJ6ix2HYoEeourkeRJE,depth=10,body=Historical 37 (batch=0),prevs=['$lDNy6ds20jjt077dA_f9nFJrAu6reMkA-a9cZaW6cpI']",
"event_id=$lDNy6ds20jjt077dA_f9nFJrAu6reMkA-a9cZaW6cpI,depth=10,body=Historical 36 (batch=0),prevs=['$yMQY-EQTPizmc_vOIsWIcY-Acp7dBNJew27NlfDHduo']",
"event_id=$yMQY-EQTPizmc_vOIsWIcY-Acp7dBNJew27NlfDHduo,depth=10,body=Historical 35 (batch=0),prevs=['$Y9NaQWbjDCwqc8TxXbCduEp2FWGNDwUA_ElYWF148T8']",
"event_id=$Y9NaQWbjDCwqc8TxXbCduEp2FWGNDwUA_ElYWF148T8,depth=10,body=Historical 34 (batch=0),prevs=['$_if1SSgNjDIT1YefAeoQ0z2aH6pe2jynJUDraBZOCjc']",
"event_id=$_if1SSgNjDIT1YefAeoQ0z2aH6pe2jynJUDraBZOCjc,depth=10,body=Historical 33 (batch=0),prevs=['$_JgwcI13PE8e2MuebXSLBIyd_MaIorlEZtF_z_uIVHo']",
"event_id=$_JgwcI13PE8e2MuebXSLBIyd_MaIorlEZtF_z_uIVHo,depth=10,body=Historical 32 (batch=0),prevs=['$CRZ4J3otfULJ7Iw1MaAQvIeakECsoZQs1Ehh-xeaC_k']",
"event_id=$CRZ4J3otfULJ7Iw1MaAQvIeakECsoZQs1Ehh-xeaC_k,depth=10,body=Historical 31 (batch=0),prevs=['$qaIW_OYBoW7I03J5DnXMEJkRMKtnOOO5ttQjniYzHnI']",
"event_id=$qaIW_OYBoW7I03J5DnXMEJkRMKtnOOO5ttQjniYzHnI,depth=10,body=Historical 30 (batch=0),prevs=['$9VNFmDvQZiJo50kQf1qPTAQyCPsdHjx23qC0DT34wY0']",
"event_id=$9VNFmDvQZiJo50kQf1qPTAQyCPsdHjx23qC0DT34wY0,depth=10,body=Historical 29 (batch=0),prevs=['$gFbNkb60KtE_SzR9oi16tpkKE9k4hijC2A6dt66Al4k']",
"event_id=$gFbNkb60KtE_SzR9oi16tpkKE9k4hijC2A6dt66Al4k,depth=10,body=Historical 28 (batch=0),prevs=['$Mq-dMSTxKEwHS3gPvYwU-Obqs3-Tp3SWjRPUq2VDvJg']",
"event_id=$Mq-dMSTxKEwHS3gPvYwU-Obqs3-Tp3SWjRPUq2VDvJg,depth=10,body=Historical 27 (batch=0),prevs=['$5EC7XJFkyMLzhujTLI_m9UXNEnn-4NKZj-DCouBgyt8']",
"event_id=$5EC7XJFkyMLzhujTLI_m9UXNEnn-4NKZj-DCouBgyt8,depth=10,body=Historical 26 (batch=0),prevs=['$UxlPuejLS1jHkUNCMRe2vNmc2tcuut-G2N8q6RFTfVQ']",
"event_id=$UxlPuejLS1jHkUNCMRe2vNmc2tcuut-G2N8q6RFTfVQ,depth=10,body=Historical 25 (batch=0),prevs=['$BNqTjoMam0rgznru1lqk1U8cCqlJRA4GwORVLBeFYTU']",
"event_id=$BNqTjoMam0rgznru1lqk1U8cCqlJRA4GwORVLBeFYTU,depth=10,body=Historical 24 (batch=0),prevs=['$7SdwqRy6BHBnNb_sQtj2Rph9era4F68ZM6mGPzjJthA']",
"event_id=$7SdwqRy6BHBnNb_sQtj2Rph9era4F68ZM6mGPzjJthA,depth=10,body=Historical 23 (batch=0),prevs=['$HiveBkhuxr5NIgx9wGhfrmttnGOi0VpeesmqtjpkqE4']",
"event_id=$HiveBkhuxr5NIgx9wGhfrmttnGOi0VpeesmqtjpkqE4,depth=10,body=Historical 22 (batch=0),prevs=['$m7iJp9s_Stodzk1I1Lf8egDLbIdyvgJPjAxomFguHb4']",
"event_id=$m7iJp9s_Stodzk1I1Lf8egDLbIdyvgJPjAxomFguHb4,depth=10,body=Historical 21 (batch=0),prevs=['$KRSKtmQJHl80Hn7UR3emVczq4-QgKycVop3lkSeppIs']",
"event_id=$KRSKtmQJHl80Hn7UR3emVczq4-QgKycVop3lkSeppIs,depth=10,body=Historical 20 (batch=0),prevs=['$ZCZKQrCeoKEC6oKqwjhK_8EQqwq75b7fEop-GgYCTiU']",
"event_id=$ZCZKQrCeoKEC6oKqwjhK_8EQqwq75b7fEop-GgYCTiU,depth=10,body=Historical 19 (batch=0),prevs=['$9pZEcOtzeGWbnmRS_zAQAhdCIE8DZ6_cJAR0tm2AG1k']",
"event_id=$9pZEcOtzeGWbnmRS_zAQAhdCIE8DZ6_cJAR0tm2AG1k,depth=10,body=Historical 18 (batch=0),prevs=['$FFXzuSEKR53_PpJ6EBGp8FEBi5Aig2MIq-F1opufK10']",
"event_id=$FFXzuSEKR53_PpJ6EBGp8FEBi5Aig2MIq-F1opufK10,depth=10,body=Historical 17 (batch=0),prevs=['$hr0MEvZerIeshwxLzAGbqMXQGOXU_u9H1wUPtzqa6gY']",
"event_id=$hr0MEvZerIeshwxLzAGbqMXQGOXU_u9H1wUPtzqa6gY,depth=10,body=Historical 16 (batch=0),prevs=['$hjP2ryNx-yqznW3EKrBZE1DaGSbvK8lB_3cWUDDGTVk']",
"event_id=$hjP2ryNx-yqznW3EKrBZE1DaGSbvK8lB_3cWUDDGTVk,depth=10,body=Historical 15 (batch=0),prevs=['$E24xBJItDTqteFc11s2kk2JuvpQjZ2fd-vEWJ7QS784']",
"event_id=$E24xBJItDTqteFc11s2kk2JuvpQjZ2fd-vEWJ7QS784,depth=10,body=Historical 14 (batch=0),prevs=['$eOuhBaOKitgobbzyU5XVieMLzgoCITj9eG-ewSMDB9I']",
"event_id=$eOuhBaOKitgobbzyU5XVieMLzgoCITj9eG-ewSMDB9I,depth=10,body=Historical 13 (batch=0),prevs=['$4F4Xhu7QKpLM-n_aFmCLrKRP6zw7lrDLAYFTPKn8jYo']",
"event_id=$4F4Xhu7QKpLM-n_aFmCLrKRP6zw7lrDLAYFTPKn8jYo,depth=10,body=Historical 12 (batch=0),prevs=['$e0wqSykOpA8Y0yipT9643SVVQ3DMOnW11yxvqAj9JrE']",
"event_id=$e0wqSykOpA8Y0yipT9643SVVQ3DMOnW11yxvqAj9JrE,depth=10,body=Historical 11 (batch=0),prevs=['$u5gxt1eo59odS1XqVS-kV2GcaitrzorppcqVj3scevI']",
"event_id=$u5gxt1eo59odS1XqVS-kV2GcaitrzorppcqVj3scevI,depth=10,body=Historical 10 (batch=0),prevs=['$Z1E79_z_FcAnw4G9NOvx3WhyL2ACyYPgy6zLhomKVks']",
"event_id=$Z1E79_z_FcAnw4G9NOvx3WhyL2ACyYPgy6zLhomKVks,depth=10,body=Historical 9 (batch=0),prevs=['$USyjgdL7fwX4BvmblVs2cicGO3WDRB-ox56298yZmAA']",
"event_id=$USyjgdL7fwX4BvmblVs2cicGO3WDRB-ox56298yZmAA,depth=10,body=Historical 8 (batch=0),prevs=['$tggu2uQEL2BWVJiwqsqwCJUca3SEFeylCAbPw5DrIdo']",
"event_id=$tggu2uQEL2BWVJiwqsqwCJUca3SEFeylCAbPw5DrIdo,depth=10,body=Historical 7 (batch=0),prevs=['$M0iINx5TifxVTJ6pz-lio7xIeSla1RIV_N9WIK5sf4c']",
"event_id=$M0iINx5TifxVTJ6pz-lio7xIeSla1RIV_N9WIK5sf4c,depth=10,body=Historical 6 (batch=0),prevs=['$hEs6MN2xyjXqHRcWV53_23NeNm--al9b_5BnMYYDPMY']",
"event_id=$hEs6MN2xyjXqHRcWV53_23NeNm--al9b_5BnMYYDPMY,depth=10,body=Historical 5 (batch=0),prevs=['$L0BJu5ZOx2l8AMivXMBCqrvymVu_nCQM4ZO23uv5tBU']",
"event_id=$L0BJu5ZOx2l8AMivXMBCqrvymVu_nCQM4ZO23uv5tBU,depth=10,body=Historical 4 (batch=0),prevs=['$V5BZU5LpCbW6XvPLGls0QGRbo98uuf1KpMZ0fg8k_-o']"]
new implementation backfill events(100)=[
"event_id=$V5BZU5LpCbW6XvPLGls0QGRbo98uuf1KpMZ0fg8k_-o,depth=10,body=Historical 3 (batch=0),prevs=['$lF2XlCU-QmhC0YF8Wn8Q-EfQXqDxF_usgPIZ28rNhII']",
"event_id=$lF2XlCU-QmhC0YF8Wn8Q-EfQXqDxF_usgPIZ28rNhII,depth=10,body=Historical 2 (batch=0),prevs=['$Ghnwsm4CqaWopAMGjKm8piFuTEqSaWgl1X7esubZOco']",
"event_id=$Ghnwsm4CqaWopAMGjKm8piFuTEqSaWgl1X7esubZOco,depth=10,body=Historical 1 (batch=0),prevs=['$WRV7zPTr4KknEcYUvPlfxMdxcmlrQSsXAfTTlSBpjko']",
"event_id=$WRV7zPTr4KknEcYUvPlfxMdxcmlrQSsXAfTTlSBpjko,depth=10,body=Historical 0 (batch=0),prevs=['$30VmrbC0AauqzWQ9F2g_KTPUdJhH_r79olOmfZYe0Pg']",
"event_id=$30VmrbC0AauqzWQ9F2g_KTPUdJhH_r79olOmfZYe0Pg,depth=10,body=org.matrix.msc2716.insertion,prevs=['$an2lLzRXApWnCuRNrb1jTfMY9lWbz909AxyIRWy5-C0']",
"event_id=$CmUx1RcXqn9QwVSKFKGmwVXwEFE9sHpnac5xvCgm-Co,depth=10,body=org.matrix.msc2716.batch,prevs=['$Kt2_lR2GlI6YoDY7q1ttaoIUv_s8WsjKgce6PT8utIA']",
"event_id=$Kt2_lR2GlI6YoDY7q1ttaoIUv_s8WsjKgce6PT8utIA,depth=10,body=Historical 99 (batch=1),prevs=['$eaZav6ZipscONXQMtzaWQrTmiw9yo6_ifeaiI2VTJJM']",
"event_id=$eaZav6ZipscONXQMtzaWQrTmiw9yo6_ifeaiI2VTJJM,depth=10,body=Historical 98 (batch=1),prevs=['$sSIhVeKMkHlwvQmCdUxouZyc0A7oBK_IcTYYPhQHniY']",
"event_id=$sSIhVeKMkHlwvQmCdUxouZyc0A7oBK_IcTYYPhQHniY,depth=10,body=Historical 97 (batch=1),prevs=['$tQ6z1P58SRR3qqS6UnjWn85zP6CoU882ehdCkNcwhA8']",
"event_id=$tQ6z1P58SRR3qqS6UnjWn85zP6CoU882ehdCkNcwhA8,depth=10,body=Historical 96 (batch=1),prevs=['$mh2o2cBnVjU5uQr0UAMPAWPpGsRzIKKpzc54Q2Z9JGY']",
"event_id=$mh2o2cBnVjU5uQr0UAMPAWPpGsRzIKKpzc54Q2Z9JGY,depth=10,body=Historical 95 (batch=1),prevs=['$O_SPFvep-jjnHsW2484GzRYIDZkJhZYVgmCstDR3Qn0']",
"event_id=$O_SPFvep-jjnHsW2484GzRYIDZkJhZYVgmCstDR3Qn0,depth=10,body=Historical 94 (batch=1),prevs=['$MkZU6zPnF5L4Mb9Y0AkOlWSG6S5yKhyVsFPm_WPc7EU']",
"event_id=$MkZU6zPnF5L4Mb9Y0AkOlWSG6S5yKhyVsFPm_WPc7EU,depth=10,body=Historical 93 (batch=1),prevs=['$lts-3h-4-93qb12QQ8PwkvSu4bSJVKulvj_N2UPRhvs']",
"event_id=$lts-3h-4-93qb12QQ8PwkvSu4bSJVKulvj_N2UPRhvs,depth=10,body=Historical 92 (batch=1),prevs=['$abLL8g1D70BE9EqtgSGoVjtbVK6QKG0KZhgBeJmEAuw']",
"event_id=$abLL8g1D70BE9EqtgSGoVjtbVK6QKG0KZhgBeJmEAuw,depth=10,body=Historical 91 (batch=1),prevs=['$H2-ZSHXeJII1Jc3XvEjFfmjGUZgpsmlay7YuKKlF7JQ']",
"event_id=$H2-ZSHXeJII1Jc3XvEjFfmjGUZgpsmlay7YuKKlF7JQ,depth=10,body=Historical 90 (batch=1),prevs=['$VsrkCzgyKUyPT4XpS0pa-K-CwRJ7MeNu9ictxOHPZo4']",
"event_id=$VsrkCzgyKUyPT4XpS0pa-K-CwRJ7MeNu9ictxOHPZo4,depth=10,body=Historical 89 (batch=1),prevs=['$NSVKzqK5ucXWwWq7j4yfADj5m-8GqWFCWeqo2hvUDWg']",
"event_id=$NSVKzqK5ucXWwWq7j4yfADj5m-8GqWFCWeqo2hvUDWg,depth=10,body=Historical 88 (batch=1),prevs=['$y5lPUOYBw0g12eIgDUdTn5QnmXD2QeFks61Ivpha1XA']",
"event_id=$y5lPUOYBw0g12eIgDUdTn5QnmXD2QeFks61Ivpha1XA,depth=10,body=Historical 87 (batch=1),prevs=['$BdehWtfVHIxjlD3-pWh-6kcb1w2oPhAhgCWxNUkKAD8']",
"event_id=$BdehWtfVHIxjlD3-pWh-6kcb1w2oPhAhgCWxNUkKAD8,depth=10,body=Historical 86 (batch=1),prevs=['$B0afYanjEywl1q1fYru7nL2RmjjZpF0gjTVQ7n9fY6k']",
"event_id=$B0afYanjEywl1q1fYru7nL2RmjjZpF0gjTVQ7n9fY6k,depth=10,body=Historical 85 (batch=1),prevs=['$F2cOk9oSDKNSlrMoJioWtLi8AdhMkS-QpVwZw2qhWgM']",
"event_id=$F2cOk9oSDKNSlrMoJioWtLi8AdhMkS-QpVwZw2qhWgM,depth=10,body=Historical 84 (batch=1),prevs=['$QGCvZWFsgW4KTskjaSqxjTenOa3TbbpBDWVyXESXDGI']",
"event_id=$QGCvZWFsgW4KTskjaSqxjTenOa3TbbpBDWVyXESXDGI,depth=10,body=Historical 83 (batch=1),prevs=['$5evMhA_hLx02z7ydMm_cRfSUsC9OX0MJLayMydLrzN0']",
"event_id=$5evMhA_hLx02z7ydMm_cRfSUsC9OX0MJLayMydLrzN0,depth=10,body=Historical 82 (batch=1),prevs=['$4jmsKkx-6NRVMCflN_s6sOfC053Zw1wOfCCM0bWlIX8']",
"event_id=$4jmsKkx-6NRVMCflN_s6sOfC053Zw1wOfCCM0bWlIX8,depth=10,body=Historical 81 (batch=1),prevs=['$sTtp0fKA9BG4GDkJ8CUBQVNqpDDcf_a-PkGhJkGqzrw']",
"event_id=$sTtp0fKA9BG4GDkJ8CUBQVNqpDDcf_a-PkGhJkGqzrw,depth=10,body=Historical 80 (batch=1),prevs=['$96go7TqZzPq75eOOLiDY0FkylHrmAGly0MTwX4_McMs']",
"event_id=$96go7TqZzPq75eOOLiDY0FkylHrmAGly0MTwX4_McMs,depth=10,body=Historical 79 (batch=1),prevs=['$kUiJWkPHn1nPrUDzZJvWhTz1T8UBVELMlEdJGOEB_Qo']",
"event_id=$kUiJWkPHn1nPrUDzZJvWhTz1T8UBVELMlEdJGOEB_Qo,depth=10,body=Historical 78 (batch=1),prevs=['$5GCJZEmchNvy0ikP7K7ZlvFb9FS6aVKRedx-08ZAF3s']",
"event_id=$5GCJZEmchNvy0ikP7K7ZlvFb9FS6aVKRedx-08ZAF3s,depth=10,body=Historical 77 (batch=1),prevs=['$A3r2LkTKaHxBQh1Ailt4dCtaESyo53Ss1u1s3QiE_k0']",
"event_id=$A3r2LkTKaHxBQh1Ailt4dCtaESyo53Ss1u1s3QiE_k0,depth=10,body=Historical 76 (batch=1),prevs=['$R7RRyXo6Msc3-368vZpiG84DfqOAiKLiSbV0ECGv6Oo']",
"event_id=$R7RRyXo6Msc3-368vZpiG84DfqOAiKLiSbV0ECGv6Oo,depth=10,body=Historical 75 (batch=1),prevs=['$jmkYlZN6-oiQOi-bJfs0whVS7kKeJJUN6YJQfubbaEU']",
"event_id=$jmkYlZN6-oiQOi-bJfs0whVS7kKeJJUN6YJQfubbaEU,depth=10,body=Historical 74 (batch=1),prevs=['$IuGVv6TZj5ZoOP4HHqZsKPWQ9HDTHS4QV7oFHk4kl7o']",
"event_id=$IuGVv6TZj5ZoOP4HHqZsKPWQ9HDTHS4QV7oFHk4kl7o,depth=10,body=Historical 73 (batch=1),prevs=['$sNds_pVGUFf41AJwHmA1Sy7MUX1N9MtHGfw9ye6EItM']",
"event_id=$sNds_pVGUFf41AJwHmA1Sy7MUX1N9MtHGfw9ye6EItM,depth=10,body=Historical 72 (batch=1),prevs=['$u0R7zUNs4BpneteeM7PWgGZE4XzQJuAwUtFSQGwTNI0']",
"event_id=$u0R7zUNs4BpneteeM7PWgGZE4XzQJuAwUtFSQGwTNI0,depth=10,body=Historical 71 (batch=1),prevs=['$VthGtqcIDd04US7pMNTr0gSmR7PIOPLmDOljx1qNleQ']",
"event_id=$VthGtqcIDd04US7pMNTr0gSmR7PIOPLmDOljx1qNleQ,depth=10,body=Historical 70 (batch=1),prevs=['$qYlzglfNCN1Br-4UkajF4c-SKYI0By5gExUxczeDsg4']",
"event_id=$qYlzglfNCN1Br-4UkajF4c-SKYI0By5gExUxczeDsg4,depth=10,body=Historical 69 (batch=1),prevs=['$BsxtZqcTIs1aqFRsXtapKXYF6w2GiUEswpl6kH6S_4o']",
"event_id=$BsxtZqcTIs1aqFRsXtapKXYF6w2GiUEswpl6kH6S_4o,depth=10,body=Historical 68 (batch=1),prevs=['$PmOzgtCDJCyGowxB8gWcYbfA2KUX0MCJ3xTE48FhAyY']",
"event_id=$PmOzgtCDJCyGowxB8gWcYbfA2KUX0MCJ3xTE48FhAyY,depth=10,body=Historical 67 (batch=1),prevs=['$vZq13XMjZRJdFefxBg0L1U9shZq1TbArtR43YkQG7i8']",
"event_id=$vZq13XMjZRJdFefxBg0L1U9shZq1TbArtR43YkQG7i8,depth=10,body=Historical 66 (batch=1),prevs=['$526Rm38ribM0XL3HltTbjVCUa3cDUdBh0V-9AMPtsYY']",
"event_id=$526Rm38ribM0XL3HltTbjVCUa3cDUdBh0V-9AMPtsYY,depth=10,body=Historical 65 (batch=1),prevs=['$-sPB5z3uyN5tr4KezPKt6xu_yoaqgSDKhkzTJ0Um7yI']",
"event_id=$-sPB5z3uyN5tr4KezPKt6xu_yoaqgSDKhkzTJ0Um7yI,depth=10,body=Historical 64 (batch=1),prevs=['$y5mX5SlScEAyPbUx1UA2-_ml0abbh0nGFYgJzF0XzZ0']",
"event_id=$y5mX5SlScEAyPbUx1UA2-_ml0abbh0nGFYgJzF0XzZ0,depth=10,body=Historical 63 (batch=1),prevs=['$erT1ogi6tp9tF33_N3ZBLpIMBXOunszhADMYjs8U5AE']",
"event_id=$erT1ogi6tp9tF33_N3ZBLpIMBXOunszhADMYjs8U5AE,depth=10,body=Historical 62 (batch=1),prevs=['$d9qTo4Ray7GJWJPm-CHkfZmZC0WmD8-K6Z1Riyot3fw']",
"event_id=$d9qTo4Ray7GJWJPm-CHkfZmZC0WmD8-K6Z1Riyot3fw,depth=10,body=Historical 61 (batch=1),prevs=['$TVgdscs2fWtvx0ak6V0ljabU_4cc6UH18Y1r3OvDLYc']",
"event_id=$TVgdscs2fWtvx0ak6V0ljabU_4cc6UH18Y1r3OvDLYc,depth=10,body=Historical 60 (batch=1),prevs=['$eMi_3TfsgYw2Fs99AJpr_9KAapZq3uwtv2fUDQ2weTc']",
"event_id=$eMi_3TfsgYw2Fs99AJpr_9KAapZq3uwtv2fUDQ2weTc,depth=10,body=Historical 59 (batch=1),prevs=['$UBL_4l45DMvVTE12gyRaSDMw_fi_biDx1dL_gWz_v-g']",
"event_id=$UBL_4l45DMvVTE12gyRaSDMw_fi_biDx1dL_gWz_v-g,depth=10,body=Historical 58 (batch=1),prevs=['$A6-UMuau--ffdnOA0NqWQK9uO0NBCB_rwVCvu_hSAOw']",
"event_id=$A6-UMuau--ffdnOA0NqWQK9uO0NBCB_rwVCvu_hSAOw,depth=10,body=Historical 57 (batch=1),prevs=['$Eia3O1ptxGtKhINTEVX_FxBU3TjL0MBp1XdeFCStcCg']",
"event_id=$Eia3O1ptxGtKhINTEVX_FxBU3TjL0MBp1XdeFCStcCg,depth=10,body=Historical 56 (batch=1),prevs=['$Pb5OyRAHNrXDyPt8F1dTWVGi-Zvqkf-HqzCwcu0salY']",
"event_id=$Pb5OyRAHNrXDyPt8F1dTWVGi-Zvqkf-HqzCwcu0salY,depth=10,body=Historical 55 (batch=1),prevs=['$c1KPN_U0VF8G3jGnD6UpQob_h9X_KQfXv4lciJUb4PQ']",
"event_id=$c1KPN_U0VF8G3jGnD6UpQob_h9X_KQfXv4lciJUb4PQ,depth=10,body=Historical 54 (batch=1),prevs=['$fwWir53iSGaGEMRt-mQe6hYmkwIQGjDojFO08zlzgX4']",
"event_id=$fwWir53iSGaGEMRt-mQe6hYmkwIQGjDojFO08zlzgX4,depth=10,body=Historical 53 (batch=1),prevs=['$TmacWSD6J8y8vERZfA-IdRpDeMS_4A1HFNUBg_W5MaA']",
"event_id=$TmacWSD6J8y8vERZfA-IdRpDeMS_4A1HFNUBg_W5MaA,depth=10,body=Historical 52 (batch=1),prevs=['$_xBvb_mIUJgyvA-rgBppyjXVZ3SXn03isQ0axMOtThc']",
"event_id=$_xBvb_mIUJgyvA-rgBppyjXVZ3SXn03isQ0axMOtThc,depth=10,body=Historical 51 (batch=1),prevs=['$AYD-cd4lrJLbW35mCK8dKZEZI705gOsA1iiyW3uqDWk']",
"event_id=$AYD-cd4lrJLbW35mCK8dKZEZI705gOsA1iiyW3uqDWk,depth=10,body=Historical 50 (batch=1),prevs=['$KK1BXAZ3E-U7qKWhO6Y6DfXedQ04BhwuA_bNI5Nee8g']",
"event_id=$KK1BXAZ3E-U7qKWhO6Y6DfXedQ04BhwuA_bNI5Nee8g,depth=10,body=Historical 49 (batch=1),prevs=['$_oLPTYdg92q_l3c6vxV4tO9ioR9nPrk1lyb2qiLIPOk']",
"event_id=$_oLPTYdg92q_l3c6vxV4tO9ioR9nPrk1lyb2qiLIPOk,depth=10,body=Historical 48 (batch=1),prevs=['$RZ0Mzvftn99rU6XFl32jKHs0R6YYaMPy_HJy41tK4ig']",
"event_id=$RZ0Mzvftn99rU6XFl32jKHs0R6YYaMPy_HJy41tK4ig,depth=10,body=Historical 47 (batch=1),prevs=['$mloZAG1tKqfjIBQhJk8Mn7M5ER84cJ7bC0TW3rOsKpU']",
"event_id=$mloZAG1tKqfjIBQhJk8Mn7M5ER84cJ7bC0TW3rOsKpU,depth=10,body=Historical 46 (batch=1),prevs=['$RY6YWeTkTc8aQP6ZkPq_vL0qs1kg53QeDcKmrLi0ASw']",
"event_id=$RY6YWeTkTc8aQP6ZkPq_vL0qs1kg53QeDcKmrLi0ASw,depth=10,body=Historical 45 (batch=1),prevs=['$5A2e6qJj9n9ejvUW6TcVkm6-cuHghnRKQDW3T3a4eqI']",
"event_id=$5A2e6qJj9n9ejvUW6TcVkm6-cuHghnRKQDW3T3a4eqI,depth=10,body=Historical 44 (batch=1),prevs=['$KDMWnrkM1ezjDXlSrXjvhZS-RRuJc6_hrX-Msh0gP7o']",
"event_id=$KDMWnrkM1ezjDXlSrXjvhZS-RRuJc6_hrX-Msh0gP7o,depth=10,body=Historical 43 (batch=1),prevs=['$9Q6SSr_YMaQ6oc9w7lYs-bRw0cNESLPTE45Fg2_Zzv4']",
"event_id=$9Q6SSr_YMaQ6oc9w7lYs-bRw0cNESLPTE45Fg2_Zzv4,depth=10,body=Historical 42 (batch=1),prevs=['$b2QYayqOOaCxQqs655Tve2OKeXrT9CJeVIchVUn00hI']",
"event_id=$b2QYayqOOaCxQqs655Tve2OKeXrT9CJeVIchVUn00hI,depth=10,body=Historical 41 (batch=1),prevs=['$xQQBp4Dwm-3lxCWkJsck9bXuQoCKsdPIortpc79nTtw']",
"event_id=$xQQBp4Dwm-3lxCWkJsck9bXuQoCKsdPIortpc79nTtw,depth=10,body=Historical 40 (batch=1),prevs=['$RgTwPhV6RzdVBmuqoYBNblHPZ-qpYuTCshDBrfpwvds']",
"event_id=$RgTwPhV6RzdVBmuqoYBNblHPZ-qpYuTCshDBrfpwvds,depth=10,body=Historical 39 (batch=1),prevs=['$RWyv_RX_EoNzCDnHSCfx6fDnJrhWl46iWYomZSS2GsQ']",
"event_id=$RWyv_RX_EoNzCDnHSCfx6fDnJrhWl46iWYomZSS2GsQ,depth=10,body=Historical 38 (batch=1),prevs=['$Sj78rQcr9DuCnhtcYuZjWS6o1ZiFDd3ZQxDtJKxjeNg']",
"event_id=$Sj78rQcr9DuCnhtcYuZjWS6o1ZiFDd3ZQxDtJKxjeNg,depth=10,body=Historical 37 (batch=1),prevs=['$KePkqP3sJgnC8wVMyRFd0v7Fsu-8LiLTZbhx0JsWfnY']",
"event_id=$KePkqP3sJgnC8wVMyRFd0v7Fsu-8LiLTZbhx0JsWfnY,depth=10,body=Historical 36 (batch=1),prevs=['$QdyPRKCNju-Rzm1u530j3N7AEcRFA5mAO3sVbBZunkQ']",
"event_id=$QdyPRKCNju-Rzm1u530j3N7AEcRFA5mAO3sVbBZunkQ,depth=10,body=Historical 35 (batch=1),prevs=['$dd3HF7wo7YRhA6e0j5I9eGZtaH1rMK7dAriiNTQd7-Y']",
"event_id=$dd3HF7wo7YRhA6e0j5I9eGZtaH1rMK7dAriiNTQd7-Y,depth=10,body=Historical 34 (batch=1),prevs=['$l6q9M7E_yWQID_v4YZMYZfNevVqhK0Pm6qIDABcx7ag']",
"event_id=$l6q9M7E_yWQID_v4YZMYZfNevVqhK0Pm6qIDABcx7ag,depth=10,body=Historical 33 (batch=1),prevs=['$GAdAhlUMns9H8jeNH6yrfNp1c4_-lhQKyBnmAkQNZ5A']",
"event_id=$GAdAhlUMns9H8jeNH6yrfNp1c4_-lhQKyBnmAkQNZ5A,depth=10,body=Historical 32 (batch=1),prevs=['$6liLB-IPWtTynCd27je2vCoHfDK_S3pwlRe5GoUsLY8']",
"event_id=$6liLB-IPWtTynCd27je2vCoHfDK_S3pwlRe5GoUsLY8,depth=10,body=Historical 31 (batch=1),prevs=['$9C_ywoPrhy68x4-MurcodrKje7FOw5GuG9yMJ6W2ObM']",
"event_id=$9C_ywoPrhy68x4-MurcodrKje7FOw5GuG9yMJ6W2ObM,depth=10,body=Historical 30 (batch=1),prevs=['$QyvDk3PQ4dEDxHb0ihFqAwWpqH-NQ86GV_w5njGNOSY']",
"event_id=$QyvDk3PQ4dEDxHb0ihFqAwWpqH-NQ86GV_w5njGNOSY,depth=10,body=Historical 29 (batch=1),prevs=['$c2ee8wW8tAvev6UB1yOZMA56j-BFcxZJQqPbXxiqmeg']",
"event_id=$c2ee8wW8tAvev6UB1yOZMA56j-BFcxZJQqPbXxiqmeg,depth=10,body=Historical 28 (batch=1),prevs=['$psirWB7VB7WUVg7IjiG1XX2WMOAiN_FFcdo8crQ3KF0']",
"event_id=$psirWB7VB7WUVg7IjiG1XX2WMOAiN_FFcdo8crQ3KF0,depth=10,body=Historical 27 (batch=1),prevs=['$AMyblWA-Jny9Nobd-ghaFit6ZDG6OOg3rTxwEIn6zkQ']",
"event_id=$AMyblWA-Jny9Nobd-ghaFit6ZDG6OOg3rTxwEIn6zkQ,depth=10,body=Historical 26 (batch=1),prevs=['$EtDL8yGxA03ZO5pTeztYOQvHxUaMCCz9Nj7oGgM0CL8']",
"event_id=$EtDL8yGxA03ZO5pTeztYOQvHxUaMCCz9Nj7oGgM0CL8,depth=10,body=Historical 25 (batch=1),prevs=['$zmqDOTVLDS_khXDmPiPvJ7745wI_yuEAsxS_fyDroIo']",
"event_id=$zmqDOTVLDS_khXDmPiPvJ7745wI_yuEAsxS_fyDroIo,depth=10,body=Historical 24 (batch=1),prevs=['$lMcNfcLZKCtmrGISzGo3M_lxJapImAmdky9Lezij6TI']",
"event_id=$lMcNfcLZKCtmrGISzGo3M_lxJapImAmdky9Lezij6TI,depth=10,body=Historical 23 (batch=1),prevs=['$i4vpa73GXD7wZB2r2t-8nV--pGq_GdKCotM2-wpVJ10']",
"event_id=$i4vpa73GXD7wZB2r2t-8nV--pGq_GdKCotM2-wpVJ10,depth=10,body=Historical 22 (batch=1),prevs=['$9BA_P9uGh-cLjLau5nToTmpsnxdaPkT2RjMf9ZYglNI']",
"event_id=$9BA_P9uGh-cLjLau5nToTmpsnxdaPkT2RjMf9ZYglNI,depth=10,body=Historical 21 (batch=1),prevs=['$ySO1DPJTl_IiFwv4d6jbNy43a1go9rD_86A2EPIGVZE']",
"event_id=$ySO1DPJTl_IiFwv4d6jbNy43a1go9rD_86A2EPIGVZE,depth=10,body=Historical 20 (batch=1),prevs=['$XOyDGiQEhlEoT8UGl4HIod5Zb29R3Op2BFIaVeiCRyY']",
"event_id=$XOyDGiQEhlEoT8UGl4HIod5Zb29R3Op2BFIaVeiCRyY,depth=10,body=Historical 19 (batch=1),prevs=['$XDqJHr3kmi2Z9hpNX2Vz7o524cLEMkjKwk-_V2A3U1U']",
"event_id=$XDqJHr3kmi2Z9hpNX2Vz7o524cLEMkjKwk-_V2A3U1U,depth=10,body=Historical 18 (batch=1),prevs=['$hlXaBZDCY4XSg-qjuzkAWhYqoBpdX8ehIFZd5M_9rRM']",
"event_id=$hlXaBZDCY4XSg-qjuzkAWhYqoBpdX8ehIFZd5M_9rRM,depth=10,body=Historical 17 (batch=1),prevs=['$LMLomCl3U7zYXi4sIHHDnfznJkns0-DLRDGMbhJ1AAo']",
"event_id=$LMLomCl3U7zYXi4sIHHDnfznJkns0-DLRDGMbhJ1AAo,depth=10,body=Historical 16 (batch=1),prevs=['$d0pjrKi7Ws1QM-XyB1_d9Yrg0AGY8MD6JLJqrnaaoJM']",
"event_id=$d0pjrKi7Ws1QM-XyB1_d9Yrg0AGY8MD6JLJqrnaaoJM,depth=10,body=Historical 15 (batch=1),prevs=['$hx2dBPyOh6KnEzdpw7CnvoSOkiYTKJp82MXaWA_77N0']",
"event_id=$hx2dBPyOh6KnEzdpw7CnvoSOkiYTKJp82MXaWA_77N0,depth=10,body=Historical 14 (batch=1),prevs=['$-y0R8tPCI4n4L0t2j4Ua3QIfau7n4kqPXgnQjb4e1qk']",
"event_id=$-y0R8tPCI4n4L0t2j4Ua3QIfau7n4kqPXgnQjb4e1qk,depth=10,body=Historical 13 (batch=1),prevs=['$Af85_d8_UkHp8r8KzOnjCCI0whyMQB7U3G5u8NlMk4I']",
"event_id=$Af85_d8_UkHp8r8KzOnjCCI0whyMQB7U3G5u8NlMk4I,depth=10,body=Historical 12 (batch=1),prevs=['$1nQJC9ULuCVGYWU_umE58wq5wHmmFx2GdgF6nmQt5VU']",
"event_id=$1nQJC9ULuCVGYWU_umE58wq5wHmmFx2GdgF6nmQt5VU,depth=10,body=Historical 11 (batch=1),prevs=['$SdAp6h2pjv7aIxDSZJxwQbolYrqzUGf1gHOeBnqAULU']",
"event_id=$SdAp6h2pjv7aIxDSZJxwQbolYrqzUGf1gHOeBnqAULU,depth=10,body=Historical 10 (batch=1),prevs=['$YDMkSKMoYDtwMd-nKvgAIk38uzc1UejIyBvXNoJ_RFM']",
"event_id=$YDMkSKMoYDtwMd-nKvgAIk38uzc1UejIyBvXNoJ_RFM,depth=10,body=Historical 9 (batch=1),prevs=['$a8nvUo95cOf-cO4hcgfO1sT0kyWKq8XPUDmJe0DbxNE']",
"event_id=$a8nvUo95cOf-cO4hcgfO1sT0kyWKq8XPUDmJe0DbxNE,depth=10,body=Historical 8 (batch=1),prevs=['$LunwOlIdMiDjrcQazQ6I3n0T8aLfmSA24fIEeth1hHs']",
"event_id=$LunwOlIdMiDjrcQazQ6I3n0T8aLfmSA24fIEeth1hHs,depth=10,body=Historical 7 (batch=1),prevs=['$UOvHOp4SKtZqSDWZvD0s3VGdU23-6YqiWy_742cqY-8']",
"event_id=$UOvHOp4SKtZqSDWZvD0s3VGdU23-6YqiWy_742cqY-8,depth=10,body=Historical 6 (batch=1),prevs=['$W-c9syEfTTufHnNBpuMUIk621ecs9W6bTeLW0OgWFfY']\n"]
new implementation backfill events(17)=[
"event_id=$W-c9syEfTTufHnNBpuMUIk621ecs9W6bTeLW0OgWFfY,depth=10,body=Historical 5 (batch=1),prevs=['$Gq8-foARgSoEzcEwXhOsiey2pefpCX3vjnCLtsIdvU0']",
"event_id=$Gq8-foARgSoEzcEwXhOsiey2pefpCX3vjnCLtsIdvU0,depth=10,body=Historical 4 (batch=1),prevs=['$toIu3hsoBDXkVJs91nUG0hodf3nuFkbidY7ztVPrtCM']",
"event_id=$toIu3hsoBDXkVJs91nUG0hodf3nuFkbidY7ztVPrtCM,depth=10,body=Historical 3 (batch=1),prevs=['$SRcKQ-ggRujFzHbJC44rWvslb4YBKgieWahZakx3zMw']",
"event_id=$SRcKQ-ggRujFzHbJC44rWvslb4YBKgieWahZakx3zMw,depth=10,body=Historical 2 (batch=1),prevs=['$Pgqvjn_rkQb6eEdQDeKclO-l_ODlnplF7S-rT1i_-64']",
"event_id=$Pgqvjn_rkQb6eEdQDeKclO-l_ODlnplF7S-rT1i_-64,depth=10,body=Historical 1 (batch=1),prevs=['$jEW2Smmgh5tIh1QMtEqmluy-o3FrcVhNAH5e3R4jMoo']",
"event_id=$jEW2Smmgh5tIh1QMtEqmluy-o3FrcVhNAH5e3R4jMoo,depth=10,body=Historical 0 (batch=1),prevs=['$1bbHCIrQLToHvum-PGxpIKhCmZ5MYLusAy_gJm7IWTw']",
"event_id=$1bbHCIrQLToHvum-PGxpIKhCmZ5MYLusAy_gJm7IWTw,depth=10,body=org.matrix.msc2716.insertion,prevs=['$758TrMVR2MlE4EhpRUvCYZFcp11cbE27edQcwKaUSI8']",
"event_id=$T5-OUXAW3CCYAHskqk5s0V2ZzJoQy5D8lQJ7LZFWvTI,depth=9,body=Message 1 (eventIDsBefore),prevs=['$WYEMee2J5PcH1yM2XDnD2XIhyMS_HHDdYXop6BOL69E']",
"event_id=$WYEMee2J5PcH1yM2XDnD2XIhyMS_HHDdYXop6BOL69E,depth=8,body=Message 0 (eventIDsBefore),prevs=['$jTD4_ZLQQgXienBOsHMwSqyuuYtXQq4WYj7hnPbRC0o']",
"event_id=$jTD4_ZLQQgXienBOsHMwSqyuuYtXQq4WYj7hnPbRC0o,depth=7,body=m.room.member,prevs=['$d9EI1fE4ArZLYeQPs3P6dlqTmtskwjJWtlfNEZTdSoA']",
"event_id=$d9EI1fE4ArZLYeQPs3P6dlqTmtskwjJWtlfNEZTdSoA,depth=6,body=m.room.name,prevs=['$VvA6Hhp67rDLix7Pg9tZs6DDDh0gq_Mw-qr9wd5cO2k']",
"event_id=$VvA6Hhp67rDLix7Pg9tZs6DDDh0gq_Mw-qr9wd5cO2k,depth=5,body=m.room.history_visibility,prevs=['$7fkTDT3EgbweX381_HInASE-jAzhxcQfkzOWuXxXO7U']",
"event_id=$7fkTDT3EgbweX381_HInASE-jAzhxcQfkzOWuXxXO7U,depth=4,body=m.room.join_rules,prevs=['$uvO6_KB-CJtOtomqSgSAWLL59mJK0JW2U33ebFTuoK4']",
"event_id=$uvO6_KB-CJtOtomqSgSAWLL59mJK0JW2U33ebFTuoK4,depth=3,body=m.room.power_levels,prevs=['$HjRQ8RpCPPWO4Ufq6bSCTqa_tSlKez15KvZRMpvvskc']",
"event_id=$HjRQ8RpCPPWO4Ufq6bSCTqa_tSlKez15KvZRMpvvskc,depth=2,body=m.room.member,prevs=['$yXLeDjVhdX5jmjLVxmsxKhG_rjfA9ujL8Cd8eHNha6U']",
'event_id=$758TrMVR2MlE4EhpRUvCYZFcp11cbE27edQcwKaUSI8,depth=1,body=m.room.member,prevs=[]',
'event_id=$yXLeDjVhdX5jmjLVxmsxKhG_rjfA9ujL8Cd8eHNha6U,depth=1,body=m.room.create,prevs=[]'
]
```
2021-10-29 17:27:38 -05:00
Eric Eastwood
c772b35a25
Implement backfill in handler so we can do fetching later
...
Old and new implementation seem to perform the same :)
```
old implementation backfill events=[
"event_id=$BU66ZRqOvMEH-wRgx3hruEBKH1tcUUD0rWdGnUEAcuQ,depth=11,body=Message 1 (eventIDsAfter),prevs=['$r7UcvfwqKAnhqAesYovjSEWaC4aOcXWJMWQ0W7LhBok']",
"event_id=$r7UcvfwqKAnhqAesYovjSEWaC4aOcXWJMWQ0W7LhBok,depth=10,body=Message 0 (eventIDsAfter),prevs=['$9JuhSj0h0AbHvky0T3tSRfq_lxg1k2LTHY-J-MW6FfA']",
"event_id=$jX7MRv7WeXx79_r44I45EC8peZ0eKgbN12wolz0_ueA,depth=10,body=org.matrix.msc2716.insertion,prevs=['$9JuhSj0h0AbHvky0T3tSRfq_lxg1k2LTHY-J-MW6FfA']",
"event_id=$HG6XjFmFFO5O2-JW-kaayz2qJTwhzrtICjHdV9j0RMU,depth=10,body=org.matrix.msc2716.batch,prevs=['$d-z0eDSnU4PhbnisRLC7OIvoQFXlfnwhElh5mA1gFFo']",
"event_id=$d-z0eDSnU4PhbnisRLC7OIvoQFXlfnwhElh5mA1gFFo,depth=10,body=Historical 99 (batch=0),prevs=['$z8iHeSZupiT5NOYzhhyOEFwrPMFI3vN2iDFpijniw6Q']",
"event_id=$z8iHeSZupiT5NOYzhhyOEFwrPMFI3vN2iDFpijniw6Q,depth=10,body=Historical 98 (batch=0),prevs=['$ddn3uR4QbOH8imNzXy-_xz9Kn63qAJhC9NjFOUvu-_w']",
"event_id=$ddn3uR4QbOH8imNzXy-_xz9Kn63qAJhC9NjFOUvu-_w,depth=10,body=Historical 97 (batch=0),prevs=['$BRTaYbuvXTnBpC-Dhee2UUBY-LePaWLTMd60sa82c_I']",
"event_id=$BRTaYbuvXTnBpC-Dhee2UUBY-LePaWLTMd60sa82c_I,depth=10,body=Historical 96 (batch=0),prevs=['$HC1catch1Ti3NWcGWWXJ7doMinWfU-SNkCYJC7v_RxA']",
"event_id=$HC1catch1Ti3NWcGWWXJ7doMinWfU-SNkCYJC7v_RxA,depth=10,body=Historical 95 (batch=0),prevs=['$DL3D99BYS_Cn047L6XxUvHN86icB69Yi9jttmxnepVo']",
"event_id=$DL3D99BYS_Cn047L6XxUvHN86icB69Yi9jttmxnepVo,depth=10,body=Historical 94 (batch=0),prevs=['$bqDvvvMj2a4x4FUh_Iy6aA9sejqunlPQxjgDhM9-2CY']",
"event_id=$bqDvvvMj2a4x4FUh_Iy6aA9sejqunlPQxjgDhM9-2CY,depth=10,body=Historical 93 (batch=0),prevs=['$CUhTzLqLabAzjqNbh9_SKSX1Re7z581D7BF90a3jE-0']",
"event_id=$CUhTzLqLabAzjqNbh9_SKSX1Re7z581D7BF90a3jE-0,depth=10,body=Historical 92 (batch=0),prevs=['$3l6A4siERlLreAmXGH1KFagDjb9G8i4_TrxLErZS4FY']",
"event_id=$3l6A4siERlLreAmXGH1KFagDjb9G8i4_TrxLErZS4FY,depth=10,body=Historical 91 (batch=0),prevs=['$BSosTk20sS031k33sDi_kMkrGMVjSUnCzT1wvZo0dcg']",
"event_id=$BSosTk20sS031k33sDi_kMkrGMVjSUnCzT1wvZo0dcg,depth=10,body=Historical 90 (batch=0),prevs=['$XoyyYG9ngSu_sJ_npwDgrwLVQt0E6kDAxW_f0MzaIKs']",
"event_id=$XoyyYG9ngSu_sJ_npwDgrwLVQt0E6kDAxW_f0MzaIKs,depth=10,body=Historical 89 (batch=0),prevs=['$8j7g564Kma7kqrgkqru2Nw21Ez2xZoyqBXtgrwYtbIU']",
"event_id=$8j7g564Kma7kqrgkqru2Nw21Ez2xZoyqBXtgrwYtbIU,depth=10,body=Historical 88 (batch=0),prevs=['$FlIO19qRDZggQ3ZIMd4OhF4kGNpiipB4BR7sqQnG5xU']",
"event_id=$FlIO19qRDZggQ3ZIMd4OhF4kGNpiipB4BR7sqQnG5xU,depth=10,body=Historical 87 (batch=0),prevs=['$reiGLF3R8Q5wqm_KJKOTQGFQ6PHIExRrV1nmB7lw5WA']",
"event_id=$reiGLF3R8Q5wqm_KJKOTQGFQ6PHIExRrV1nmB7lw5WA,depth=10,body=Historical 86 (batch=0),prevs=['$7JRXCFtNfXY_TNZTZSjr7dPnKAMz39E8K2DQfhrxk0s']",
"event_id=$7JRXCFtNfXY_TNZTZSjr7dPnKAMz39E8K2DQfhrxk0s,depth=10,body=Historical 85 (batch=0),prevs=['$8Z6-6uE22VHh3KoN2wGa9SAPhf0_MXPz3y_O2G8A9Bo']",
"event_id=$8Z6-6uE22VHh3KoN2wGa9SAPhf0_MXPz3y_O2G8A9Bo,depth=10,body=Historical 84 (batch=0),prevs=['$CETAr2-SIsfT_exUgUY9El4PL6WOFnr7_6Hv86BuZUQ']",
"event_id=$CETAr2-SIsfT_exUgUY9El4PL6WOFnr7_6Hv86BuZUQ,depth=10,body=Historical 83 (batch=0),prevs=['$dMOfVXcWxuoNS9di9AHyocIzAAucNG2v2aXqZWK7oA0']",
"event_id=$dMOfVXcWxuoNS9di9AHyocIzAAucNG2v2aXqZWK7oA0,depth=10,body=Historical 82 (batch=0),prevs=['$4UjX4-4EejV7e0umXczxoqx9eHMvu2fFDIPGlY4zdrQ']",
"event_id=$4UjX4-4EejV7e0umXczxoqx9eHMvu2fFDIPGlY4zdrQ,depth=10,body=Historical 81 (batch=0),prevs=['$e5d87r41P1lFrfM8iEp3waCi21lKx-bFBTEMhUMDJhE']",
"event_id=$e5d87r41P1lFrfM8iEp3waCi21lKx-bFBTEMhUMDJhE,depth=10,body=Historical 80 (batch=0),prevs=['$ez0-Q4agOvUQbWUELiTJEEJWwZYj-TnaQTnNc3Vil8M']",
"event_id=$ez0-Q4agOvUQbWUELiTJEEJWwZYj-TnaQTnNc3Vil8M,depth=10,body=Historical 79 (batch=0),prevs=['$zaMM-ZtQMADqFNsjrQrl_u0FIjxVHSEbdICkI5kph14']",
"event_id=$zaMM-ZtQMADqFNsjrQrl_u0FIjxVHSEbdICkI5kph14,depth=10,body=Historical 78 (batch=0),prevs=['$jhDwZ4C8aCS7xm0D7xwQYKYXxE9yrnV_jnXWs7yj97A']",
"event_id=$jhDwZ4C8aCS7xm0D7xwQYKYXxE9yrnV_jnXWs7yj97A,depth=10,body=Historical 77 (batch=0),prevs=['$794zi7lECGaZqgi-mVDTuAcCVxQRcasLEWHNQk_T5Qo']",
"event_id=$794zi7lECGaZqgi-mVDTuAcCVxQRcasLEWHNQk_T5Qo,depth=10,body=Historical 76 (batch=0),prevs=['$RYc7Epu2beVamNOISGEPPzYPnqNr8OPpy6srKUDCNaY']",
"event_id=$RYc7Epu2beVamNOISGEPPzYPnqNr8OPpy6srKUDCNaY,depth=10,body=Historical 75 (batch=0),prevs=['$NxzF542rsM0WMKZonV9YxmaJ5PLpVWK1TUfcLFP4VT8']",
"event_id=$NxzF542rsM0WMKZonV9YxmaJ5PLpVWK1TUfcLFP4VT8,depth=10,body=Historical 74 (batch=0),prevs=['$YbcfMO7DOlq6owFILKIGpLSrvpMiDmIp77TCmafFxUU']",
"event_id=$YbcfMO7DOlq6owFILKIGpLSrvpMiDmIp77TCmafFxUU,depth=10,body=Historical 73 (batch=0),prevs=['$RmlFFGojIl8VSc115lgQwk0NeAIAQT7CuLv3ajIv2X0']",
"event_id=$RmlFFGojIl8VSc115lgQwk0NeAIAQT7CuLv3ajIv2X0,depth=10,body=Historical 72 (batch=0),prevs=['$lGGzpQOPdmzBqXIFF5HZfyGQCmXJOnmkZCRFRzxqJkw']",
"event_id=$lGGzpQOPdmzBqXIFF5HZfyGQCmXJOnmkZCRFRzxqJkw,depth=10,body=Historical 71 (batch=0),prevs=['$TcSzi68MSFf1W0843Zi0iRq5vXFs8FhdtI9NfNCY5DM']",
"event_id=$TcSzi68MSFf1W0843Zi0iRq5vXFs8FhdtI9NfNCY5DM,depth=10,body=Historical 70 (batch=0),prevs=['$iKaFgZ_aeN-ZJUNJEYj4WjY31RPm8PXs27n-u2LnlCE']",
"event_id=$iKaFgZ_aeN-ZJUNJEYj4WjY31RPm8PXs27n-u2LnlCE,depth=10,body=Historical 69 (batch=0),prevs=['$n52R-hna5danKau87AHkwXDV5CuUTIZ960gtHr9X8hw']",
"event_id=$n52R-hna5danKau87AHkwXDV5CuUTIZ960gtHr9X8hw,depth=10,body=Historical 68 (batch=0),prevs=['$Fr3wnWXII8LpE3VyF1pLWuLpSCyxu7jC1i4ggMqH1kE']",
"event_id=$Fr3wnWXII8LpE3VyF1pLWuLpSCyxu7jC1i4ggMqH1kE,depth=10,body=Historical 67 (batch=0),prevs=['$ebCIN2TL4fFQeTEahzeX-VCkh_YEohAItvRd6LAVP2E']",
"event_id=$ebCIN2TL4fFQeTEahzeX-VCkh_YEohAItvRd6LAVP2E,depth=10,body=Historical 66 (batch=0),prevs=['$CFeaKxHxgPCSUufJChertFT4au4P9Y1a_tTdN2wmo3Q']",
"event_id=$CFeaKxHxgPCSUufJChertFT4au4P9Y1a_tTdN2wmo3Q,depth=10,body=Historical 65 (batch=0),prevs=['$MctpfuMG5AhhCb9aPRG-4V6VKxxNUzALNLq3BVJKejU']",
"event_id=$MctpfuMG5AhhCb9aPRG-4V6VKxxNUzALNLq3BVJKejU,depth=10,body=Historical 64 (batch=0),prevs=['$ikjtTCZ7KXg1qtwgURuBZ-P5C1RG1oY8U3k2rm9RGxA']",
"event_id=$ikjtTCZ7KXg1qtwgURuBZ-P5C1RG1oY8U3k2rm9RGxA,depth=10,body=Historical 63 (batch=0),prevs=['$KDbI-rBuoAI7rRhtAjcoDY2PbLQ9gDsK5fRts3OihSA']",
"event_id=$KDbI-rBuoAI7rRhtAjcoDY2PbLQ9gDsK5fRts3OihSA,depth=10,body=Historical 62 (batch=0),prevs=['$_ZwqRJxNwgcZn4Trb5nrTjRP8ssQuLDq5ThguCm9KzE']",
"event_id=$_ZwqRJxNwgcZn4Trb5nrTjRP8ssQuLDq5ThguCm9KzE,depth=10,body=Historical 61 (batch=0),prevs=['$hq1xDHEWodibkwlNg73931wjYlD5M29dkFHU0dQB2dk']",
"event_id=$hq1xDHEWodibkwlNg73931wjYlD5M29dkFHU0dQB2dk,depth=10,body=Historical 60 (batch=0),prevs=['$XPRt_CuI_AXJylRQYbQ0ItkRkMy4ey0XxqS7iIdGLfQ']",
"event_id=$XPRt_CuI_AXJylRQYbQ0ItkRkMy4ey0XxqS7iIdGLfQ,depth=10,body=Historical 59 (batch=0),prevs=['$Ucd44nYFkYVe_zs5wEqU5slG74IIPdzq_mqEHinIoIo']",
"event_id=$Ucd44nYFkYVe_zs5wEqU5slG74IIPdzq_mqEHinIoIo,depth=10,body=Historical 58 (batch=0),prevs=['$CtM1TqWoFt3KabPNRKYi1vrpOPGwdpjx-15TpfKgYYA']",
"event_id=$CtM1TqWoFt3KabPNRKYi1vrpOPGwdpjx-15TpfKgYYA,depth=10,body=Historical 57 (batch=0),prevs=['$Jo8T-m9nSs77uF4uFtkd22CifwnvDlr13Fs14NHcCMw']",
"event_id=$Jo8T-m9nSs77uF4uFtkd22CifwnvDlr13Fs14NHcCMw,depth=10,body=Historical 56 (batch=0),prevs=['$WW45KevKriYRET0tOmKk8Ha9fFqxJJS_IC8Ih6I3L2A']",
"event_id=$WW45KevKriYRET0tOmKk8Ha9fFqxJJS_IC8Ih6I3L2A,depth=10,body=Historical 55 (batch=0),prevs=['$G60oGyHZvp-Gim48qnC_epu2JRseKQUCTI5vqZEIbaI']",
"event_id=$G60oGyHZvp-Gim48qnC_epu2JRseKQUCTI5vqZEIbaI,depth=10,body=Historical 54 (batch=0),prevs=['$R9Z6YaR1K9ulUzF9d6-ZL0QwJmwaEj1wTUPHrTJqFUs']",
"event_id=$R9Z6YaR1K9ulUzF9d6-ZL0QwJmwaEj1wTUPHrTJqFUs,depth=10,body=Historical 53 (batch=0),prevs=['$CqedFlSaUBYWSHtkJJYmoc-DnxWCAaKVKOai0u5rawM']",
"event_id=$CqedFlSaUBYWSHtkJJYmoc-DnxWCAaKVKOai0u5rawM,depth=10,body=Historical 52 (batch=0),prevs=['$3Ol33IgZ5lBuVwgELhRBYoFLb6GwkFTha3j6uxvHToY']",
"event_id=$3Ol33IgZ5lBuVwgELhRBYoFLb6GwkFTha3j6uxvHToY,depth=10,body=Historical 51 (batch=0),prevs=['$wUcLTd2pGhliQunqWxFGvT6yiEZrUXA920-hcjaloSw']",
"event_id=$wUcLTd2pGhliQunqWxFGvT6yiEZrUXA920-hcjaloSw,depth=10,body=Historical 50 (batch=0),prevs=['$gaO95ghwbwpGttuqBbhMrZJzz9Z440U7L2WOtDy7Hr8']",
"event_id=$gaO95ghwbwpGttuqBbhMrZJzz9Z440U7L2WOtDy7Hr8,depth=10,body=Historical 49 (batch=0),prevs=['$4TSr_VvZzCV17JYxAob3DN2nQiYDqgW2S_QkW27v7Bg']",
"event_id=$4TSr_VvZzCV17JYxAob3DN2nQiYDqgW2S_QkW27v7Bg,depth=10,body=Historical 48 (batch=0),prevs=['$bJaLResm_4aAwSjZ0POTvtVx4lnV9HKt8HwiYgP21lM']",
"event_id=$bJaLResm_4aAwSjZ0POTvtVx4lnV9HKt8HwiYgP21lM,depth=10,body=Historical 47 (batch=0),prevs=['$BouN8LDmbFWiWo9Wc4wQi48YsC-icXewa05KR7byzhM']",
"event_id=$BouN8LDmbFWiWo9Wc4wQi48YsC-icXewa05KR7byzhM,depth=10,body=Historical 46 (batch=0),prevs=['$n9Cv6EUu7i25OZLCllOE2PU4xjRthDKhkdtp5OtMuVk']",
"event_id=$n9Cv6EUu7i25OZLCllOE2PU4xjRthDKhkdtp5OtMuVk,depth=10,body=Historical 45 (batch=0),prevs=['$MLVpmxVSSRRpxlcTkwIJT3neo7maqOp_ZLvwXRBY8A8']",
"event_id=$MLVpmxVSSRRpxlcTkwIJT3neo7maqOp_ZLvwXRBY8A8,depth=10,body=Historical 44 (batch=0),prevs=['$tNv8Se5-lgfW-9MqE_upeBzq3QSPpsn7qOHz49WFs_c']",
"event_id=$tNv8Se5-lgfW-9MqE_upeBzq3QSPpsn7qOHz49WFs_c,depth=10,body=Historical 43 (batch=0),prevs=['$XCDKybStk9PsquzrY-biUlKOmjk3wTXnsD1htiMdgAM']",
"event_id=$XCDKybStk9PsquzrY-biUlKOmjk3wTXnsD1htiMdgAM,depth=10,body=Historical 42 (batch=0),prevs=['$iUDAE7nT6DQaNJSemwUpqQs8KvKTPFexcBJLTs2-gnY']",
"event_id=$iUDAE7nT6DQaNJSemwUpqQs8KvKTPFexcBJLTs2-gnY,depth=10,body=Historical 41 (batch=0),prevs=['$T8NTrB9vQMLW-a0tT3corPl0g6O3UjGIoaHBjkjCD_w']",
"event_id=$T8NTrB9vQMLW-a0tT3corPl0g6O3UjGIoaHBjkjCD_w,depth=10,body=Historical 40 (batch=0),prevs=['$N7jCLhKYDejMTejtrjJfM2lMRES5OPeowtvN-L4utsE']",
"event_id=$N7jCLhKYDejMTejtrjJfM2lMRES5OPeowtvN-L4utsE,depth=10,body=Historical 39 (batch=0),prevs=['$Oy9aTfjL0LSnbF_6MRq7-5baaEbfxyRTK1kbVGeNoaU']",
"event_id=$Oy9aTfjL0LSnbF_6MRq7-5baaEbfxyRTK1kbVGeNoaU,depth=10,body=Historical 38 (batch=0),prevs=['$V4qFDnqO1LrboSWwCoQpQ4dXLyrc74qZbbsaHxqAj4Q']",
"event_id=$V4qFDnqO1LrboSWwCoQpQ4dXLyrc74qZbbsaHxqAj4Q,depth=10,body=Historical 37 (batch=0),prevs=['$vWdLNDGwj_mBJ6JZ2s01OhsxRuPNSSJAM_bMa6J9Q2c']",
"event_id=$vWdLNDGwj_mBJ6JZ2s01OhsxRuPNSSJAM_bMa6J9Q2c,depth=10,body=Historical 36 (batch=0),prevs=['$JZt2EdPtKJX6f2MMbj_gSEseVAMa-H5r_J_yvfhHs5k']",
"event_id=$JZt2EdPtKJX6f2MMbj_gSEseVAMa-H5r_J_yvfhHs5k,depth=10,body=Historical 35 (batch=0),prevs=['$NPzUfUgNfvkezhUeLmcp2utVA_XnW8YzDqbZlznsEN0']",
"event_id=$NPzUfUgNfvkezhUeLmcp2utVA_XnW8YzDqbZlznsEN0,depth=10,body=Historical 34 (batch=0),prevs=['$NNUjzVtvOSFDYRID_PsMJrUC8gx5p1mPvIoMB7ibDn0']",
"event_id=$NNUjzVtvOSFDYRID_PsMJrUC8gx5p1mPvIoMB7ibDn0,depth=10,body=Historical 33 (batch=0),prevs=['$dONbCTAYR0kOMVSmxOnM5aQ4bgx9PbKza98_e2Lxxw4']",
"event_id=$dONbCTAYR0kOMVSmxOnM5aQ4bgx9PbKza98_e2Lxxw4,depth=10,body=Historical 32 (batch=0),prevs=['$dwxZHePgzbtQMO3caex0O9Zdl-gT3fpWRZD5dJ43JmE']",
"event_id=$dwxZHePgzbtQMO3caex0O9Zdl-gT3fpWRZD5dJ43JmE,depth=10,body=Historical 31 (batch=0),prevs=['$5JOpa9222Y0__S8yfaZBT7ESuRaPeeRz80jleMoa5hE']",
"event_id=$5JOpa9222Y0__S8yfaZBT7ESuRaPeeRz80jleMoa5hE,depth=10,body=Historical 30 (batch=0),prevs=['$7yIEFZZFs91wjKScsjbG854DUOqomPnV4iGG-EDWK6w']",
"event_id=$7yIEFZZFs91wjKScsjbG854DUOqomPnV4iGG-EDWK6w,depth=10,body=Historical 29 (batch=0),prevs=['$9pzIrDRB1cuweDiHaPGB6AtTtGeGEOmqyoP59UAa0pI']",
"event_id=$9pzIrDRB1cuweDiHaPGB6AtTtGeGEOmqyoP59UAa0pI,depth=10,body=Historical 28 (batch=0),prevs=['$EBu0Y6-OdqNUumOlHK__K2eXsN8mAYV21eCRKwGmkxU']",
"event_id=$EBu0Y6-OdqNUumOlHK__K2eXsN8mAYV21eCRKwGmkxU,depth=10,body=Historical 27 (batch=0),prevs=['$95FzYeNZk31wyfaCojognGOAkzLhHLrv4_j3eoJawwU']",
"event_id=$95FzYeNZk31wyfaCojognGOAkzLhHLrv4_j3eoJawwU,depth=10,body=Historical 26 (batch=0),prevs=['$QDGDnSNRXjNZG2lia2gjeD1aEfgfZ0gxI1BzIgjyZq8']",
"event_id=$QDGDnSNRXjNZG2lia2gjeD1aEfgfZ0gxI1BzIgjyZq8,depth=10,body=Historical 25 (batch=0),prevs=['$tf1GB8ydPyNTNAaGwcTUXaTOSCmNohK6e6MmOnFwrJA']",
"event_id=$tf1GB8ydPyNTNAaGwcTUXaTOSCmNohK6e6MmOnFwrJA,depth=10,body=Historical 24 (batch=0),prevs=['$n40ks3dofH6DioQlfe84n3exnYrboy8GHHYJ_qBFJMg']",
"event_id=$n40ks3dofH6DioQlfe84n3exnYrboy8GHHYJ_qBFJMg,depth=10,body=Historical 23 (batch=0),prevs=['$xl8xG3MJiiNP21WNFmDLxOR8Rhy_FLws0snsmDUoAYQ']",
"event_id=$xl8xG3MJiiNP21WNFmDLxOR8Rhy_FLws0snsmDUoAYQ,depth=10,body=Historical 22 (batch=0),prevs=['$6MxFONk8t5shoQpjjZyxd0ypmfj76LPs9hWKkPAxMcI']",
"event_id=$6MxFONk8t5shoQpjjZyxd0ypmfj76LPs9hWKkPAxMcI,depth=10,body=Historical 21 (batch=0),prevs=['$XAAn4gMQe4ShIZKvZntEUBRljDM4IxHDVeNOXp3K2Bk']",
"event_id=$XAAn4gMQe4ShIZKvZntEUBRljDM4IxHDVeNOXp3K2Bk,depth=10,body=Historical 20 (batch=0),prevs=['$Gj3RlKLUMb6hI_JyXdfwuoneWDs1b63qF7WdYYiNDG0']",
"event_id=$Gj3RlKLUMb6hI_JyXdfwuoneWDs1b63qF7WdYYiNDG0,depth=10,body=Historical 19 (batch=0),prevs=['$yiRe3l3_APWuZt1wfFBxXQp2orQJZJvwv3yk4QNiPxo']",
"event_id=$yiRe3l3_APWuZt1wfFBxXQp2orQJZJvwv3yk4QNiPxo,depth=10,body=Historical 18 (batch=0),prevs=['$v04Ud2zPqFe5M3jPbiLrqQ6r_QXgFlmRTMMLyVvAsN8']",
"event_id=$v04Ud2zPqFe5M3jPbiLrqQ6r_QXgFlmRTMMLyVvAsN8,depth=10,body=Historical 17 (batch=0),prevs=['$tO5NiLH2mPBIMRVmrTIza6CUv7v6R0e_tgj0ZKEtpG0']",
"event_id=$tO5NiLH2mPBIMRVmrTIza6CUv7v6R0e_tgj0ZKEtpG0,depth=10,body=Historical 16 (batch=0),prevs=['$fyQ-akREpz3vpQNqTZ47yxAs_APAw2L_bQ1iAudsPWk']",
"event_id=$fyQ-akREpz3vpQNqTZ47yxAs_APAw2L_bQ1iAudsPWk,depth=10,body=Historical 15 (batch=0),prevs=['$qddW2HRZA0BudaIWuun6Odt6wDbz7ETRJmSY8wtjMnY']",
"event_id=$qddW2HRZA0BudaIWuun6Odt6wDbz7ETRJmSY8wtjMnY,depth=10,body=Historical 14 (batch=0),prevs=['$fxl98r0B-sa2T8LDR2q6Wi01Zw6xCPZB5FcMf5x_vxI']",
"event_id=$fxl98r0B-sa2T8LDR2q6Wi01Zw6xCPZB5FcMf5x_vxI,depth=10,body=Historical 13 (batch=0),prevs=['$1PML_QTo1MK_EuUz3OYyc2vDjfGKKYt-0sUSN9jTeHs']",
"event_id=$1PML_QTo1MK_EuUz3OYyc2vDjfGKKYt-0sUSN9jTeHs,depth=10,body=Historical 12 (batch=0),prevs=['$YTz-q29BhUU_Ox7_CR7gao1v7mmMqLwbz51WWI0CjHs']",
"event_id=$YTz-q29BhUU_Ox7_CR7gao1v7mmMqLwbz51WWI0CjHs,depth=10,body=Historical 11 (batch=0),prevs=['$Y3HUk4SiCWUrV5V_ZUcwC1IkVZEPM3V8oGWrWKRcv3I']",
"event_id=$Y3HUk4SiCWUrV5V_ZUcwC1IkVZEPM3V8oGWrWKRcv3I,depth=10,body=Historical 10 (batch=0),prevs=['$uV5daep6tIdbImy2XEIxdQIuGYc547ulzxMplDyBWfY']",
"event_id=$uV5daep6tIdbImy2XEIxdQIuGYc547ulzxMplDyBWfY,depth=10,body=Historical 9 (batch=0),prevs=['$bVKZ6uRROzC7aNcZc9cUsfhHl5dU_-Vm6Qz5V9X8GsI']",
"event_id=$bVKZ6uRROzC7aNcZc9cUsfhHl5dU_-Vm6Qz5V9X8GsI,depth=10,body=Historical 8 (batch=0),prevs=['$6zjql7LGgIa3gFpf9owZsKWeFU4FoMUKDtVPpMo7xsM']",
"event_id=$6zjql7LGgIa3gFpf9owZsKWeFU4FoMUKDtVPpMo7xsM,depth=10,body=Historical 7 (batch=0),prevs=['$w5t7UuOHrrsfZRebkX4adeEeJpPPGv9y6RyhKpxToMc']",
"event_id=$w5t7UuOHrrsfZRebkX4adeEeJpPPGv9y6RyhKpxToMc,depth=10,body=Historical 6 (batch=0),prevs=['$649goNxH4B0DMta75_xs_TTib6C268A2JiUHvpUMu8g']",
"event_id=$649goNxH4B0DMta75_xs_TTib6C268A2JiUHvpUMu8g,depth=10,body=Historical 5 (batch=0),prevs=['$mtUwpP0KSNwsn73yxBfQ7imKUe955v_SvI427PC5y2I']",
"event_id=$9JuhSj0h0AbHvky0T3tSRfq_lxg1k2LTHY-J-MW6FfA,depth=9,body=Message 1 (eventIDsBefore),prevs=['$FcPmU5Fjg57eO_2J4VOK9jOcqRclEED5B9i1FsHNjaE']\"
]
```
```
new implementation backfill events=[
"event_id=$BU66ZRqOvMEH-wRgx3hruEBKH1tcUUD0rWdGnUEAcuQ,depth=11,body=Message 1 (eventIDsAfter),prevs=['$r7UcvfwqKAnhqAesYovjSEWaC4aOcXWJMWQ0W7LhBok']",
"event_id=$r7UcvfwqKAnhqAesYovjSEWaC4aOcXWJMWQ0W7LhBok,depth=10,body=Message 0 (eventIDsAfter),prevs=['$9JuhSj0h0AbHvky0T3tSRfq_lxg1k2LTHY-J-MW6FfA']",
"event_id=$jX7MRv7WeXx79_r44I45EC8peZ0eKgbN12wolz0_ueA,depth=10,body=org.matrix.msc2716.insertion,prevs=['$9JuhSj0h0AbHvky0T3tSRfq_lxg1k2LTHY-J-MW6FfA']",
"event_id=$HG6XjFmFFO5O2-JW-kaayz2qJTwhzrtICjHdV9j0RMU,depth=10,body=org.matrix.msc2716.batch,prevs=['$d-z0eDSnU4PhbnisRLC7OIvoQFXlfnwhElh5mA1gFFo']",
"event_id=$d-z0eDSnU4PhbnisRLC7OIvoQFXlfnwhElh5mA1gFFo,depth=10,body=Historical 99 (batch=0),prevs=['$z8iHeSZupiT5NOYzhhyOEFwrPMFI3vN2iDFpijniw6Q']",
"event_id=$z8iHeSZupiT5NOYzhhyOEFwrPMFI3vN2iDFpijniw6Q,depth=10,body=Historical 98 (batch=0),prevs=['$ddn3uR4QbOH8imNzXy-_xz9Kn63qAJhC9NjFOUvu-_w']",
"event_id=$ddn3uR4QbOH8imNzXy-_xz9Kn63qAJhC9NjFOUvu-_w,depth=10,body=Historical 97 (batch=0),prevs=['$BRTaYbuvXTnBpC-Dhee2UUBY-LePaWLTMd60sa82c_I']",
"event_id=$BRTaYbuvXTnBpC-Dhee2UUBY-LePaWLTMd60sa82c_I,depth=10,body=Historical 96 (batch=0),prevs=['$HC1catch1Ti3NWcGWWXJ7doMinWfU-SNkCYJC7v_RxA']",
"event_id=$HC1catch1Ti3NWcGWWXJ7doMinWfU-SNkCYJC7v_RxA,depth=10,body=Historical 95 (batch=0),prevs=['$DL3D99BYS_Cn047L6XxUvHN86icB69Yi9jttmxnepVo']",
"event_id=$DL3D99BYS_Cn047L6XxUvHN86icB69Yi9jttmxnepVo,depth=10,body=Historical 94 (batch=0),prevs=['$bqDvvvMj2a4x4FUh_Iy6aA9sejqunlPQxjgDhM9-2CY']",
"event_id=$bqDvvvMj2a4x4FUh_Iy6aA9sejqunlPQxjgDhM9-2CY,depth=10,body=Historical 93 (batch=0),prevs=['$CUhTzLqLabAzjqNbh9_SKSX1Re7z581D7BF90a3jE-0']",
"event_id=$CUhTzLqLabAzjqNbh9_SKSX1Re7z581D7BF90a3jE-0,depth=10,body=Historical 92 (batch=0),prevs=['$3l6A4siERlLreAmXGH1KFagDjb9G8i4_TrxLErZS4FY']",
"event_id=$3l6A4siERlLreAmXGH1KFagDjb9G8i4_TrxLErZS4FY,depth=10,body=Historical 91 (batch=0),prevs=['$BSosTk20sS031k33sDi_kMkrGMVjSUnCzT1wvZo0dcg']",
"event_id=$BSosTk20sS031k33sDi_kMkrGMVjSUnCzT1wvZo0dcg,depth=10,body=Historical 90 (batch=0),prevs=['$XoyyYG9ngSu_sJ_npwDgrwLVQt0E6kDAxW_f0MzaIKs']",
"event_id=$XoyyYG9ngSu_sJ_npwDgrwLVQt0E6kDAxW_f0MzaIKs,depth=10,body=Historical 89 (batch=0),prevs=['$8j7g564Kma7kqrgkqru2Nw21Ez2xZoyqBXtgrwYtbIU']",
"event_id=$8j7g564Kma7kqrgkqru2Nw21Ez2xZoyqBXtgrwYtbIU,depth=10,body=Historical 88 (batch=0),prevs=['$FlIO19qRDZggQ3ZIMd4OhF4kGNpiipB4BR7sqQnG5xU']",
"event_id=$FlIO19qRDZggQ3ZIMd4OhF4kGNpiipB4BR7sqQnG5xU,depth=10,body=Historical 87 (batch=0),prevs=['$reiGLF3R8Q5wqm_KJKOTQGFQ6PHIExRrV1nmB7lw5WA']",
"event_id=$reiGLF3R8Q5wqm_KJKOTQGFQ6PHIExRrV1nmB7lw5WA,depth=10,body=Historical 86 (batch=0),prevs=['$7JRXCFtNfXY_TNZTZSjr7dPnKAMz39E8K2DQfhrxk0s']",
"event_id=$7JRXCFtNfXY_TNZTZSjr7dPnKAMz39E8K2DQfhrxk0s,depth=10,body=Historical 85 (batch=0),prevs=['$8Z6-6uE22VHh3KoN2wGa9SAPhf0_MXPz3y_O2G8A9Bo']",
"event_id=$8Z6-6uE22VHh3KoN2wGa9SAPhf0_MXPz3y_O2G8A9Bo,depth=10,body=Historical 84 (batch=0),prevs=['$CETAr2-SIsfT_exUgUY9El4PL6WOFnr7_6Hv86BuZUQ']",
"event_id=$CETAr2-SIsfT_exUgUY9El4PL6WOFnr7_6Hv86BuZUQ,depth=10,body=Historical 83 (batch=0),prevs=['$dMOfVXcWxuoNS9di9AHyocIzAAucNG2v2aXqZWK7oA0']",
"event_id=$dMOfVXcWxuoNS9di9AHyocIzAAucNG2v2aXqZWK7oA0,depth=10,body=Historical 82 (batch=0),prevs=['$4UjX4-4EejV7e0umXczxoqx9eHMvu2fFDIPGlY4zdrQ']",
"event_id=$4UjX4-4EejV7e0umXczxoqx9eHMvu2fFDIPGlY4zdrQ,depth=10,body=Historical 81 (batch=0),prevs=['$e5d87r41P1lFrfM8iEp3waCi21lKx-bFBTEMhUMDJhE']",
"event_id=$e5d87r41P1lFrfM8iEp3waCi21lKx-bFBTEMhUMDJhE,depth=10,body=Historical 80 (batch=0),prevs=['$ez0-Q4agOvUQbWUELiTJEEJWwZYj-TnaQTnNc3Vil8M']",
"event_id=$ez0-Q4agOvUQbWUELiTJEEJWwZYj-TnaQTnNc3Vil8M,depth=10,body=Historical 79 (batch=0),prevs=['$zaMM-ZtQMADqFNsjrQrl_u0FIjxVHSEbdICkI5kph14']",
"event_id=$zaMM-ZtQMADqFNsjrQrl_u0FIjxVHSEbdICkI5kph14,depth=10,body=Historical 78 (batch=0),prevs=['$jhDwZ4C8aCS7xm0D7xwQYKYXxE9yrnV_jnXWs7yj97A']",
"event_id=$jhDwZ4C8aCS7xm0D7xwQYKYXxE9yrnV_jnXWs7yj97A,depth=10,body=Historical 77 (batch=0),prevs=['$794zi7lECGaZqgi-mVDTuAcCVxQRcasLEWHNQk_T5Qo']",
"event_id=$794zi7lECGaZqgi-mVDTuAcCVxQRcasLEWHNQk_T5Qo,depth=10,body=Historical 76 (batch=0),prevs=['$RYc7Epu2beVamNOISGEPPzYPnqNr8OPpy6srKUDCNaY']",
"event_id=$RYc7Epu2beVamNOISGEPPzYPnqNr8OPpy6srKUDCNaY,depth=10,body=Historical 75 (batch=0),prevs=['$NxzF542rsM0WMKZonV9YxmaJ5PLpVWK1TUfcLFP4VT8']",
"event_id=$NxzF542rsM0WMKZonV9YxmaJ5PLpVWK1TUfcLFP4VT8,depth=10,body=Historical 74 (batch=0),prevs=['$YbcfMO7DOlq6owFILKIGpLSrvpMiDmIp77TCmafFxUU']",
"event_id=$YbcfMO7DOlq6owFILKIGpLSrvpMiDmIp77TCmafFxUU,depth=10,body=Historical 73 (batch=0),prevs=['$RmlFFGojIl8VSc115lgQwk0NeAIAQT7CuLv3ajIv2X0']",
"event_id=$RmlFFGojIl8VSc115lgQwk0NeAIAQT7CuLv3ajIv2X0,depth=10,body=Historical 72 (batch=0),prevs=['$lGGzpQOPdmzBqXIFF5HZfyGQCmXJOnmkZCRFRzxqJkw']",
"event_id=$lGGzpQOPdmzBqXIFF5HZfyGQCmXJOnmkZCRFRzxqJkw,depth=10,body=Historical 71 (batch=0),prevs=['$TcSzi68MSFf1W0843Zi0iRq5vXFs8FhdtI9NfNCY5DM']",
"event_id=$TcSzi68MSFf1W0843Zi0iRq5vXFs8FhdtI9NfNCY5DM,depth=10,body=Historical 70 (batch=0),prevs=['$iKaFgZ_aeN-ZJUNJEYj4WjY31RPm8PXs27n-u2LnlCE']",
"event_id=$iKaFgZ_aeN-ZJUNJEYj4WjY31RPm8PXs27n-u2LnlCE,depth=10,body=Historical 69 (batch=0),prevs=['$n52R-hna5danKau87AHkwXDV5CuUTIZ960gtHr9X8hw']",
"event_id=$n52R-hna5danKau87AHkwXDV5CuUTIZ960gtHr9X8hw,depth=10,body=Historical 68 (batch=0),prevs=['$Fr3wnWXII8LpE3VyF1pLWuLpSCyxu7jC1i4ggMqH1kE']",
"event_id=$Fr3wnWXII8LpE3VyF1pLWuLpSCyxu7jC1i4ggMqH1kE,depth=10,body=Historical 67 (batch=0),prevs=['$ebCIN2TL4fFQeTEahzeX-VCkh_YEohAItvRd6LAVP2E']",
"event_id=$ebCIN2TL4fFQeTEahzeX-VCkh_YEohAItvRd6LAVP2E,depth=10,body=Historical 66 (batch=0),prevs=['$CFeaKxHxgPCSUufJChertFT4au4P9Y1a_tTdN2wmo3Q']",
"event_id=$CFeaKxHxgPCSUufJChertFT4au4P9Y1a_tTdN2wmo3Q,depth=10,body=Historical 65 (batch=0),prevs=['$MctpfuMG5AhhCb9aPRG-4V6VKxxNUzALNLq3BVJKejU']",
"event_id=$MctpfuMG5AhhCb9aPRG-4V6VKxxNUzALNLq3BVJKejU,depth=10,body=Historical 64 (batch=0),prevs=['$ikjtTCZ7KXg1qtwgURuBZ-P5C1RG1oY8U3k2rm9RGxA']",
"event_id=$ikjtTCZ7KXg1qtwgURuBZ-P5C1RG1oY8U3k2rm9RGxA,depth=10,body=Historical 63 (batch=0),prevs=['$KDbI-rBuoAI7rRhtAjcoDY2PbLQ9gDsK5fRts3OihSA']",
"event_id=$KDbI-rBuoAI7rRhtAjcoDY2PbLQ9gDsK5fRts3OihSA,depth=10,body=Historical 62 (batch=0),prevs=['$_ZwqRJxNwgcZn4Trb5nrTjRP8ssQuLDq5ThguCm9KzE']",
"event_id=$_ZwqRJxNwgcZn4Trb5nrTjRP8ssQuLDq5ThguCm9KzE,depth=10,body=Historical 61 (batch=0),prevs=['$hq1xDHEWodibkwlNg73931wjYlD5M29dkFHU0dQB2dk']",
"event_id=$hq1xDHEWodibkwlNg73931wjYlD5M29dkFHU0dQB2dk,depth=10,body=Historical 60 (batch=0),prevs=['$XPRt_CuI_AXJylRQYbQ0ItkRkMy4ey0XxqS7iIdGLfQ']",
"event_id=$XPRt_CuI_AXJylRQYbQ0ItkRkMy4ey0XxqS7iIdGLfQ,depth=10,body=Historical 59 (batch=0),prevs=['$Ucd44nYFkYVe_zs5wEqU5slG74IIPdzq_mqEHinIoIo']",
"event_id=$Ucd44nYFkYVe_zs5wEqU5slG74IIPdzq_mqEHinIoIo,depth=10,body=Historical 58 (batch=0),prevs=['$CtM1TqWoFt3KabPNRKYi1vrpOPGwdpjx-15TpfKgYYA']",
"event_id=$CtM1TqWoFt3KabPNRKYi1vrpOPGwdpjx-15TpfKgYYA,depth=10,body=Historical 57 (batch=0),prevs=['$Jo8T-m9nSs77uF4uFtkd22CifwnvDlr13Fs14NHcCMw']",
"event_id=$Jo8T-m9nSs77uF4uFtkd22CifwnvDlr13Fs14NHcCMw,depth=10,body=Historical 56 (batch=0),prevs=['$WW45KevKriYRET0tOmKk8Ha9fFqxJJS_IC8Ih6I3L2A']",
"event_id=$WW45KevKriYRET0tOmKk8Ha9fFqxJJS_IC8Ih6I3L2A,depth=10,body=Historical 55 (batch=0),prevs=['$G60oGyHZvp-Gim48qnC_epu2JRseKQUCTI5vqZEIbaI']",
"event_id=$G60oGyHZvp-Gim48qnC_epu2JRseKQUCTI5vqZEIbaI,depth=10,body=Historical 54 (batch=0),prevs=['$R9Z6YaR1K9ulUzF9d6-ZL0QwJmwaEj1wTUPHrTJqFUs']",
"event_id=$R9Z6YaR1K9ulUzF9d6-ZL0QwJmwaEj1wTUPHrTJqFUs,depth=10,body=Historical 53 (batch=0),prevs=['$CqedFlSaUBYWSHtkJJYmoc-DnxWCAaKVKOai0u5rawM']",
"event_id=$CqedFlSaUBYWSHtkJJYmoc-DnxWCAaKVKOai0u5rawM,depth=10,body=Historical 52 (batch=0),prevs=['$3Ol33IgZ5lBuVwgELhRBYoFLb6GwkFTha3j6uxvHToY']",
"event_id=$3Ol33IgZ5lBuVwgELhRBYoFLb6GwkFTha3j6uxvHToY,depth=10,body=Historical 51 (batch=0),prevs=['$wUcLTd2pGhliQunqWxFGvT6yiEZrUXA920-hcjaloSw']",
"event_id=$wUcLTd2pGhliQunqWxFGvT6yiEZrUXA920-hcjaloSw,depth=10,body=Historical 50 (batch=0),prevs=['$gaO95ghwbwpGttuqBbhMrZJzz9Z440U7L2WOtDy7Hr8']",
"event_id=$gaO95ghwbwpGttuqBbhMrZJzz9Z440U7L2WOtDy7Hr8,depth=10,body=Historical 49 (batch=0),prevs=['$4TSr_VvZzCV17JYxAob3DN2nQiYDqgW2S_QkW27v7Bg']",
"event_id=$4TSr_VvZzCV17JYxAob3DN2nQiYDqgW2S_QkW27v7Bg,depth=10,body=Historical 48 (batch=0),prevs=['$bJaLResm_4aAwSjZ0POTvtVx4lnV9HKt8HwiYgP21lM']",
"event_id=$bJaLResm_4aAwSjZ0POTvtVx4lnV9HKt8HwiYgP21lM,depth=10,body=Historical 47 (batch=0),prevs=['$BouN8LDmbFWiWo9Wc4wQi48YsC-icXewa05KR7byzhM']",
"event_id=$BouN8LDmbFWiWo9Wc4wQi48YsC-icXewa05KR7byzhM,depth=10,body=Historical 46 (batch=0),prevs=['$n9Cv6EUu7i25OZLCllOE2PU4xjRthDKhkdtp5OtMuVk']",
"event_id=$n9Cv6EUu7i25OZLCllOE2PU4xjRthDKhkdtp5OtMuVk,depth=10,body=Historical 45 (batch=0),prevs=['$MLVpmxVSSRRpxlcTkwIJT3neo7maqOp_ZLvwXRBY8A8']",
"event_id=$MLVpmxVSSRRpxlcTkwIJT3neo7maqOp_ZLvwXRBY8A8,depth=10,body=Historical 44 (batch=0),prevs=['$tNv8Se5-lgfW-9MqE_upeBzq3QSPpsn7qOHz49WFs_c']",
"event_id=$tNv8Se5-lgfW-9MqE_upeBzq3QSPpsn7qOHz49WFs_c,depth=10,body=Historical 43 (batch=0),prevs=['$XCDKybStk9PsquzrY-biUlKOmjk3wTXnsD1htiMdgAM']",
"event_id=$XCDKybStk9PsquzrY-biUlKOmjk3wTXnsD1htiMdgAM,depth=10,body=Historical 42 (batch=0),prevs=['$iUDAE7nT6DQaNJSemwUpqQs8KvKTPFexcBJLTs2-gnY']",
"event_id=$iUDAE7nT6DQaNJSemwUpqQs8KvKTPFexcBJLTs2-gnY,depth=10,body=Historical 41 (batch=0),prevs=['$T8NTrB9vQMLW-a0tT3corPl0g6O3UjGIoaHBjkjCD_w']",
"event_id=$T8NTrB9vQMLW-a0tT3corPl0g6O3UjGIoaHBjkjCD_w,depth=10,body=Historical 40 (batch=0),prevs=['$N7jCLhKYDejMTejtrjJfM2lMRES5OPeowtvN-L4utsE']",
"event_id=$N7jCLhKYDejMTejtrjJfM2lMRES5OPeowtvN-L4utsE,depth=10,body=Historical 39 (batch=0),prevs=['$Oy9aTfjL0LSnbF_6MRq7-5baaEbfxyRTK1kbVGeNoaU']",
"event_id=$Oy9aTfjL0LSnbF_6MRq7-5baaEbfxyRTK1kbVGeNoaU,depth=10,body=Historical 38 (batch=0),prevs=['$V4qFDnqO1LrboSWwCoQpQ4dXLyrc74qZbbsaHxqAj4Q']",
"event_id=$V4qFDnqO1LrboSWwCoQpQ4dXLyrc74qZbbsaHxqAj4Q,depth=10,body=Historical 37 (batch=0),prevs=['$vWdLNDGwj_mBJ6JZ2s01OhsxRuPNSSJAM_bMa6J9Q2c']",
"event_id=$vWdLNDGwj_mBJ6JZ2s01OhsxRuPNSSJAM_bMa6J9Q2c,depth=10,body=Historical 36 (batch=0),prevs=['$JZt2EdPtKJX6f2MMbj_gSEseVAMa-H5r_J_yvfhHs5k']",
"event_id=$JZt2EdPtKJX6f2MMbj_gSEseVAMa-H5r_J_yvfhHs5k,depth=10,body=Historical 35 (batch=0),prevs=['$NPzUfUgNfvkezhUeLmcp2utVA_XnW8YzDqbZlznsEN0']",
"event_id=$NPzUfUgNfvkezhUeLmcp2utVA_XnW8YzDqbZlznsEN0,depth=10,body=Historical 34 (batch=0),prevs=['$NNUjzVtvOSFDYRID_PsMJrUC8gx5p1mPvIoMB7ibDn0']",
"event_id=$NNUjzVtvOSFDYRID_PsMJrUC8gx5p1mPvIoMB7ibDn0,depth=10,body=Historical 33 (batch=0),prevs=['$dONbCTAYR0kOMVSmxOnM5aQ4bgx9PbKza98_e2Lxxw4']",
"event_id=$dONbCTAYR0kOMVSmxOnM5aQ4bgx9PbKza98_e2Lxxw4,depth=10,body=Historical 32 (batch=0),prevs=['$dwxZHePgzbtQMO3caex0O9Zdl-gT3fpWRZD5dJ43JmE']",
"event_id=$dwxZHePgzbtQMO3caex0O9Zdl-gT3fpWRZD5dJ43JmE,depth=10,body=Historical 31 (batch=0),prevs=['$5JOpa9222Y0__S8yfaZBT7ESuRaPeeRz80jleMoa5hE']",
"event_id=$5JOpa9222Y0__S8yfaZBT7ESuRaPeeRz80jleMoa5hE,depth=10,body=Historical 30 (batch=0),prevs=['$7yIEFZZFs91wjKScsjbG854DUOqomPnV4iGG-EDWK6w']",
"event_id=$7yIEFZZFs91wjKScsjbG854DUOqomPnV4iGG-EDWK6w,depth=10,body=Historical 29 (batch=0),prevs=['$9pzIrDRB1cuweDiHaPGB6AtTtGeGEOmqyoP59UAa0pI']",
"event_id=$9pzIrDRB1cuweDiHaPGB6AtTtGeGEOmqyoP59UAa0pI,depth=10,body=Historical 28 (batch=0),prevs=['$EBu0Y6-OdqNUumOlHK__K2eXsN8mAYV21eCRKwGmkxU']",
"event_id=$EBu0Y6-OdqNUumOlHK__K2eXsN8mAYV21eCRKwGmkxU,depth=10,body=Historical 27 (batch=0),prevs=['$95FzYeNZk31wyfaCojognGOAkzLhHLrv4_j3eoJawwU']",
"event_id=$95FzYeNZk31wyfaCojognGOAkzLhHLrv4_j3eoJawwU,depth=10,body=Historical 26 (batch=0),prevs=['$QDGDnSNRXjNZG2lia2gjeD1aEfgfZ0gxI1BzIgjyZq8']",
"event_id=$QDGDnSNRXjNZG2lia2gjeD1aEfgfZ0gxI1BzIgjyZq8,depth=10,body=Historical 25 (batch=0),prevs=['$tf1GB8ydPyNTNAaGwcTUXaTOSCmNohK6e6MmOnFwrJA']",
"event_id=$tf1GB8ydPyNTNAaGwcTUXaTOSCmNohK6e6MmOnFwrJA,depth=10,body=Historical 24 (batch=0),prevs=['$n40ks3dofH6DioQlfe84n3exnYrboy8GHHYJ_qBFJMg']",
"event_id=$n40ks3dofH6DioQlfe84n3exnYrboy8GHHYJ_qBFJMg,depth=10,body=Historical 23 (batch=0),prevs=['$xl8xG3MJiiNP21WNFmDLxOR8Rhy_FLws0snsmDUoAYQ']",
"event_id=$xl8xG3MJiiNP21WNFmDLxOR8Rhy_FLws0snsmDUoAYQ,depth=10,body=Historical 22 (batch=0),prevs=['$6MxFONk8t5shoQpjjZyxd0ypmfj76LPs9hWKkPAxMcI']",
"event_id=$6MxFONk8t5shoQpjjZyxd0ypmfj76LPs9hWKkPAxMcI,depth=10,body=Historical 21 (batch=0),prevs=['$XAAn4gMQe4ShIZKvZntEUBRljDM4IxHDVeNOXp3K2Bk']",
"event_id=$XAAn4gMQe4ShIZKvZntEUBRljDM4IxHDVeNOXp3K2Bk,depth=10,body=Historical 20 (batch=0),prevs=['$Gj3RlKLUMb6hI_JyXdfwuoneWDs1b63qF7WdYYiNDG0']",
"event_id=$Gj3RlKLUMb6hI_JyXdfwuoneWDs1b63qF7WdYYiNDG0,depth=10,body=Historical 19 (batch=0),prevs=['$yiRe3l3_APWuZt1wfFBxXQp2orQJZJvwv3yk4QNiPxo']",
"event_id=$yiRe3l3_APWuZt1wfFBxXQp2orQJZJvwv3yk4QNiPxo,depth=10,body=Historical 18 (batch=0),prevs=['$v04Ud2zPqFe5M3jPbiLrqQ6r_QXgFlmRTMMLyVvAsN8']",
"event_id=$v04Ud2zPqFe5M3jPbiLrqQ6r_QXgFlmRTMMLyVvAsN8,depth=10,body=Historical 17 (batch=0),prevs=['$tO5NiLH2mPBIMRVmrTIza6CUv7v6R0e_tgj0ZKEtpG0']",
"event_id=$tO5NiLH2mPBIMRVmrTIza6CUv7v6R0e_tgj0ZKEtpG0,depth=10,body=Historical 16 (batch=0),prevs=['$fyQ-akREpz3vpQNqTZ47yxAs_APAw2L_bQ1iAudsPWk']",
"event_id=$fyQ-akREpz3vpQNqTZ47yxAs_APAw2L_bQ1iAudsPWk,depth=10,body=Historical 15 (batch=0),prevs=['$qddW2HRZA0BudaIWuun6Odt6wDbz7ETRJmSY8wtjMnY']",
"event_id=$qddW2HRZA0BudaIWuun6Odt6wDbz7ETRJmSY8wtjMnY,depth=10,body=Historical 14 (batch=0),prevs=['$fxl98r0B-sa2T8LDR2q6Wi01Zw6xCPZB5FcMf5x_vxI']",
"event_id=$fxl98r0B-sa2T8LDR2q6Wi01Zw6xCPZB5FcMf5x_vxI,depth=10,body=Historical 13 (batch=0),prevs=['$1PML_QTo1MK_EuUz3OYyc2vDjfGKKYt-0sUSN9jTeHs']",
"event_id=$1PML_QTo1MK_EuUz3OYyc2vDjfGKKYt-0sUSN9jTeHs,depth=10,body=Historical 12 (batch=0),prevs=['$YTz-q29BhUU_Ox7_CR7gao1v7mmMqLwbz51WWI0CjHs']",
"event_id=$YTz-q29BhUU_Ox7_CR7gao1v7mmMqLwbz51WWI0CjHs,depth=10,body=Historical 11 (batch=0),prevs=['$Y3HUk4SiCWUrV5V_ZUcwC1IkVZEPM3V8oGWrWKRcv3I']",
"event_id=$Y3HUk4SiCWUrV5V_ZUcwC1IkVZEPM3V8oGWrWKRcv3I,depth=10,body=Historical 10 (batch=0),prevs=['$uV5daep6tIdbImy2XEIxdQIuGYc547ulzxMplDyBWfY']",
"event_id=$uV5daep6tIdbImy2XEIxdQIuGYc547ulzxMplDyBWfY,depth=10,body=Historical 9 (batch=0),prevs=['$bVKZ6uRROzC7aNcZc9cUsfhHl5dU_-Vm6Qz5V9X8GsI']",
"event_id=$bVKZ6uRROzC7aNcZc9cUsfhHl5dU_-Vm6Qz5V9X8GsI,depth=10,body=Historical 8 (batch=0),prevs=['$6zjql7LGgIa3gFpf9owZsKWeFU4FoMUKDtVPpMo7xsM']",
"event_id=$6zjql7LGgIa3gFpf9owZsKWeFU4FoMUKDtVPpMo7xsM,depth=10,body=Historical 7 (batch=0),prevs=['$w5t7UuOHrrsfZRebkX4adeEeJpPPGv9y6RyhKpxToMc']",
"event_id=$w5t7UuOHrrsfZRebkX4adeEeJpPPGv9y6RyhKpxToMc,depth=10,body=Historical 6 (batch=0),prevs=['$649goNxH4B0DMta75_xs_TTib6C268A2JiUHvpUMu8g']",
"event_id=$649goNxH4B0DMta75_xs_TTib6C268A2JiUHvpUMu8g,depth=10,body=Historical 5 (batch=0),prevs=['$mtUwpP0KSNwsn73yxBfQ7imKUe955v_SvI427PC5y2I']",
"event_id=$9JuhSj0h0AbHvky0T3tSRfq_lxg1k2LTHY-J-MW6FfA,depth=9,body=Message 1 (eventIDsBefore),prevs=['$FcPmU5Fjg57eO_2J4VOK9jOcqRclEED5B9i1FsHNjaE']"
]
```
2021-10-29 15:34:38 -05:00
Eric Eastwood
fb8e2814f1
Fix direction of fake edges
...
- batch -> insertion fake edge
- Connecting insertion events' `prev_events` successors -> insertion event
---
- batch -> insertion fake edge
- Connecting insertion events' `prev_events` successors -> insertion event
```
backfill sorted_events=[
"event_id=$RQU5oBY9oHveDdx1X4FZs6BWzBqrGnbxQCZfNF4OEmw,depth=11,body=Message 1 (eventIDsAfter),prevs=['$44dIgrZ6WEBaxnCxiulvFQmLRlgIF2c2LHxwVZ39BhY']",
"event_id=$44dIgrZ6WEBaxnCxiulvFQmLRlgIF2c2LHxwVZ39BhY,depth=10,body=Message 0 (eventIDsAfter),prevs=['$G00qI6L-Jem6u0rM73WAgtl3e27WFREG_IqXBK3rBVY']",
"event_id=$Bb7NKUT_EJEIYJucAJvsm3IGWOHPV5HjT9sFBH4cgJ0,depth=10,body=org.matrix.msc2716.insertion,prevs=['$G00qI6L-Jem6u0rM73WAgtl3e27WFREG_IqXBK3rBVY']",
"event_id=$DD2ibvlCDuylHLA5XHpzbWgplgANwmvy_qRGIz6obgU,depth=10,body=org.matrix.msc2716.batch,prevs=['$JfIXG5RA3SubwPx3qekrP7p7TL84M-EMXyrWUPGEJqE']",
"event_id=$JfIXG5RA3SubwPx3qekrP7p7TL84M-EMXyrWUPGEJqE,depth=10,body=Historical 99 (batch=0),prevs=['$JMMtj_q0q-o3sgMjGtUDot_vjIBS1fu7pMFIVIKW8XU']",
"event_id=$JMMtj_q0q-o3sgMjGtUDot_vjIBS1fu7pMFIVIKW8XU,depth=10,body=Historical 98 (batch=0),prevs=['$lCpKjiG2aZzjSvL4mu3BijwjsuGADKfP6CmB6S_9TeI']",
"event_id=$lCpKjiG2aZzjSvL4mu3BijwjsuGADKfP6CmB6S_9TeI,depth=10,body=Historical 97 (batch=0),prevs=['$2e-t0QWqLfVJz2fdwbwAuT7HpT2awCyFhtR35VPUx0Q']",
"event_id=$2e-t0QWqLfVJz2fdwbwAuT7HpT2awCyFhtR35VPUx0Q,depth=10,body=Historical 96 (batch=0),prevs=['$3tMaM3-QgXlRaGWzkcKg8VOooUETwADMmvC8LgPHi3k']",
"event_id=$3tMaM3-QgXlRaGWzkcKg8VOooUETwADMmvC8LgPHi3k,depth=10,body=Historical 95 (batch=0),prevs=['$sWNiiKCpV6jaMOBrJPKSnmhfm1HvzQX5reT9cNGTgkk']",
"event_id=$sWNiiKCpV6jaMOBrJPKSnmhfm1HvzQX5reT9cNGTgkk,depth=10,body=Historical 94 (batch=0),prevs=['$b23cNluaxei15QPBanvua5F690RJdnL4yCq-3MAbKyc']",
"event_id=$b23cNluaxei15QPBanvua5F690RJdnL4yCq-3MAbKyc,depth=10,body=Historical 93 (batch=0),prevs=['$mlWvqR2MWITXVBZfeVLcujmVAzBvkkDdP6oSz3eSwUg']",
"event_id=$mlWvqR2MWITXVBZfeVLcujmVAzBvkkDdP6oSz3eSwUg,depth=10,body=Historical 92 (batch=0),prevs=['$wlVdFpoXlPWoajb33gizlhlft5k-tVwGUpmMsmcoHPU']",
"event_id=$wlVdFpoXlPWoajb33gizlhlft5k-tVwGUpmMsmcoHPU,depth=10,body=Historical 91 (batch=0),prevs=['$v6VMFCnyQkl16tZCVu7J_-Nst_NRXXaQd2efn2TUpEE']",
"event_id=$v6VMFCnyQkl16tZCVu7J_-Nst_NRXXaQd2efn2TUpEE,depth=10,body=Historical 90 (batch=0),prevs=['$ooH_Jq5JLVIkIB9TpsltyHtqtn7KNxDIc_xYUcBUsAA']",
"event_id=$ooH_Jq5JLVIkIB9TpsltyHtqtn7KNxDIc_xYUcBUsAA,depth=10,body=Historical 89 (batch=0),prevs=['$iK_6DSB9OgXzFNQ1qEZo_42ifWrX1xwUKs_qFKZT8Uo']",
"event_id=$iK_6DSB9OgXzFNQ1qEZo_42ifWrX1xwUKs_qFKZT8Uo,depth=10,body=Historical 88 (batch=0),prevs=['$LKnAV4et1stXQRkd_dg0XOK5kNXFyFYQOgx5wdSQB34']",
"event_id=$LKnAV4et1stXQRkd_dg0XOK5kNXFyFYQOgx5wdSQB34,depth=10,body=Historical 87 (batch=0),prevs=['$vvtLzYBovfNjm-aU5o5JF6TumBAzrBbzrMVrqA43cmE']",
"event_id=$vvtLzYBovfNjm-aU5o5JF6TumBAzrBbzrMVrqA43cmE,depth=10,body=Historical 86 (batch=0),prevs=['$yYyBW-D_3XN6aYyXeRJKQYN1hJyswh9kUe2Q3kk_auA']",
"event_id=$yYyBW-D_3XN6aYyXeRJKQYN1hJyswh9kUe2Q3kk_auA,depth=10,body=Historical 85 (batch=0),prevs=['$_1yK-Gzkabr_ZKMRFHlJMat943MjCznY2YN2WPExrtY']",
"event_id=$_1yK-Gzkabr_ZKMRFHlJMat943MjCznY2YN2WPExrtY,depth=10,body=Historical 84 (batch=0),prevs=['$CZSLI1NUX9gWptZT_i52oyCfQpH5rOlPFSgmSjD4a-Q']",
"event_id=$CZSLI1NUX9gWptZT_i52oyCfQpH5rOlPFSgmSjD4a-Q,depth=10,body=Historical 83 (batch=0),prevs=['$093Wua4ZaJLX4uRYuL89y3t47jntwceo0ReVGM-_WNE']",
"event_id=$093Wua4ZaJLX4uRYuL89y3t47jntwceo0ReVGM-_WNE,depth=10,body=Historical 82 (batch=0),prevs=['$wA7OKTWe6BMbXustd4WBLTJ2fBIY4RLeOstoKaaiIwg']",
"event_id=$wA7OKTWe6BMbXustd4WBLTJ2fBIY4RLeOstoKaaiIwg,depth=10,body=Historical 81 (batch=0),prevs=['$ZUVoXb9Or3HAeZVM5nKYUp1-mcizUyGuQHuUaRTEf8s']",
"event_id=$ZUVoXb9Or3HAeZVM5nKYUp1-mcizUyGuQHuUaRTEf8s,depth=10,body=Historical 80 (batch=0),prevs=['$ul_NFiXrTv6S-YseztgF5fpKx-_gXeQ7C9XF_TdcCqM']",
"event_id=$ul_NFiXrTv6S-YseztgF5fpKx-_gXeQ7C9XF_TdcCqM,depth=10,body=Historical 79 (batch=0),prevs=['$9zzm0Mr6wn2W5EKl7t0AmGqJntslGV9Telo6rP9DeZg']",
"event_id=$9zzm0Mr6wn2W5EKl7t0AmGqJntslGV9Telo6rP9DeZg,depth=10,body=Historical 78 (batch=0),prevs=['$LsfJ_IpS4y1mWjdLFsod16JBS2B2j0XO3BCMEtXaigk']",
"event_id=$LsfJ_IpS4y1mWjdLFsod16JBS2B2j0XO3BCMEtXaigk,depth=10,body=Historical 77 (batch=0),prevs=['$hfdqS5ARU7roPsWgGS8RXsog_m0P7vOc1UMdmKju0aw']",
"event_id=$hfdqS5ARU7roPsWgGS8RXsog_m0P7vOc1UMdmKju0aw,depth=10,body=Historical 76 (batch=0),prevs=['$h4ZA91X45b8aNuMjz_xC1457mw2h6_MTSqvv6MVH8tU']",
"event_id=$h4ZA91X45b8aNuMjz_xC1457mw2h6_MTSqvv6MVH8tU,depth=10,body=Historical 75 (batch=0),prevs=['$qvxKJlvqC0gaRP7mRjO-yMD4Zzt42dkd7dqZSs-v-Fk']",
"event_id=$qvxKJlvqC0gaRP7mRjO-yMD4Zzt42dkd7dqZSs-v-Fk,depth=10,body=Historical 74 (batch=0),prevs=['$kgMcrid7-aqUIzDzjouB3HQKIGh2h-6Iop6WK08KCkc']",
"event_id=$kgMcrid7-aqUIzDzjouB3HQKIGh2h-6Iop6WK08KCkc,depth=10,body=Historical 73 (batch=0),prevs=['$_ssYYwoWm7OOjhYwkZxQKOMq7maygenjjLJBypuA3N8']",
"event_id=$_ssYYwoWm7OOjhYwkZxQKOMq7maygenjjLJBypuA3N8,depth=10,body=Historical 72 (batch=0),prevs=['$1OAjmvRdC67suR_wlrgbQDzOFJZxAnE4RZyKt4Khq9M']",
"event_id=$1OAjmvRdC67suR_wlrgbQDzOFJZxAnE4RZyKt4Khq9M,depth=10,body=Historical 71 (batch=0),prevs=['$1cpjOXZwqsZzZ643qAkcnEc3Mjgl1n_WPfeVaovxE0g']",
"event_id=$1cpjOXZwqsZzZ643qAkcnEc3Mjgl1n_WPfeVaovxE0g,depth=10,body=Historical 70 (batch=0),prevs=['$qYsfdlkVwJDtvjGHQtJATjglCIUzj11Cu7Kt70Qpa00']",
"event_id=$qYsfdlkVwJDtvjGHQtJATjglCIUzj11Cu7Kt70Qpa00,depth=10,body=Historical 69 (batch=0),prevs=['$xwkLzZQX2w1rS9IbSburCCNy9g_3GA5cxR2Dd1AiDEo']",
"event_id=$xwkLzZQX2w1rS9IbSburCCNy9g_3GA5cxR2Dd1AiDEo,depth=10,body=Historical 68 (batch=0),prevs=['$RUjVghSfYx0Rz-HMW7pFUjVL7gjnDh5FhrzmizwRSg4']",
"event_id=$RUjVghSfYx0Rz-HMW7pFUjVL7gjnDh5FhrzmizwRSg4,depth=10,body=Historical 67 (batch=0),prevs=['$xFM3GD0jHQ2sV_w-m996lYIj6bBy3e4zoo4zba7KK94']",
"event_id=$xFM3GD0jHQ2sV_w-m996lYIj6bBy3e4zoo4zba7KK94,depth=10,body=Historical 66 (batch=0),prevs=['$P9rG_KsdrP29_nrUhVNwDXxEj6TtcAHYMiEPjTECuyI']",
"event_id=$P9rG_KsdrP29_nrUhVNwDXxEj6TtcAHYMiEPjTECuyI,depth=10,body=Historical 65 (batch=0),prevs=['$fG9vXCIp3ymBUSQGfxuQyHjXvwfaz0i-Al5PZER5q6Y']",
"event_id=$fG9vXCIp3ymBUSQGfxuQyHjXvwfaz0i-Al5PZER5q6Y,depth=10,body=Historical 64 (batch=0),prevs=['$ZppkvSCfh7zKOSOIaAzzOM13xzO3c46HlvAt1ogqxSI']",
"event_id=$ZppkvSCfh7zKOSOIaAzzOM13xzO3c46HlvAt1ogqxSI,depth=10,body=Historical 63 (batch=0),prevs=['$XJgjPkRjlTh04CAXr_7doyRn9uP6Q2BRBS5ogIxxgq4']",
"event_id=$XJgjPkRjlTh04CAXr_7doyRn9uP6Q2BRBS5ogIxxgq4,depth=10,body=Historical 62 (batch=0),prevs=['$iiC9E-Xbw8DqYLkca_3SYXKP0fyjAO3Rulzl_UMlg_U']",
"event_id=$iiC9E-Xbw8DqYLkca_3SYXKP0fyjAO3Rulzl_UMlg_U,depth=10,body=Historical 61 (batch=0),prevs=['$JQrY-1YX4u1WLM8pf-YV45wOig2GZmXyLRzQd16lNRY']",
"event_id=$JQrY-1YX4u1WLM8pf-YV45wOig2GZmXyLRzQd16lNRY,depth=10,body=Historical 60 (batch=0),prevs=['$EZwD8zE9aSg6UYGfT93gAB22vf1EbG2m4rXNWYtDoMM']",
"event_id=$EZwD8zE9aSg6UYGfT93gAB22vf1EbG2m4rXNWYtDoMM,depth=10,body=Historical 59 (batch=0),prevs=['$MXdmxSkN7gpzy28Rg6Ond0DyVu4a6_NA2PAEh2RGhWE']",
"event_id=$MXdmxSkN7gpzy28Rg6Ond0DyVu4a6_NA2PAEh2RGhWE,depth=10,body=Historical 58 (batch=0),prevs=['$3qKPpnyChlt2O24cqwF2zHORIvm4zbVwugRtKxkAQAo']",
"event_id=$3qKPpnyChlt2O24cqwF2zHORIvm4zbVwugRtKxkAQAo,depth=10,body=Historical 57 (batch=0),prevs=['$fZwZ3KIY2HpkBh_-GX762uJlvSDjKx_jkKBmO4XMXbU']",
"event_id=$fZwZ3KIY2HpkBh_-GX762uJlvSDjKx_jkKBmO4XMXbU,depth=10,body=Historical 56 (batch=0),prevs=['$6S5Ni1dMs9cIWmlGAToAXq9HD19IC3VzPsA6Mpv-99k']",
"event_id=$6S5Ni1dMs9cIWmlGAToAXq9HD19IC3VzPsA6Mpv-99k,depth=10,body=Historical 55 (batch=0),prevs=['$H_iqXiAxOxF6cEFG8uBIOA4daNZRS-n5BkyIO2TJB1M']",
"event_id=$H_iqXiAxOxF6cEFG8uBIOA4daNZRS-n5BkyIO2TJB1M,depth=10,body=Historical 54 (batch=0),prevs=['$M_jaKYkmwpIOh5WbYKo7OABADOIde2GL_UpYgy5DKJE']",
"event_id=$M_jaKYkmwpIOh5WbYKo7OABADOIde2GL_UpYgy5DKJE,depth=10,body=Historical 53 (batch=0),prevs=['$_tY_1OYdYB2e4mX0psdoZXQqbr_nJvdxNErra3vIRHw']",
"event_id=$_tY_1OYdYB2e4mX0psdoZXQqbr_nJvdxNErra3vIRHw,depth=10,body=Historical 52 (batch=0),prevs=['$8x0ZzHjqduS1SlqKk1F6x1G71bKCFPWbx0nYU90GS8g']",
"event_id=$8x0ZzHjqduS1SlqKk1F6x1G71bKCFPWbx0nYU90GS8g,depth=10,body=Historical 51 (batch=0),prevs=['$hYNHRnZ2AktMkxjbiPP_yofAOMmRJLy4nN5K-81-yj8']",
"event_id=$hYNHRnZ2AktMkxjbiPP_yofAOMmRJLy4nN5K-81-yj8,depth=10,body=Historical 50 (batch=0),prevs=['$Aje2Qa0CHNWiAw1HiK-1djoycAhh4UliroN1vAdKIU4']",
"event_id=$Aje2Qa0CHNWiAw1HiK-1djoycAhh4UliroN1vAdKIU4,depth=10,body=Historical 49 (batch=0),prevs=['$hbkSA7qbBPpEQH77YE2h-XKVgS3qhI3xse3Yg08smuc']",
"event_id=$hbkSA7qbBPpEQH77YE2h-XKVgS3qhI3xse3Yg08smuc,depth=10,body=Historical 48 (batch=0),prevs=['$N80_1es0l8LAcvslhrbTOddyQ76W3_VLPnXnG5IBEn4']",
"event_id=$N80_1es0l8LAcvslhrbTOddyQ76W3_VLPnXnG5IBEn4,depth=10,body=Historical 47 (batch=0),prevs=['$rvz1DpQx9HZLbHgZj5Jq3TVoH1WComOP6AWbytDKClQ']",
"event_id=$rvz1DpQx9HZLbHgZj5Jq3TVoH1WComOP6AWbytDKClQ,depth=10,body=Historical 46 (batch=0),prevs=['$a6ifNO0AizTsP4HnVPD3Zkuqvo-8PnarenXKDUJZvGE']",
"event_id=$a6ifNO0AizTsP4HnVPD3Zkuqvo-8PnarenXKDUJZvGE,depth=10,body=Historical 45 (batch=0),prevs=['$1WL7whQmdncf8CJ5l38dn_J8PVztPTNNMNS82gltKhw']",
"event_id=$1WL7whQmdncf8CJ5l38dn_J8PVztPTNNMNS82gltKhw,depth=10,body=Historical 44 (batch=0),prevs=['$yCLNJyVjv2ti71ORpJI1wuyiWWOCG857If5M24eK2c4']",
"event_id=$yCLNJyVjv2ti71ORpJI1wuyiWWOCG857If5M24eK2c4,depth=10,body=Historical 43 (batch=0),prevs=['$LV_gqx1bl9NHYdifp_v5JA1QE79nwblPe9dY_MKWuFo']",
"event_id=$LV_gqx1bl9NHYdifp_v5JA1QE79nwblPe9dY_MKWuFo,depth=10,body=Historical 42 (batch=0),prevs=['$TT41-KXnRahtw3bBlgFkaLEvnGtC7BPispoy9LVoSTE']",
"event_id=$TT41-KXnRahtw3bBlgFkaLEvnGtC7BPispoy9LVoSTE,depth=10,body=Historical 41 (batch=0),prevs=['$X0wtHayfehEhB59jCSI2NSX5LSdgQfMYBy5D5IXerrg']",
"event_id=$X0wtHayfehEhB59jCSI2NSX5LSdgQfMYBy5D5IXerrg,depth=10,body=Historical 40 (batch=0),prevs=['$ERk1O6FQFNndKxopemlDrzWV_SZ9zvPaK-7cDWc9hOo']",
"event_id=$ERk1O6FQFNndKxopemlDrzWV_SZ9zvPaK-7cDWc9hOo,depth=10,body=Historical 39 (batch=0),prevs=['$8EltMIaFXj0HYOUsfGwDXs6--yrfI5NvQHbv8okNMbI']",
"event_id=$8EltMIaFXj0HYOUsfGwDXs6--yrfI5NvQHbv8okNMbI,depth=10,body=Historical 38 (batch=0),prevs=['$8S8FjedOebUYwPFtb7vb-ZzMeYDp7vJRk-OUzau1RlY']",
"event_id=$8S8FjedOebUYwPFtb7vb-ZzMeYDp7vJRk-OUzau1RlY,depth=10,body=Historical 37 (batch=0),prevs=['$s06MJYSVrGYW73z6hpTeCPDxnuFLkJXWvyym-4RqTXg']",
"event_id=$s06MJYSVrGYW73z6hpTeCPDxnuFLkJXWvyym-4RqTXg,depth=10,body=Historical 36 (batch=0),prevs=['$fXsHFdVTchw-xmD41v9KC2ZxC5j6-VYRHGdRTw4AxRQ']",
"event_id=$fXsHFdVTchw-xmD41v9KC2ZxC5j6-VYRHGdRTw4AxRQ,depth=10,body=Historical 35 (batch=0),prevs=['$ETgS3ZdUq57PzCK0ki-oV21XqFBs1nSgv6CHVl1nddw']",
"event_id=$ETgS3ZdUq57PzCK0ki-oV21XqFBs1nSgv6CHVl1nddw,depth=10,body=Historical 34 (batch=0),prevs=['$GyrVy70TxEH3ARdy1tf-ZuxyWTqY8M4GeD-e0O4bXTs']",
"event_id=$GyrVy70TxEH3ARdy1tf-ZuxyWTqY8M4GeD-e0O4bXTs,depth=10,body=Historical 33 (batch=0),prevs=['$etOVbOEtwqS-iLZfOWwAWeaf7Nq4h6B0aLTcsL3Fqb4']",
"event_id=$etOVbOEtwqS-iLZfOWwAWeaf7Nq4h6B0aLTcsL3Fqb4,depth=10,body=Historical 32 (batch=0),prevs=['$jkugW9wPO5-ZTu3pulbPyYUs7MT08q24rSit47W2aiE']",
"event_id=$jkugW9wPO5-ZTu3pulbPyYUs7MT08q24rSit47W2aiE,depth=10,body=Historical 31 (batch=0),prevs=['$xl5SAerMsKP7xYH7e9B0QyjNGVu1zYN037WcMl6eM7I']",
"event_id=$xl5SAerMsKP7xYH7e9B0QyjNGVu1zYN037WcMl6eM7I,depth=10,body=Historical 30 (batch=0),prevs=['$epCIEu5hsIrjVfAQ8xwG_w7l2L_GVswFGlOgvKuBOv4']",
"event_id=$epCIEu5hsIrjVfAQ8xwG_w7l2L_GVswFGlOgvKuBOv4,depth=10,body=Historical 29 (batch=0),prevs=['$W-r7mxy0Yaj7M33JPu3WwCGHZ4zy-r_UsuuSiSbaBNI']",
"event_id=$W-r7mxy0Yaj7M33JPu3WwCGHZ4zy-r_UsuuSiSbaBNI,depth=10,body=Historical 28 (batch=0),prevs=['$j4NztVmkOMiN4_drb1Hm0EOEh5kDM1r7Vo1jKPlz5iY']",
"event_id=$j4NztVmkOMiN4_drb1Hm0EOEh5kDM1r7Vo1jKPlz5iY,depth=10,body=Historical 27 (batch=0),prevs=['$QhtQWlhor0qS81fOCmF2UmYSZXrCY2YabQ3Ysk1pvQ8']",
"event_id=$QhtQWlhor0qS81fOCmF2UmYSZXrCY2YabQ3Ysk1pvQ8,depth=10,body=Historical 26 (batch=0),prevs=['$ICyGlEHUQ2VNNkGL8KfN5v9rbuLZzYQ_LmH-XpKXi-w']",
"event_id=$ICyGlEHUQ2VNNkGL8KfN5v9rbuLZzYQ_LmH-XpKXi-w,depth=10,body=Historical 25 (batch=0),prevs=['$4WvejXMuOtnrR_npONQHcEptKDb7oeAdzlguCFafXw8']",
"event_id=$4WvejXMuOtnrR_npONQHcEptKDb7oeAdzlguCFafXw8,depth=10,body=Historical 24 (batch=0),prevs=['$1dQvQ9CXC8jvDir8Qv_qWD1P6669n5Dt2e9MQzWMmus']",
"event_id=$1dQvQ9CXC8jvDir8Qv_qWD1P6669n5Dt2e9MQzWMmus,depth=10,body=Historical 23 (batch=0),prevs=['$VqYi4klnvQoQapuwcRhVOGpnd8b5JZbhpr0J8bIVq6s']",
"event_id=$VqYi4klnvQoQapuwcRhVOGpnd8b5JZbhpr0J8bIVq6s,depth=10,body=Historical 22 (batch=0),prevs=['$caikDgtNzU_-uPQvliFV0LaXeD5KxfT42bbYT-tBuz4']",
"event_id=$caikDgtNzU_-uPQvliFV0LaXeD5KxfT42bbYT-tBuz4,depth=10,body=Historical 21 (batch=0),prevs=['$tAmrVFwIE67VdJdTELUy9dCLX7UnwEQWJQ0szLMLj1I']",
"event_id=$tAmrVFwIE67VdJdTELUy9dCLX7UnwEQWJQ0szLMLj1I,depth=10,body=Historical 20 (batch=0),prevs=['$moO383nMlO3xQcIcBJRa1ob23aKG_3BboL0VzaEuV9M']",
"event_id=$moO383nMlO3xQcIcBJRa1ob23aKG_3BboL0VzaEuV9M,depth=10,body=Historical 19 (batch=0),prevs=['$1ZC20pJmFEnjdsp1WeF3Vb786YGxRUN7lVgBuGtbTh0']",
"event_id=$1ZC20pJmFEnjdsp1WeF3Vb786YGxRUN7lVgBuGtbTh0,depth=10,body=Historical 18 (batch=0),prevs=['$CR5eEOqcjN4M-V4z4pmcGuj4DDZvIXsXJuCGKFCL2bo']",
"event_id=$CR5eEOqcjN4M-V4z4pmcGuj4DDZvIXsXJuCGKFCL2bo,depth=10,body=Historical 17 (batch=0),prevs=['$5Nt4QouUaxCemiakDvgSau0Awaq2eLiuf_zAotPHrEk']",
"event_id=$5Nt4QouUaxCemiakDvgSau0Awaq2eLiuf_zAotPHrEk,depth=10,body=Historical 16 (batch=0),prevs=['$bQGGb7wF69JaRvAgcy8YXA--vZxVwIFoQwBxz1JNcc0']",
"event_id=$bQGGb7wF69JaRvAgcy8YXA--vZxVwIFoQwBxz1JNcc0,depth=10,body=Historical 15 (batch=0),prevs=['$5NTrpJdUTplsV5Pv0h81f10Od7r8b7MByhNP-Hgo5XI']",
"event_id=$5NTrpJdUTplsV5Pv0h81f10Od7r8b7MByhNP-Hgo5XI,depth=10,body=Historical 14 (batch=0),prevs=['$RlE8jSspaoHviQ64oGYupPalY6iiEOfm6SVKxCFcj5Q']",
"event_id=$RlE8jSspaoHviQ64oGYupPalY6iiEOfm6SVKxCFcj5Q,depth=10,body=Historical 13 (batch=0),prevs=['$fAjxrhPzB4YdRFSVUrY4dyUX2rs_Og61PlIxutf4cPw']",
"event_id=$fAjxrhPzB4YdRFSVUrY4dyUX2rs_Og61PlIxutf4cPw,depth=10,body=Historical 12 (batch=0),prevs=['$AiIInms6FQzl0GHYZw38stEFC72Bl9uoW5r7sLBOdiw']",
"event_id=$AiIInms6FQzl0GHYZw38stEFC72Bl9uoW5r7sLBOdiw,depth=10,body=Historical 11 (batch=0),prevs=['$l5uuVWnK1HYmBpL-X8XGLG-0FzXmrAVDAdFojpD_BnY']",
"event_id=$l5uuVWnK1HYmBpL-X8XGLG-0FzXmrAVDAdFojpD_BnY,depth=10,body=Historical 10 (batch=0),prevs=['$bq2Cmy1rMLmJRWRek0azb5SE-CBPj-QJ1GB2F6X6pos']",
"event_id=$bq2Cmy1rMLmJRWRek0azb5SE-CBPj-QJ1GB2F6X6pos,depth=10,body=Historical 9 (batch=0),prevs=['$fNL5PyiTg-FuQaq3rBdqAzVLev7MPo89u5nUGdP5CdY']",
"event_id=$fNL5PyiTg-FuQaq3rBdqAzVLev7MPo89u5nUGdP5CdY,depth=10,body=Historical 8 (batch=0),prevs=['$FZvdy85_rIB-TgSq2irIGp8TPz3vt3DdEsTlmklxHfE']",
"event_id=$FZvdy85_rIB-TgSq2irIGp8TPz3vt3DdEsTlmklxHfE,depth=10,body=Historical 7 (batch=0),prevs=['$gibUQn3wnIHPf2CzXr4rVaDd0ozucmpZLTXi69kT4v0']",
"event_id=$gibUQn3wnIHPf2CzXr4rVaDd0ozucmpZLTXi69kT4v0,depth=10,body=Historical 6 (batch=0),prevs=['$EtLYRN3xJoYCG2f6l3ZNzeFDBVgT0sJSO-5_CWfk62E']",
"event_id=$G00qI6L-Jem6u0rM73WAgtl3e27WFREG_IqXBK3rBVY,depth=9,body=Message 1 (eventIDsBefore),prevs=['$E9W0RVZ5jf054fUIQPlls4AXPlFcS5sF6iSwdsgpEZ0']",
"event_id=$EtLYRN3xJoYCG2f6l3ZNzeFDBVgT0sJSO-5_CWfk62E,depth=10,body=Historical 5 (batch=0),prevs=['$6f7SVRgiDAaiqWanvIsjBfJieMdK8fP_t8qalpWDTKo']"
]
```
When only connecting batch -> insertion event:
- batch -> insertion fake edge
```
backfill sorted_events=[
"event_id=$vDdCr0f90ey6Pjpw8Ugl2HQf09Rww5x_M8LanATK8VM,depth=10,body=org.matrix.msc2716.insertion,prevs=['$n9kq5qDGfNxKw7_Cb8kIC-9BrQ0Kg_sTWn9_nLwovA4']",
"event_id=$h9x6BgpQVHF8Jr33ovBjTxDvXYuR6aNyxw2sKWKqu5U,depth=10,body=org.matrix.msc2716.batch,prevs=['$KU7hS3FmvoQaZkOjdWqyuBqBwFvcWdqJEbKvsXAxWgg']",
"event_id=$KU7hS3FmvoQaZkOjdWqyuBqBwFvcWdqJEbKvsXAxWgg,depth=10,body=Historical 99 (batch=0),prevs=['$N0bxYWNt4qrh3B4ns78nzD_BRSFzMHt1KTynmuIjztQ']",
"event_id=$N0bxYWNt4qrh3B4ns78nzD_BRSFzMHt1KTynmuIjztQ,depth=10,body=Historical 98 (batch=0),prevs=['$D9gUbM3vrg7KAVDrXowcP0jmzjX_VM2OHArxGZy6wc8']",
"event_id=$D9gUbM3vrg7KAVDrXowcP0jmzjX_VM2OHArxGZy6wc8,depth=10,body=Historical 97 (batch=0),prevs=['$fUs553QBZQ-3MqELA3X6pmCL6F9HsEGc0eAyIQ5w-KQ']",
"event_id=$fUs553QBZQ-3MqELA3X6pmCL6F9HsEGc0eAyIQ5w-KQ,depth=10,body=Historical 96 (batch=0),prevs=['$Txz5IQUjGCf1ewtLvxmPKS0MrGD2LYoh6JwoQcXPYYI']",
"event_id=$Txz5IQUjGCf1ewtLvxmPKS0MrGD2LYoh6JwoQcXPYYI,depth=10,body=Historical 95 (batch=0),prevs=['$kC7jJEVaeGxRbaGAECrje-j_rUWodeKtXT5TByOR3_0']",
"event_id=$kC7jJEVaeGxRbaGAECrje-j_rUWodeKtXT5TByOR3_0,depth=10,body=Historical 94 (batch=0),prevs=['$qQ_Qw4R3XJ65ftHFvt7WyUg1-TrJ5ubgw4ln93O3qSE']",
"event_id=$qQ_Qw4R3XJ65ftHFvt7WyUg1-TrJ5ubgw4ln93O3qSE,depth=10,body=Historical 93 (batch=0),prevs=['$z6Sohu4b39SVOiprB26Ke9XNo1EWuzZysQ-jyc80oXs']",
"event_id=$z6Sohu4b39SVOiprB26Ke9XNo1EWuzZysQ-jyc80oXs,depth=10,body=Historical 92 (batch=0),prevs=['$CP4JNyEaRikkHIC-1OpoXhw3y3s_0_s-rqnKu_63aFg']",
"event_id=$CP4JNyEaRikkHIC-1OpoXhw3y3s_0_s-rqnKu_63aFg,depth=10,body=Historical 91 (batch=0),prevs=['$nCjxeXj_OF05JtxM8YUdUlx_moibUUy6QrosWt8R_Us']",
"event_id=$nCjxeXj_OF05JtxM8YUdUlx_moibUUy6QrosWt8R_Us,depth=10,body=Historical 90 (batch=0),prevs=['$8sFfCVGCb97FXd1etQLR70vmJDjk6RNsgbo5ughLXl8']",
"event_id=$8sFfCVGCb97FXd1etQLR70vmJDjk6RNsgbo5ughLXl8,depth=10,body=Historical 89 (batch=0),prevs=['$45AU3xVc6xF4qfrdJMh68kZIc-PF9hqkFmuOoxA_j08']",
"event_id=$45AU3xVc6xF4qfrdJMh68kZIc-PF9hqkFmuOoxA_j08,depth=10,body=Historical 88 (batch=0),prevs=['$9JhvBwk32ygq52H9mKPryUxX3ildrK47p8bAECnMkcI']",
"event_id=$9JhvBwk32ygq52H9mKPryUxX3ildrK47p8bAECnMkcI,depth=10,body=Historical 87 (batch=0),prevs=['$rXBGwIxCzRUCCQpNvMNiePqrKk6daAOb5nN2AuACDcg']",
"event_id=$rXBGwIxCzRUCCQpNvMNiePqrKk6daAOb5nN2AuACDcg,depth=10,body=Historical 86 (batch=0),prevs=['$Iebf12p8JQRuVHfWIgVwyc8cqDkPwTvod2HJIAfaaXY']",
"event_id=$Iebf12p8JQRuVHfWIgVwyc8cqDkPwTvod2HJIAfaaXY,depth=10,body=Historical 85 (batch=0),prevs=['$8CV6t9Yg5RrYzy1-t72ez47xVAgc45iM_nBcEr0r5u8']",
"event_id=$8CV6t9Yg5RrYzy1-t72ez47xVAgc45iM_nBcEr0r5u8,depth=10,body=Historical 84 (batch=0),prevs=['$jF0yFS-VkCntnui9esPytzncMQ4vbpoI4dEtbnqm2zM']",
"event_id=$jF0yFS-VkCntnui9esPytzncMQ4vbpoI4dEtbnqm2zM,depth=10,body=Historical 83 (batch=0),prevs=['$rEfXGwUAl6BfF0t_PtOoqnyiC02ACeOKB9zrWaB2k9w']",
"event_id=$rEfXGwUAl6BfF0t_PtOoqnyiC02ACeOKB9zrWaB2k9w,depth=10,body=Historical 82 (batch=0),prevs=['$7sjkdcEQOMDA7bXvNadBsscUPsvgwHgF7lHq6qT5SCQ']",
"event_id=$7sjkdcEQOMDA7bXvNadBsscUPsvgwHgF7lHq6qT5SCQ,depth=10,body=Historical 81 (batch=0),prevs=['$Ee4Zn_bD2_qgutvjVpmTLduivzstgTmaXoG4QYsk9kI']",
"event_id=$Ee4Zn_bD2_qgutvjVpmTLduivzstgTmaXoG4QYsk9kI,depth=10,body=Historical 80 (batch=0),prevs=['$O1NfL_xO7qhf9XtZfwYPQJHRTgcP9UJZ_CU6UfnyTmI']",
"event_id=$O1NfL_xO7qhf9XtZfwYPQJHRTgcP9UJZ_CU6UfnyTmI,depth=10,body=Historical 79 (batch=0),prevs=['$lSviYdCQKQye2QgoDaj7Ax1uKSp55bvUlS_Ax7vocPA']",
"event_id=$lSviYdCQKQye2QgoDaj7Ax1uKSp55bvUlS_Ax7vocPA,depth=10,body=Historical 78 (batch=0),prevs=['$ES3Mz4RnN5yj2mv6HIloRnAQlryyAToscQP_74X0R3E']",
"event_id=$ES3Mz4RnN5yj2mv6HIloRnAQlryyAToscQP_74X0R3E,depth=10,body=Historical 77 (batch=0),prevs=['$G6S-j3AT0tMMHoTXDRYJYGHmVSpy3I7qMPJp71PvqsE']",
"event_id=$G6S-j3AT0tMMHoTXDRYJYGHmVSpy3I7qMPJp71PvqsE,depth=10,body=Historical 76 (batch=0),prevs=['$n2IZJ9fG-t9cVol8slIDErGnNdbPeacvAWCDlTGYpJk']",
"event_id=$n2IZJ9fG-t9cVol8slIDErGnNdbPeacvAWCDlTGYpJk,depth=10,body=Historical 75 (batch=0),prevs=['$WxYHgWQRH2CKo5fXTiwH5zMrc7xuI3nsiBgDDSFFBbY']",
"event_id=$WxYHgWQRH2CKo5fXTiwH5zMrc7xuI3nsiBgDDSFFBbY,depth=10,body=Historical 74 (batch=0),prevs=['$4SxomALNe4fQrzh990LW2MVe2hAh41hefUN96WklLwA']",
"event_id=$4SxomALNe4fQrzh990LW2MVe2hAh41hefUN96WklLwA,depth=10,body=Historical 73 (batch=0),prevs=['$7jcugB1rv_Jp4wntQhdW_LrwAHjV4flw_uZ3A0rrKVY']",
"event_id=$7jcugB1rv_Jp4wntQhdW_LrwAHjV4flw_uZ3A0rrKVY,depth=10,body=Historical 72 (batch=0),prevs=['$0JOxrvf7ZArMCYzB1qSz76-akAdDtf0B-ferG4uI3vo']",
"event_id=$0JOxrvf7ZArMCYzB1qSz76-akAdDtf0B-ferG4uI3vo,depth=10,body=Historical 71 (batch=0),prevs=['$Vd0nksOUDQ92s-Kkn37Zhhj204cAUynybHuHrgtROTs']",
"event_id=$Vd0nksOUDQ92s-Kkn37Zhhj204cAUynybHuHrgtROTs,depth=10,body=Historical 70 (batch=0),prevs=['$CCDHZGKctXGPB5bAoEbrNk7cXCUiDtIL7PJ1VQGwIS0']",
"event_id=$CCDHZGKctXGPB5bAoEbrNk7cXCUiDtIL7PJ1VQGwIS0,depth=10,body=Historical 69 (batch=0),prevs=['$3w0P2g8VdVb1ar52A_9XXeON3vmWb6sr_Lctjcyp11A']",
"event_id=$3w0P2g8VdVb1ar52A_9XXeON3vmWb6sr_Lctjcyp11A,depth=10,body=Historical 68 (batch=0),prevs=['$-fRkdzIZbqczQ85DLuNk9l9DlYgtroT3Sj2hY4PjK3Y']",
"event_id=$-fRkdzIZbqczQ85DLuNk9l9DlYgtroT3Sj2hY4PjK3Y,depth=10,body=Historical 67 (batch=0),prevs=['$jX0KrPhWbDIHoxsFZCKm8VJLiRaz7zbFLRpcPmXrNLU']",
"event_id=$jX0KrPhWbDIHoxsFZCKm8VJLiRaz7zbFLRpcPmXrNLU,depth=10,body=Historical 66 (batch=0),prevs=['$RZaiBaIb5pXeFu21n3o8agvfPOzYPHZW2pg-NYnK2Wo']",
"event_id=$RZaiBaIb5pXeFu21n3o8agvfPOzYPHZW2pg-NYnK2Wo,depth=10,body=Historical 65 (batch=0),prevs=['$Ayy7g5q4SVDDI2n4AjMKEhF7JKYekYoezs42uVlqKQo']",
"event_id=$Ayy7g5q4SVDDI2n4AjMKEhF7JKYekYoezs42uVlqKQo,depth=10,body=Historical 64 (batch=0),prevs=['$Qrtts5rHLUrB3SH__uKCz9M_IzT8dwLEi5cZbL5XSrI']",
"event_id=$Qrtts5rHLUrB3SH__uKCz9M_IzT8dwLEi5cZbL5XSrI,depth=10,body=Historical 63 (batch=0),prevs=['$GzpO60z90GafGhNpczoL9-_9sA4X9KAIx-oOp3Ak5fs']",
"event_id=$GzpO60z90GafGhNpczoL9-_9sA4X9KAIx-oOp3Ak5fs,depth=10,body=Historical 62 (batch=0),prevs=['$FoDpnYsHjsEPKpk1aBTznOupi2Nq0pDcwgPup3EuwHY']",
"event_id=$FoDpnYsHjsEPKpk1aBTznOupi2Nq0pDcwgPup3EuwHY,depth=10,body=Historical 61 (batch=0),prevs=['$x22YRSOcrA__Jj1jlAjUQj7_aDJxmzgXfn03nDgNuAs']",
"event_id=$x22YRSOcrA__Jj1jlAjUQj7_aDJxmzgXfn03nDgNuAs,depth=10,body=Historical 60 (batch=0),prevs=['$3abKTbz8gCJ7WVGCAX4gdKKjctfq2UBwAq_kZAiMb6o']",
"event_id=$3abKTbz8gCJ7WVGCAX4gdKKjctfq2UBwAq_kZAiMb6o,depth=10,body=Historical 59 (batch=0),prevs=['$6JgNxTembrNVYP3Ko6VgpHJNILIqIvTXwPpIsds63BA']",
"event_id=$6JgNxTembrNVYP3Ko6VgpHJNILIqIvTXwPpIsds63BA,depth=10,body=Historical 58 (batch=0),prevs=['$NUENCAs9SSA4UUHind2mtrX_-5_H-GTXJ4DjQ8o0hVo']",
"event_id=$NUENCAs9SSA4UUHind2mtrX_-5_H-GTXJ4DjQ8o0hVo,depth=10,body=Historical 57 (batch=0),prevs=['$c12ynew3nRtCewk7IvWy1EurV2XHgRh1sRbj9x5OwJA']",
"event_id=$c12ynew3nRtCewk7IvWy1EurV2XHgRh1sRbj9x5OwJA,depth=10,body=Historical 56 (batch=0),prevs=['$xcqepPdOhubqAJ2xzBBZg0kuoPnfW4DcTJcj0UiRnDU']",
"event_id=$xcqepPdOhubqAJ2xzBBZg0kuoPnfW4DcTJcj0UiRnDU,depth=10,body=Historical 55 (batch=0),prevs=['$BPlbbeAqGAzwTsSA-B0qOOYkZyovhvESdtcANOsobdk']",
"event_id=$BPlbbeAqGAzwTsSA-B0qOOYkZyovhvESdtcANOsobdk,depth=10,body=Historical 54 (batch=0),prevs=['$Z40RGtNNkb54tu_EjNyCc3TG3JAzDn2VNFKcogEpquo']",
"event_id=$Z40RGtNNkb54tu_EjNyCc3TG3JAzDn2VNFKcogEpquo,depth=10,body=Historical 53 (batch=0),prevs=['$K-50fqiUNw5NkQeGMkg3fgaJCwA9bm5WtTM7AWmfbvw']",
"event_id=$K-50fqiUNw5NkQeGMkg3fgaJCwA9bm5WtTM7AWmfbvw,depth=10,body=Historical 52 (batch=0),prevs=['$71c4Wa_ks9TcN4nwj0403YQGRRVj-6rhJkQlwoIiJf4']",
"event_id=$71c4Wa_ks9TcN4nwj0403YQGRRVj-6rhJkQlwoIiJf4,depth=10,body=Historical 51 (batch=0),prevs=['$o16ueMl2wNS6UfeDDt1JJDP5GeHDAo3G-mZnc5kFVA8']",
"event_id=$o16ueMl2wNS6UfeDDt1JJDP5GeHDAo3G-mZnc5kFVA8,depth=10,body=Historical 50 (batch=0),prevs=['$Tf7hucPlbAIsJSJC_SZTerIDhA601DVXdktkmuR5Kw8']",
"event_id=$Tf7hucPlbAIsJSJC_SZTerIDhA601DVXdktkmuR5Kw8,depth=10,body=Historical 49 (batch=0),prevs=['$sCpJSEbWzgIZaVxLlGb_JkxhYFj2s16ZloJPiafivVs']",
"event_id=$sCpJSEbWzgIZaVxLlGb_JkxhYFj2s16ZloJPiafivVs,depth=10,body=Historical 48 (batch=0),prevs=['$UrxtBrZ2WrXFjInPAO2dwVtoPwDQxDDQ49GoqT5v6mI']",
"event_id=$UrxtBrZ2WrXFjInPAO2dwVtoPwDQxDDQ49GoqT5v6mI,depth=10,body=Historical 47 (batch=0),prevs=['$7PoOmq5lSm_3qEm2B5ggpuEqev14pFjMD-T_4BYqZYo']",
"event_id=$7PoOmq5lSm_3qEm2B5ggpuEqev14pFjMD-T_4BYqZYo,depth=10,body=Historical 46 (batch=0),prevs=['$2DhrL57VVj1KJuWeIP1_UZHrD7VQq2AUksvMDiTPD-4']",
"event_id=$2DhrL57VVj1KJuWeIP1_UZHrD7VQq2AUksvMDiTPD-4,depth=10,body=Historical 45 (batch=0),prevs=['$8JexHkPI8s_95LGsa-xS7IUA6pPAzl1Wu6HOkezX4hk']",
"event_id=$8JexHkPI8s_95LGsa-xS7IUA6pPAzl1Wu6HOkezX4hk,depth=10,body=Historical 44 (batch=0),prevs=['$D1BSCRk1kps83i5-Tm34uZGwTCCxNlmPt-QrVzJ3gKQ']",
"event_id=$D1BSCRk1kps83i5-Tm34uZGwTCCxNlmPt-QrVzJ3gKQ,depth=10,body=Historical 43 (batch=0),prevs=['$2sdel6OjRf9AArfA-Lp-6AxAXMEGvus5j9CupJmPfpk']",
"event_id=$2sdel6OjRf9AArfA-Lp-6AxAXMEGvus5j9CupJmPfpk,depth=10,body=Historical 42 (batch=0),prevs=['$ts6IiQMG8YyMwDYVUdRplhzpJLQPuzZXE8TIjTm5Qtw']",
"event_id=$ts6IiQMG8YyMwDYVUdRplhzpJLQPuzZXE8TIjTm5Qtw,depth=10,body=Historical 41 (batch=0),prevs=['$SxPDbdJ_VYhfcIkJe4sUCvZG71gnhDjgne-WM-gOncQ']",
"event_id=$SxPDbdJ_VYhfcIkJe4sUCvZG71gnhDjgne-WM-gOncQ,depth=10,body=Historical 40 (batch=0),prevs=['$AOpiIZHC5mhpwV1RPzQd_29KHsY-niX0uuL3ofWoTyY']",
"event_id=$AOpiIZHC5mhpwV1RPzQd_29KHsY-niX0uuL3ofWoTyY,depth=10,body=Historical 39 (batch=0),prevs=['$8vAjOM6qlvKS9JJAXQx4CCOqRSzMP6C9YlNi0ft1Y68']",
"event_id=$8vAjOM6qlvKS9JJAXQx4CCOqRSzMP6C9YlNi0ft1Y68,depth=10,body=Historical 38 (batch=0),prevs=['$EUgYbcq2DMNLgzY7SaPtpNQAOKKYLKYIoGfNYQb8Y2A']",
"event_id=$EUgYbcq2DMNLgzY7SaPtpNQAOKKYLKYIoGfNYQb8Y2A,depth=10,body=Historical 37 (batch=0),prevs=['$ibThSro6ruPZeNqjf_9UGXfo1kErnQUcRZTDAunDM-4']",
"event_id=$ibThSro6ruPZeNqjf_9UGXfo1kErnQUcRZTDAunDM-4,depth=10,body=Historical 36 (batch=0),prevs=['$YcrZi3aSgm17cZUkGZf-MaR8EWzl-RdDf5qYctmnZ1k']",
"event_id=$YcrZi3aSgm17cZUkGZf-MaR8EWzl-RdDf5qYctmnZ1k,depth=10,body=Historical 35 (batch=0),prevs=['$0BhcUb0o0wtIE4hwVqAs0AC591TPOx54idyv6TCTiEo']",
"event_id=$0BhcUb0o0wtIE4hwVqAs0AC591TPOx54idyv6TCTiEo,depth=10,body=Historical 34 (batch=0),prevs=['$umgo6IT00-E22uIRr_e4AsclGtanloy1Aw5GzNpBNfc']",
"event_id=$umgo6IT00-E22uIRr_e4AsclGtanloy1Aw5GzNpBNfc,depth=10,body=Historical 33 (batch=0),prevs=['$aka96B_0Yx9AljoQKr4QitStKb0RkcPucvFKusGdySc']",
"event_id=$aka96B_0Yx9AljoQKr4QitStKb0RkcPucvFKusGdySc,depth=10,body=Historical 32 (batch=0),prevs=['$OJJa17fRud2uJLkJ0-mF8iQFsAvimrY_efopy6ctqTg']",
"event_id=$OJJa17fRud2uJLkJ0-mF8iQFsAvimrY_efopy6ctqTg,depth=10,body=Historical 31 (batch=0),prevs=['$pLWU_gcJnZGRmruRUcPIqWcjBJ9zmh1lb2jv39RDipc']",
"event_id=$pLWU_gcJnZGRmruRUcPIqWcjBJ9zmh1lb2jv39RDipc,depth=10,body=Historical 30 (batch=0),prevs=['$G-kuDTfZY1V23CzLgSXfgdctIvbxmnT0Nx-qUuUhGbw']",
"event_id=$G-kuDTfZY1V23CzLgSXfgdctIvbxmnT0Nx-qUuUhGbw,depth=10,body=Historical 29 (batch=0),prevs=['$b5NQ52jYrGKU7-5lJojXF3xAyWcANt3P6CJ1_Mpw9hA']",
"event_id=$b5NQ52jYrGKU7-5lJojXF3xAyWcANt3P6CJ1_Mpw9hA,depth=10,body=Historical 28 (batch=0),prevs=['$4oJCt-e8AZYL8WJuY_uV2COvrCzbTvC7RB8xAvxGvEA']",
"event_id=$4oJCt-e8AZYL8WJuY_uV2COvrCzbTvC7RB8xAvxGvEA,depth=10,body=Historical 27 (batch=0),prevs=['$lP0kCgxZMRAQL6_zg0JLNvdn1lRf1dLWXaWMa4ZT5Iw']",
"event_id=$lP0kCgxZMRAQL6_zg0JLNvdn1lRf1dLWXaWMa4ZT5Iw,depth=10,body=Historical 26 (batch=0),prevs=['$b46KcYyRVIQJ2Mf6lc7UC56ViSxV9h43SVeQ5gYQ0MU']",
"event_id=$b46KcYyRVIQJ2Mf6lc7UC56ViSxV9h43SVeQ5gYQ0MU,depth=10,body=Historical 25 (batch=0),prevs=['$b35VNurzabrSP0KvVCXRB1i-FjbDS8Ly-UZcU5m9RC0']",
"event_id=$b35VNurzabrSP0KvVCXRB1i-FjbDS8Ly-UZcU5m9RC0,depth=10,body=Historical 24 (batch=0),prevs=['$8b1w7cxe5bdMj9mKrZTD32szDIVDZutWo1iXUsEQBSM']",
"event_id=$8b1w7cxe5bdMj9mKrZTD32szDIVDZutWo1iXUsEQBSM,depth=10,body=Historical 23 (batch=0),prevs=['$vqlAlL8FDxucbRlZISrTtvtP4G1tSHNzbZwWEzAMbRM']",
"event_id=$vqlAlL8FDxucbRlZISrTtvtP4G1tSHNzbZwWEzAMbRM,depth=10,body=Historical 22 (batch=0),prevs=['$ACWiMQWRjseJTFI_4yFLcrr-U7qzeHeSJpOlWOm7H2c']",
"event_id=$ACWiMQWRjseJTFI_4yFLcrr-U7qzeHeSJpOlWOm7H2c,depth=10,body=Historical 21 (batch=0),prevs=['$mkKg3O1vyzZXCJoN0xEDuZYcm-mra3neT8peKSaI-fQ']",
"event_id=$mkKg3O1vyzZXCJoN0xEDuZYcm-mra3neT8peKSaI-fQ,depth=10,body=Historical 20 (batch=0),prevs=['$Aro7lP7i_onbj9g5-tgTxKR7Xwo2u6H9xMKVb0Q4OQo']",
"event_id=$Aro7lP7i_onbj9g5-tgTxKR7Xwo2u6H9xMKVb0Q4OQo,depth=10,body=Historical 19 (batch=0),prevs=['$ZT0davtwy-6ltpLlA7xCRDoZTbBKrFEm0xywwBqmI74']",
"event_id=$ZT0davtwy-6ltpLlA7xCRDoZTbBKrFEm0xywwBqmI74,depth=10,body=Historical 18 (batch=0),prevs=['$LYfu_QQSdd9Murplu_qT56yJXtXNF0PIfJ-4-zj_OK4']",
"event_id=$LYfu_QQSdd9Murplu_qT56yJXtXNF0PIfJ-4-zj_OK4,depth=10,body=Historical 17 (batch=0),prevs=['$sCjd4Lz7kNCDqKnV4NpyEbxufPa5ygfhMIXD5tvZIVE']",
"event_id=$sCjd4Lz7kNCDqKnV4NpyEbxufPa5ygfhMIXD5tvZIVE,depth=10,body=Historical 16 (batch=0),prevs=['$7b8cgWaAtDefi5UR74eFaIq-OCAozn1z-095TfJYYWc']",
"event_id=$7b8cgWaAtDefi5UR74eFaIq-OCAozn1z-095TfJYYWc,depth=10,body=Historical 15 (batch=0),prevs=['$DJ4LuxKnd1pjfsvyqbx5lWFucWgHi-ouH1GoS_8MQXs']",
"event_id=$DJ4LuxKnd1pjfsvyqbx5lWFucWgHi-ouH1GoS_8MQXs,depth=10,body=Historical 14 (batch=0),prevs=['$GeABTSXvlqx9Ul4j4vQHQ0xHiZqKjRvZbXQQjPpBQZA']",
"event_id=$GeABTSXvlqx9Ul4j4vQHQ0xHiZqKjRvZbXQQjPpBQZA,depth=10,body=Historical 13 (batch=0),prevs=['$KoqVyBic8-LUcPwfk3cN-xgwPvcHmPL8kUrVCVXl6Q8']",
"event_id=$KoqVyBic8-LUcPwfk3cN-xgwPvcHmPL8kUrVCVXl6Q8,depth=10,body=Historical 12 (batch=0),prevs=['$Rn3edaeQ2P7DiyOh5y2_dtPK_sg_97neVHHDXCaga0g']",
"event_id=$Rn3edaeQ2P7DiyOh5y2_dtPK_sg_97neVHHDXCaga0g,depth=10,body=Historical 11 (batch=0),prevs=['$rRXAVfkswED2m4zGvzd3E3msFjbN1RjP08DblJb9kbY']",
"event_id=$rRXAVfkswED2m4zGvzd3E3msFjbN1RjP08DblJb9kbY,depth=10,body=Historical 10 (batch=0),prevs=['$7NE5L9LaMSqUj2gwxB46vZrCIDKklNRJNEnYhhluC3I']",
"event_id=$7NE5L9LaMSqUj2gwxB46vZrCIDKklNRJNEnYhhluC3I,depth=10,body=Historical 9 (batch=0),prevs=['$Legp3Fec3qa5Matct10VzlsNU-cCYSfOMpEC1wWRCSw']",
"event_id=$Legp3Fec3qa5Matct10VzlsNU-cCYSfOMpEC1wWRCSw,depth=10,body=Historical 8 (batch=0),prevs=['$Ot4kjqVOhGVkEWIshCwP9AmsHX9Dw_OG_rAfzF2YYgk']",
"event_id=$Ot4kjqVOhGVkEWIshCwP9AmsHX9Dw_OG_rAfzF2YYgk,depth=10,body=Historical 7 (batch=0),prevs=['$_NgCYX2d-zby256Pt84Aw4WOtYtH5kaG9Qq5nrSISFo']",
"event_id=$_NgCYX2d-zby256Pt84Aw4WOtYtH5kaG9Qq5nrSISFo,depth=10,body=Historical 6 (batch=0),prevs=['$wm5gnTie-UwOxwYVM6YYI6qbOO9g_n-IZ900ouJf4yI']",
"event_id=$wm5gnTie-UwOxwYVM6YYI6qbOO9g_n-IZ900ouJf4yI,depth=10,body=Historical 5 (batch=0),prevs=['$d8O1CwNO3PfEYgODGj_6eHdxs-8H0Nk3UaoBnrJ8QBs']",
"event_id=$rFNqVLF37MMcg7Dy8DjxnpUIyo8q-GBEs35AHKJRe8c,depth=11,body=Message 1 (eventIDsAfter),prevs=['$-VN0Wx6nnEzZLwFeON19jL9hW07xo1rGS08HsmBtA2g']",
"event_id=$-VN0Wx6nnEzZLwFeON19jL9hW07xo1rGS08HsmBtA2g,depth=10,body=Message 0 (eventIDsAfter),prevs=['$n9kq5qDGfNxKw7_Cb8kIC-9BrQ0Kg_sTWn9_nLwovA4']",
"event_id=$n9kq5qDGfNxKw7_Cb8kIC-9BrQ0Kg_sTWn9_nLwovA4,depth=9,body=Message 1 (eventIDsBefore),prevs=['$JdciLNIztkJyL8kE0GAs_JNRKx00ZYkfkT0Hw9bZmTY']"
]
```
2021-10-29 14:10:43 -05:00
Dirk Klimpel
bfd7a9b65c
Fix comments referencing v1.46.0 from PR #10969 . ( #11212 )
...
#10969 was merged after 1.46.0rc1 was cut and will be included
in v1.47.0rc1 instead.
2021-10-29 13:43:51 -04:00
Brendan Abolivier
ad4eab9862
Add a module API method to retrieve state from a room ( #11204 )
2021-10-29 16:28:29 +00:00
Eric Eastwood
3d387f94fc
WIP: Sort events topologically when we receive them over backfill
2021-10-29 11:02:09 -05:00
Sean Quah
3ed17ff651
Clarify lack of Windows support in documentation ( #11198 )
2021-10-29 14:03:58 +01:00
Eric Eastwood
6ea263b73b
Revert "WIP: Sort events topologically when we receive them over backfill"
...
This reverts commit 5afc264dd5 .
2021-10-29 02:43:17 -05:00
Eric Eastwood
5afc264dd5
WIP: Sort events topologically when we receive them over backfill
2021-10-29 02:43:08 -05:00
Eric Eastwood
3e09d49000
Revert "WIP: Don't include the event we branch from"
...
This reverts commit 9a6d8faafe .
2021-10-28 20:40:57 -05:00
Eric Eastwood
9a6d8faafe
WIP: Don't include the event we branch from
...
We want to backfill all of the history before adding the base event.
But then there is a problem of how do we add the base event after
exhausting all of the historical messages. Backfill will give
us that extremity again but the current code will always
choose the historical branch over and over and never move past it.
I wish we could ask the federated homeserver if it already
has the insertion event locally but we can't make any requests
in the store code here :/
2021-10-28 20:24:00 -05:00
Patrick Cloke
56e281bf6c
Additional type hints for relations database class. ( #11205 )
2021-10-28 14:35:12 -04:00
Rafael Gonçalves
0e16b418f6
Add knock information in admin exported data ( #11171 )
...
Signed-off-by: Rafael Goncalves <rafaelgoncalves@riseup.net >
2021-10-28 18:54:38 +01:00
Shay
e002faee01
Fetch verify key locally rather than trying to do so over federation if origin and host are the same. ( #11129 )
...
* add tests for fetching key locally
* add logic to check if origin server is same as host and fetch verify key locally rather than over federation
* add changelog
* slight refactor, add docstring, change changelog entry
* Make changelog entry one line
* remove verify_json_locally and push locality check to process_request, add function process_request_locally
* remove leftover code reference
* refactor to add common call to 'verify_json and associated handling code
* add type hint to process_json
* add some docstrings + very slight refactor
2021-10-28 10:27:17 -07:00
Brendan Abolivier
adc0d35b17
Add a ModuleApi method to update a user's membership in a room ( #11147 )
...
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-10-28 16:45:53 +00:00
David Robertson
1bfd141205
Type hints for the remaining two files in synapse.http. ( #11164 )
...
* Teach MyPy that the sentinel context is False
This means that if `ctx: LoggingContextOrSentinel`
then `bool(ctx)` narrows us to `ctx:LoggingContext`, which is a really
neat find!
* Annotate RequestMetrics
- Raise errors for sentry if we use the sentinel context
- Ensure we don't raise an error and carry on, but not recording stats
- Include stack trace in the error case to lower Sean's blood pressure
* Make mypy pass for synapse.http.request_metrics
* Make synapse.http.connectproxyclient pass mypy
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-10-28 14:14:42 +01:00
Skyler Mäntysaari
a19bf32a03
docs/openid: Add Authentik documentation. ( #11151 )
2021-10-28 10:31:22 +00:00
Eric Eastwood
4a12304cf7
Put empty prev_events behind new room version
...
See https://github.com/matrix-org/synapse/pull/11114#discussion_r733475645
2021-10-28 01:42:48 -05:00
Dan Callahan
a1ba7a850a
Update scripts to pass Shellcheck lints ( #11166 )
2021-10-27 21:36:18 +01:00
Dan Callahan
0dffa9d0e0
Merge remote-tracking branch 'origin/develop' into shellcheck
...
Fixes a merge conflict with debian/changelog
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-27 20:04:00 +01:00
reivilibre
75ca0a6168
Annotate log_function decorator ( #10943 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-10-27 17:27:23 +01:00
Samuel Philipp
4e393af52f
Fixed config parse bug in review_recent_signups ( #11191 )
2021-10-27 17:25:18 +01:00
Richard van der Hoff
576921c66a
Force deb compression with xz. ( #11197 )
...
Fixes a problem where `impish` packages could not be processed by `reprepro`.
2021-10-27 17:06:32 +01:00
Patrick Cloke
19d5dc6931
Refactor Filter to handle fields according to data being filtered. ( #11194 )
...
This avoids filtering against fields which cannot exist on an
event source. E.g. presence updates don't have a room.
2021-10-27 11:26:30 -04:00
Dirk Klimpel
8d46fac98e
Delete messages from device_inbox table when deleting device ( #10969 )
...
Fixes : #9346
2021-10-27 16:01:18 +01:00
Patrick Cloke
b3e843be88
Fix URL preview errors when previewing XML documents. ( #11196 )
2021-10-27 14:48:02 +00:00
Patrick Cloke
a930da3291
Include the stable identifier for MSC3288. ( #11187 )
...
Includes both the stable and unstable identifier to store-invite
calls to the identity server. In the future we should remove the
unstable identifier.
2021-10-27 14:19:19 +00:00
Erik Johnston
179dc8ae9e
Merge remote-tracking branch 'origin/release-v1.46' into develop
2021-10-27 14:45:40 +01:00
Erik Johnston
e0ef8fe58d
Update release date
2021-10-27 14:44:45 +01:00
Erik Johnston
b615fc35d6
Update changelog with new changes
2021-10-27 13:22:48 +01:00
Sean Quah
f3a4be8700
Shut down the DNS threadpool ( #11190 )
...
The DNS threadpool must be explicitly stopped, otherwise Synapse will
hang indefinitely when asked to shut down.
2021-10-27 13:04:56 +01:00
Erik Johnston
72626b78ef
Fix thread BG update to not seq scan event_json ( #11192 )
...
For some reason the query optimiser decided to seq scan both tables,
rather than index scanning `event_json`.
2021-10-27 11:33:21 +00:00
Sean Quah
2dbef6c10a
Update CHANGES.md
2021-10-26 17:54:25 +01:00
Sean Quah
60ad9460c4
Move #10975 to bugfix section in changelog
2021-10-26 14:26:36 +01:00
Sean Quah
400f391f71
Update CHANGES.md
2021-10-26 14:21:09 +01:00
Brendan Abolivier
c7a5e49664
Implement an on_new_event callback ( #11126 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-10-26 15:17:36 +02:00
Sean Quah
34b0222c2b
Update CHANGES.md
2021-10-26 14:08:52 +01:00
Sean Quah
cc75a6b1b2
1.46.0rc1
2021-10-26 14:04:51 +01:00
Erik Johnston
7004f43da1
Move DNS lookups into separate thread pool ( #11177 )
...
This is to stop large bursts of lookups starving out other users of the
thread pools.
Fixes #11049 .
2021-10-26 13:45:38 +01:00
Patrick Cloke
d52c58dfa3
Add a background update for updating MSC3440 relation threads. ( #11181 )
2021-10-26 07:38:45 -04:00
Brendan Abolivier
8c8e36af0d
Document the version each module API method was added to Synapse ( #11183 )
2021-10-26 11:09:10 +02:00
Jason Robinson
63cbdd8af0
Enable changing user type via users admin API ( #11174 )
...
Users admin API can now also modify user
type in addition to allowing it to be
set on user creation.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-10-26 09:01:06 +00:00
Brendan Abolivier
c1510c97b5
Fix cyclic import in the module API ( #11180 )
...
Introduced in #10548
See https://github.com/matrix-org/synapse-email-account-validity/runs/3979337154?check_suite_focus=true for an example of a module's CI choking over this issue.
2021-10-25 16:45:19 +00:00
AndrewFerr
4387b791e0
Don't set new room alias before potential 403 ( #10930 )
...
Fixes : #10929
Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net >
2021-10-25 15:24:49 +01:00
Richard van der Hoff
da957a60e8
Ensure that we correctly auth events returned by send_join ( #11012 )
...
This is the final piece of the jigsaw for #9595 . As with other changes before this one (eg #10771 ), we need to make sure that we auth the auth events in the right order, and actually check that their predecessors haven't been rejected.
To do this I've reused the existing code we use when persisting outliers elsewhere.
I've removed the code for attempting to fetch missing auth_events - the events should have been present in the send_join response, so the likely reason they are missing is that we couldn't verify them, so requesting them again is unlikely to help. Instead, we simply drop any state which relies on those auth events, as we do at a backwards-extremity. See also matrix-org/complement#216 for a test for this.
2021-10-25 15:21:09 +01:00
Sean Quah
85a09f8b8b
Fix module API's get_user_ip_and_agents function when run on workers ( #11112 )
2021-10-25 13:01:04 +01:00
Dan Callahan
1afc6ecae1
Changelog
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:21:40 +01:00
Dan Callahan
d7141e0b8b
Fix Shellcheck SC2006: Use $(...) notation
...
Use $(...) notation instead of legacy backticked `...`.
https://github.com/koalaman/shellcheck/wiki/SC2006
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:55 +01:00
Dan Callahan
b5e910521b
Fix Shellcheck SC2129: Consider using {..} >> file
...
Consider using { cmd1; cmd2; } >> file instead of individual redirects.
https://github.com/koalaman/shellcheck/wiki/SC2129
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
13f084eb58
Fix Shellcheck SC2086: Quote to prevent splitting
...
Double quote to prevent globbing and word splitting.
https://github.com/koalaman/shellcheck/wiki/SC2086
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
31096132c3
Fix Shellcheck SC2012: Use find instead of ls
...
Use find instead of ls to better handle non-alphanumeric filenames.
https://github.com/koalaman/shellcheck/wiki/SC2012
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
9d0f9d51d5
Fix Shellcheck SC2016: Single quotes don't expand
...
Expressions don't expand in single quotes, use double quotes for that.
https://github.com/koalaman/shellcheck/wiki/SC2016
This specifically warned about the '$aregis...' part of the sed script.
Which is a relatively obscure use of sed.
Splitting this into two commands makes its intent more obvious and
avoids contravening Shellcheck's lints.
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
bab2bc844c
Fix Shellcheck SC1091: Can't follow file
...
Not following: (error message here)
https://github.com/koalaman/shellcheck/wiki/SC1091
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
7cf83c0aca
Fix Shellcheck SC1001: Meaningless char escapes
...
This \o will be a regular 'o' in this context.
https://github.com/koalaman/shellcheck/wiki/SC1001
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
99e698d6ed
Fix Shellcheck SC2089 and SC2090: Quotes in vars
...
SC2089: Quotes/backslashes will be treated literally. Use an array.
https://github.com/koalaman/shellcheck/wiki/SC2089
SC2090: Quotes/backslashes in this variable will not be respected.
https://github.com/koalaman/shellcheck/wiki/SC2090
Putting literal JSON in a variable mistakenly triggers these warnings.
Instead of adding ignore directives, this can be avoided by inlining the
JSON data into the curl invocation.
Since the variable is only used in this one location, inlining is fine.
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
dfa6143133
Fix Shellcheck SC2155: Declare + export separately
...
Declare and assign separately to avoid masking return values.
https://github.com/koalaman/shellcheck/wiki/SC2155
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
6a9d84a676
Fix Shellcheck SC2166: test -a is not well defined
...
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
https://github.com/koalaman/shellcheck/wiki/SC2166
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
6c736fa472
Fix Shellcheck SC2154: variable possibly undefined
...
var is referenced but not assigned.
https://github.com/koalaman/shellcheck/wiki/SC2154
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
898e3be4c9
Fix Shellcheck SC2064: Use single quotes on traps
...
Use single quotes, otherwise this expands now rather than when signalled.
https://github.com/koalaman/shellcheck/wiki/SC2064
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
5eb481cd5b
Fix Shellcheck SC2115: Ensure never expands to /*
...
Use "${var:?}" to ensure this never expands to /* .
https://github.com/koalaman/shellcheck/wiki/SC2115
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:54 +01:00
Dan Callahan
64adbb7b54
Fix Shellcheck SC2046: Quote to prevent word split
...
Quote this to prevent word splitting
https://www.shellcheck.net/wiki/SC2046
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:53 +01:00
Dan Callahan
12d79ff1b6
Fix Shellcheck SC2164: exit in case cd fails.
...
Use `cd ... || exit` in case cd fails.
https://github.com/koalaman/shellcheck/wiki/SC2164
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-22 23:08:53 +01:00
Sean Quah
2b82ec425f
Add type hints for most HomeServer parameters ( #11095 )
2021-10-22 18:15:41 +01:00
Jason Robinson
b9ce53e878
Fix synapse.config module "read" command ( #11145 )
...
`synapse.config.__main__` has the possibility to read a config item. This can be used to conveniently also validate the config is valid before trying to start Synapse.
The "read" command broke in https://github.com/matrix-org/synapse/pull/10916 as it now requires passing in "server.server_name" for example.
Also made the read command optional so one can just call this with just the confirm file reference and get a "Config parses OK" if things are ok.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-10-22 12:00:52 +02:00
Dirk Klimpel
b0f03aeb6a
Add more information what happens when a user is deactivated ( #11083 )
2021-10-22 09:00:28 +01:00
Eric Eastwood
1d3f417046
Revert back to string interpolation for SQL boolean value
...
Maybe fixes the `sqlite3.OperationalError: no such column: FALSE,` problem in CI,
https://github.com/matrix-org/synapse/runs/3962382283#step:4:11038
2021-10-21 18:49:30 -05:00
Patrick Cloke
ba00e20234
Add a thread relation type per MSC3440. ( #11088 )
...
Adds experimental support for MSC3440's `io.element.thread` relation
type (and the aggregation for it).
2021-10-21 14:39:16 -04:00
David Robertson
2d91b6256e
Fix adding excluded users to the private room sharing tables when joining a room ( #11143 )
...
* We only need to fetch users in private rooms
* Filter out `user_id` at the top
* Discard excluded users in the top loop
We weren't doing this in the "First, if they're our user" branch so this
is a bugfix.
* The caller must check that `user_id` is included
This is in the docstring. There are two call sites:
- one in `_handle_room_publicity_change`, which explicitly checks before calling;
- and another in `_handle_room_membership_event`, which returns early if
the user is excluded.
So this change is safe.
* Test joining a private room with an excluded user
* Tweak an existing test
* Changelog
* test docstring
* lint
2021-10-21 17:48:59 +01:00
Andrew Morgan
6408372234
Improve docstrings for methods related to sending EDUs to application services ( #11138 )
2021-10-21 17:42:25 +01:00
Patrick Cloke
0f9adc99ad
Add missing type hints to synapse.crypto. ( #11146 )
...
And require type hints for this module.
2021-10-21 13:07:07 +00:00
Richard van der Hoff
09eff1b3db
fix relative link in docker readme ( #11144 )
...
relative links don't work when it's on dockerhub.
2021-10-21 13:50:43 +01:00
Eric Eastwood
2fbe3f13ae
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
2021-10-21 05:26:04 -05:00
Eric Eastwood
5bfde7bd33
Merge branch 'master' into madlittlemods/return-historical-events-in-order-from-backfill
2021-10-21 04:51:57 -05:00
Eric Eastwood
ee47878439
Fix mypy lints
2021-10-21 04:49:28 -05:00
Eric Eastwood
1263c7e2a9
Remove unused import
2021-10-21 04:39:34 -05:00
Eric Eastwood
83474d9158
Put MSC2716 backfill logic behind experimental feature flag
2021-10-21 04:31:10 -05:00
Eric Eastwood
69dfa16dcb
Move to sorting the backfill events in the existing sorted
2021-10-21 04:19:36 -05:00
Eric Eastwood
7da8012f31
Remove extra event info
2021-10-21 04:06:03 -05:00
Eric Eastwood
f39c1da083
Remove debug logging
2021-10-21 04:05:24 -05:00
Dirk Klimpel
ef7fe09778
Fix setting a user's external_id via the admin API returns 500 and deletes users existing external mappings if that external ID is already mapped ( #11051 )
...
Fixes #10846
2021-10-21 09:52:32 +01:00
Eric Eastwood
4191f5615f
Remove fake prev events from historical state chain
...
Fix https://github.com/matrix-org/synapse/issues/11091
We have to allow creation of events with no prev_events
but do have auth_events.
And since the historical member events are outliers
with no prev_events to resolve them, we want to avoid
putting them as backward extremeties.
2021-10-21 03:44:27 -05:00
Eric Eastwood
477c15df72
Some more debug logging
2021-10-20 22:11:12 -05:00
Eric Eastwood
886071b66b
Fix backfill not picking up batch events connected to non-base insertion events
...
Previously, we would only look for a batch event if the insertion event
was connected to something else by prev_event. This is only the case
for the base insertion event. And instead, we need to look for
a batch event whenever we come across an insertion event.
2021-10-20 16:48:28 -05:00
Richard van der Hoff
57501d9194
Update sign_json to support inline key config ( #11139 )
...
It's been possible to configure a key inline in the homeserver.yaml since
13bc1e0746 . Update `sign_json` to work with this.
2021-10-20 18:49:20 +01:00
Robert Edström
62db603fa0
Consider IP whitelist for identity server resolution ( #11120 )
...
Signed-off-by: Robert Edström <github@legogris.se >
2021-10-20 18:43:49 +01:00
Richard van der Hoff
0930e9ae12
Clean up _update_auth_events_and_context_for_auth ( #11122 )
...
Remove some redundant code, and generally simplify.
2021-10-20 18:22:40 +01:00
Aaron R
2c61a318cc
Show error when timestamp in seconds is provided to the /purge_media_cache API ( #11101 )
2021-10-20 14:41:48 +00:00
Sean Quah
ee2cee5f52
Merge branch 'master' into develop
2021-10-20 13:43:02 +01:00
Travis Ralston
106d99b8cd
Remove false warning about copying the log config to a homeserver.yaml ( #11092 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-10-20 11:48:15 +00:00
Brendan Abolivier
78d5896d19
Document the version of Synapse each module callback was introduced in ( #11132 )
...
* Mention callbacks introduced in v1.37.0
According to the documentation introduced in https://github.com/matrix-org/synapse/pull/10062
* Mention callbacks introduced in v1.39.0
According to https://github.com/matrix-org/synapse/pull/10386 and https://github.com/matrix-org/synapse/pull/9884
* Mention callbacks introduced in v1.42.0
According to https://github.com/matrix-org/synapse/pull/10524
* Mention callbacks introduced in v1.44.0 and v1.45.0
As per https://github.com/matrix-org/synapse/pull/10898 , https://github.com/matrix-org/synapse/pull/10910 and https://github.com/matrix-org/synapse/pull/10894
* Mention callbacks introduced in v1.46.0
According to https://github.com/matrix-org/synapse/pull/10548
2021-10-20 11:04:27 +00:00
Sean Quah
9b016a0fb4
Remove link to #10947 from changelog
2021-10-20 12:04:20 +01:00
Sean Quah
522489fbcd
1.45.1
2021-10-20 12:00:03 +01:00
Sean Quah
df95d3aec2
Revert change to counting of deactivated users towards the monthly active users limit ( #11127 )
...
Temporarily revert "Add functionality to remove deactivated users from the monthly_active_users table (#10947 )".
This reverts commit eda8c88b84 .
2021-10-20 11:05:29 +01:00
Patrick Cloke
0dd0c40329
Add missing type hints to event fetching. ( #11121 )
...
Updates the event rows returned from the database to be
attrs classes instead of dictionaries.
2021-10-19 14:29:03 +00:00
Andrew Morgan
5e0e683541
Fix instances of [example]{.title-ref} in the upgrade notes ( #11118 )
2021-10-19 14:13:56 +01:00
David Robertson
a6c318735d
Merge branch 'master' into develop
2021-10-19 12:44:33 +01:00
David Robertson
95813ff43c
Be less inconsistent about v1.2.3 versus 1.2.3
2021-10-19 11:30:16 +01:00
David Robertson
a21f8c4b41
Duplicate known issues under 1.45 release
2021-10-19 11:21:21 +01:00
David Robertson
8b1185347a
1.45.0
2021-10-19 11:19:55 +01:00
Dan Callahan
191396f4ba
Reword changelog regarding a suspected regression ( #11117 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-10-19 11:16:52 +01:00
Richard van der Hoff
f3efa0036b
Move _persist_auth_tree into FederationEventHandler ( #11115 )
...
This is just a lift-and-shift, because it fits more naturally here. We do
rename it to `process_remote_join` at the same time though.
2021-10-19 10:24:09 +01:00
Richard van der Hoff
0170774b19
Rename _auth_and_persist_fetched_events ( #11116 )
...
... to `_auth_and_persist_outliers`, since that reflects its purpose better.
2021-10-19 10:23:55 +01:00
Richard van der Hoff
d85bc9a4a7
Include rejected status when we log events. ( #11008 )
...
If we find ourselves dealing with rejected events, we proably want to know
about it. Let's include it in the stringification of the event so that it gets
logged.
2021-10-19 10:21:50 +01:00
Eric Eastwood
260ca06f0f
Some more trials of trying to get many many events to backfill in order on remote
2021-10-19 01:55:40 -05:00
Eric Eastwood
a64bb2e811
Add changelog
2021-10-18 19:30:43 -05:00
Eric Eastwood
4983739156
Avoid constant missing prev_event fetching while backfilling
...
Persist backfilled event response from oldest -> newest to avoid
having to go fetch missing prev_events which de-outliers every
other event and screws up the stream_ordering. Missing prev_events
aren't fetched as "backfilled" so the stream_ordering was incrementing.
This helps us in MSC2716 land where we can more easily copy a similar
stream_ordering that the originating homeserver has.
2021-10-18 19:27:27 -05:00
Eric Eastwood
438e2226cc
Use OrderedDict to gurantee order returned is the same as we were building the list
...
We are using a Dict over a list to gurantee we don't duplicate the event if it's already in there.
I assume this is why we were using a Set before.
2021-10-18 16:40:04 -05:00
Eric Eastwood
f30302db58
Scratch debugging why events appear out of order on remote homeservers
2021-10-18 15:24:19 -05:00
Patrick Cloke
3ab55d43bd
Add missing type hints to synapse.api. ( #11109 )
...
* Convert UserPresenceState to attrs.
* Remove args/kwargs from error classes and explicitly pass msg/errorcode.
2021-10-18 15:01:10 -04:00
Richard van der Hoff
cc33d9eee2
Check auth on received events' auth_events ( #11001 )
...
Currently, when we receive an event whose auth_events differ from those we expect, we state-resolve between the two state sets, and check that the event passes auth based on the resolved state.
This means that it's possible for us to accept events which don't pass auth at their declared auth_events (or where the auth events themselves were rejected), leading to problems down the line like #10083 .
This change means we will:
* ignore any events where we cannot find the auth events
* reject any events whose auth events were rejected
* reject any events which do not pass auth at their declared auth_events.
Together with a whole raft of previous work, this is a partial fix to #9595 .
Fixes #6643 .
Based on #11009 .
2021-10-18 18:29:37 +01:00
Richard van der Hoff
a5d2ea3d08
Check *all* auth events for room id and rejection ( #11009 )
...
This fixes a bug where we would accept an event whose `auth_events` include
rejected events, if the rejected event was shadowed by another `auth_event`
with same `(type, state_key)`.
The approach is to pass a list of auth events into
`check_auth_rules_for_event` instead of a dict, which of course means updating
the call sites.
This is an extension of #10956 .
2021-10-18 18:28:30 +01:00
Brendan Abolivier
73743b8ad1
Document Synapse's behaviour when dealing with multiple modules ( #11096 )
...
Document Synapse's behaviour when multiple modules register the same
callback/web resource/etc.
Co-authored-by: reivilibre <oliverw@matrix.org >
2021-10-18 18:26:52 +02:00
Richard van der Hoff
e8f24b6c35
_run_push_actions_and_persist_event: handle no min_depth (#11014 )
...
Make sure that we correctly handle rooms where we do not yet have a
`min_depth`, and also add some comments and logging.
2021-10-18 17:17:15 +01:00
Hillery Shay
7d70582eb0
Fix broken export-data admin command and add a test for it to CI ( #11078 )
...
Fix broken export-data admin command and add a test for it to CI
2021-10-18 08:14:12 -07:00
David Robertson
37b845dabc
Don't remove local users from dir when the leave their last room ( #11103 )
2021-10-18 13:20:04 +00:00
David Robertson
e09be0c87a
Correctly exclude users when making a room public or private ( #11075 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-10-15 15:53:05 +01:00
Patrick Cloke
5573133348
Move experimental & retention config out of the server module. ( #11070 )
2021-10-15 14:30:48 +00:00
Sean Quah
6a67f3786a
Fix logging context warnings when losing replication connection ( #10984 )
...
Instead of triggering `__exit__` manually on the replication handler's
logging context, use it as a context manager so that there is an
`__enter__` call to balance the `__exit__`.
2021-10-15 13:10:58 +01:00
Dirk Klimpel
013e0f9cae
Update doc of the allowed characters for registration tokens ( #11093 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-10-15 09:56:39 +00:00
Eric Eastwood
daf498e099
Fix 500 error on /messages when we accumulate more than 5 backward extremities ( #11027 )
...
Found while working on the Gitter backfill script and noticed
it only happened after we sent 7 batches, https://gitlab.com/gitterHQ/webapp/-/merge_requests/2229#note_665906390
When there are more than 5 backward extremities for a given depth,
backfill will throw an error because we sliced the extremity list
to 5 but then try to iterate over the full list. This causes
us to look for state that we never fetched and we get a `KeyError`.
Before when calling `/messages` when there are more than 5 backward extremities:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/synapse/http/server.py", line 258, in _async_render_wrapper
callback_return = await self._async_render(request)
File "/usr/local/lib/python3.8/site-packages/synapse/http/server.py", line 446, in _async_render
callback_return = await raw_callback_return
File "/usr/local/lib/python3.8/site-packages/synapse/rest/client/room.py", line 580, in on_GET
msgs = await self.pagination_handler.get_messages(
File "/usr/local/lib/python3.8/site-packages/synapse/handlers/pagination.py", line 396, in get_messages
await self.hs.get_federation_handler().maybe_backfill(
File "/usr/local/lib/python3.8/site-packages/synapse/handlers/federation.py", line 133, in maybe_backfill
return await self._maybe_backfill_inner(room_id, current_depth, limit)
File "/usr/local/lib/python3.8/site-packages/synapse/handlers/federation.py", line 386, in _maybe_backfill_inner
likely_extremeties_domains = get_domains_from_state(states[e_id])
KeyError: '$zpFflMEBtZdgcMQWTakaVItTLMjLFdKcRWUPHbbSZJl'
```
2021-10-14 18:53:45 -05:00
Patrick Cloke
efd0074ab7
Ensure each charset is attempted only once during media preview. ( #11089 )
...
There's no point in trying more than once since it is guaranteed to
continually fail.
2021-10-14 18:51:44 +00:00
Patrick Cloke
e2f0b49b3f
Attempt different character encodings when previewing a URL. ( #11077 )
...
This follows similar logic to BeautifulSoup where we attempt different
character encodings until we find one which works.
2021-10-14 10:17:20 -04:00
Patrick Cloke
1609ccf8fe
Fix-up some type hints in the relations tests. ( #11076 )
2021-10-14 09:19:35 -04:00
reivilibre
50d8601581
Add a test for a workaround concerning the behaviour of third-party rule modules and SynapseErrors. ( #11071 )
2021-10-14 14:14:15 +01:00
David Robertson
b3698f945c
Merge tag 'v1.45.0rc2' into develop
...
Synapse 1.45.0rc2 (2021-10-14)
==============================
**Note:** This release candidate [fixes](https://github.com/matrix-org/synapse/issues/11053 ) the user directory [bug](https://github.com/matrix-org/synapse/issues/11025 ) present in 1.45.0rc1. However, the [performance issue](https://github.com/matrix-org/synapse/issues/11049 ) which appeared in v1.44.0 is yet to be resolved.
Bugfixes
--------
- Fix a long-standing bug when using multiple event persister workers where events were not correctly sent down `/sync` due to a race. ([\#11045](https://github.com/matrix-org/synapse/issues/11045 ))
- Fix a bug introduced in Synapse 1.45.0rc1 where the user directory would stop updating if it processed an event from a
user not in the `users` table. ([\#11053](https://github.com/matrix-org/synapse/issues/11053 ))
- Fix a bug introduced in Synapse v1.44.0 when logging errors during oEmbed processing. ([\#11061](https://github.com/matrix-org/synapse/issues/11061 ))
Internal Changes
----------------
- Add an 'approximate difference' method to `StateFilter`. ([\#10825](https://github.com/matrix-org/synapse/issues/10825 ))
- Fix inconsistent behavior of `get_last_client_by_ip` when reporting data that has not been stored in the database yet. ([\#10970](https://github.com/matrix-org/synapse/issues/10970 ))
- Fix a bug introduced in Synapse 1.21.0 that causes opentracing and Prometheus metrics for replication requests to be measured incorrectly. ([\#10996](https://github.com/matrix-org/synapse/issues/10996 ))
- Ensure that cache config tests do not share state. ([\#11036](https://github.com/matrix-org/synapse/issues/11036 ))
2021-10-14 11:42:16 +01:00
David Robertson
b1c1a34f46
it appeared in 1.44, not 45rc1
2021-10-14 11:20:02 +01:00
David Robertson
4d761d24ba
mentioned -> which appeared
2021-10-14 11:18:40 +01:00
David Robertson
87c3a6dcc0
Refer to the bugs mentioned in 1.45.0rc1 note
2021-10-14 11:03:35 +01:00
David Robertson
99a4e5222d
1.45.0rc2
2021-10-14 10:59:27 +01:00
Eric Eastwood
35d6b914eb
Resolve and share state_groups for all historical events in batch (MSC2716) ( #10975 )
...
Resolve and share `state_groups` for all historical events in batch. This also helps for showing the appropriate avatar/displayname in Element and will work whenever `/messages` has one of the historical messages as the first message in the batch.
This does have the flaw where if you just insert a single historical event somewhere, it probably won't resolve the state correctly from `/messages` or `/context` since it will grab a non historical event above or below with resolved state which never included the historical state back then. For the same reasions, this also does not work in Element between the transition from actual messages to historical messages. In the Gitter case, this isn't really a problem since all of the historical messages are in one big lump at the beginning of the room.
For a future iteration, might be good to look at `/messages` and `/context` to additionally add the `state` for any historical messages in that batch.
---
How are the `state_groups` shared? To illustrate the `state_group` sharing, see this example:
**Before** (new `state_group` for every event 😬 , very inefficient):
```
# Tests from https://github.com/matrix-org/complement/pull/206
$ COMPLEMENT_ALWAYS_PRINT_SERVER_LOGS=1 COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh TestBackfillingHistory/parallel/should_resolve_member_state_events_for_historical_events
create_new_client_event m.room.member event=$_JXfwUDIWS6xKGG4SmZXjSFrizhARM7QblhATVWWUcA state_group=None
create_new_client_event org.matrix.msc2716.insertion event=$1ZBfmBKEjg94d-vGYymKrVYeghwBOuGJ3wubU1-I9y0 state_group=9
create_new_client_event org.matrix.msc2716.insertion event=$Mq2JvRetTyclPuozRI682SAjYp3GqRuPc8_cH5-ezPY state_group=10
create_new_client_event m.room.message event=$MfmY4rBQkxrIp8jVwVMTJ4PKnxSigpG9E2cn7S0AtTo state_group=11
create_new_client_event m.room.message event=$uYOv6V8wiF7xHwOMt-60d1AoOIbqLgrDLz6ZIQDdWUI state_group=12
create_new_client_event m.room.message event=$PAbkJRMxb0bX4A6av463faiAhxkE3FEObM1xB4D0UG4 state_group=13
create_new_client_event org.matrix.msc2716.batch event=$Oy_S7AWN7rJQe_MYwGPEy6RtbYklrI-tAhmfiLrCaKI state_group=14
```
**After** (all events in batch sharing `state_group=10`) (the base insertion event has `state_group=8` which matches the `prev_event` we're inserting next to):
```
# Tests from https://github.com/matrix-org/complement/pull/206
$ COMPLEMENT_ALWAYS_PRINT_SERVER_LOGS=1 COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh TestBackfillingHistory/parallel/should_resolve_member_state_events_for_historical_events
create_new_client_event m.room.member event=$PWomJ8PwENYEYuVNoG30gqtybuQQSZ55eldBUSs0i0U state_group=None
create_new_client_event org.matrix.msc2716.insertion event=$e_mCU7Eah9ABF6nQU7lu4E1RxIWccNF05AKaTT5m3lw state_group=9
create_new_client_event org.matrix.msc2716.insertion event=$ui7A3_GdXIcJq0C8GpyrF8X7B3DTjMd_WGCjogax7xU state_group=10
create_new_client_event m.room.message event=$EnTIM5rEGVezQJiYl62uFBl6kJ7B-sMxWqe2D_4FX1I state_group=10
create_new_client_event m.room.message event=$LGx5jGONnBPuNhAuZqHeEoXChd9ryVkuTZatGisOPjk state_group=10
create_new_client_event m.room.message event=$wW0zwoN50lbLu1KoKbybVMxLbKUj7GV_olozIc5i3M0 state_group=10
create_new_client_event org.matrix.msc2716.batch event=$5ZB6dtzqFBCEuMRgpkU201Qhx3WtXZGTz_YgldL6JrQ state_group=10
```
2021-10-13 17:44:00 -05:00
David Robertson
404444260a
Fix upgrade dead links ( #11069 )
2021-10-13 14:32:43 +01:00
David Robertson
317e9e415c
Rearrange the user_directory's _handle_deltas function ( #11035 )
...
* Pull out `_handle_room_membership_event`
* Discard excluded users early
* Rearrange logic so the change is membership is effectively switched over. See PR for rationale.
2021-10-13 12:50:00 +00:00
Sean Quah
b59f3281d5
Remove dead code from MediaFilePaths ( #11056 )
2021-10-13 13:41:24 +01:00
David Robertson
b3e9b00fb2
Merge remote-tracking branch 'origin/release-v1.45' into develop
2021-10-13 12:46:30 +01:00
Patrick Cloke
1f9d0b8a7a
Add type hints to synapse.events.*. ( #11066 )
...
Except `synapse/events/__init__.py`, which will be done in a follow-up.
2021-10-13 07:24:07 -04:00
Azrenbeth
cdd308845b
Port the Password Auth Providers module interface to the new generic interface ( #10548 )
...
Co-authored-by: Azrenbeth <7782548+Azrenbeth@users.noreply.github.com >
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-10-13 11:21:52 +00:00
Patrick Cloke
732bbf6737
Be more lenient when parsing the version for oEmbed responses. ( #11065 )
2021-10-13 07:00:07 -04:00
David Robertson
b83e822556
Stop user directory from failing if it encounters users not in the users table. ( #11053 )
...
The following scenarios would halt the user directory updater:
- user joins room
- user leaves room
- user present in room which switches from private to public, or vice versa.
for two classes of users:
- appservice senders
- users missing from the user table.
If this happened, the user directory would be stuck, unable to make forward progress.
Exclude both cases from the user directory, so that we ignore them.
Co-authored-by: Eric Eastwood <erice@element.io >
Co-authored-by: reivilibre <oliverw@matrix.org >
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-10-13 09:38:22 +00:00
reivilibre
2a2b189130
Mark Module API error imports as re-exported and mark Synapse as containing type annotations ( #11054 )
2021-10-13 08:42:41 +01:00
Patrick Cloke
8711e15734
Always dump logs from trial during CI. ( #11068 )
...
Instead of only dumping them if trial passes.
2021-10-12 20:09:49 +00:00
Dirk Klimpel
988de0afb0
Simplify the user admin API tests ( #11048 )
2021-10-12 20:38:48 +01:00
Hillery Shay
5dcacdf6d1
Add support for ubuntu 21.10 "Impish Indri" ( #11024 )
...
* support ubuntu 21.10 indri
* add changelog
* update to correct codename
Co-authored-by: Brendan Abolivier <github@brendanabolivier.com >
Co-authored-by: Brendan Abolivier <github@brendanabolivier.com >
2021-10-12 11:29:39 -07:00
Patrick Cloke
9abc5f2a05
Merge remote-tracking branch 'origin/release-v1.45' into develop
2021-10-12 14:21:05 -04:00
Sean Quah
84f5d83257
Add tests for MediaFilePaths ( #11057 )
2021-10-12 18:19:35 +01:00
Sean Quah
8eaffe013c
Update _wrap_in_base_path type hints to preserve function arguments ( #11055 )
2021-10-12 18:19:21 +01:00
Patrick Cloke
1db9282dfa
Fix formatting string when oEmbed errors occur. ( #11061 )
2021-10-12 17:15:42 +00:00
Erik Johnston
77ea03086c
Merge remote-tracking branch 'origin/release-v1.45' into develop
2021-10-12 14:41:13 +01:00
Erik Johnston
333d6f4e84
Fix race in MultiWriterIdGenerator ( #11045 )
...
The race allowed the current position to advance too far when stream IDs
are still being persisted.
This happened when it received a new stream ID from a remote write
between a new stream ID being allocated and it being added to the set of
unpersisted stream IDs.
Fixes #9424 .
2021-10-12 14:27:09 +01:00
Patrick Cloke
5c35074d85
Reset global cache state before cache tests. ( #11036 )
...
This reverts #11019 and structures the code a bit more like it was before #10985 .
The global cache state must be reset before running the tests since other test
cases might have configured caching (and thus touched the global state).
2021-10-12 12:55:33 +00:00
Sean Quah
36224e056a
Add type hints to synapse.storage.databases.main.client_ips ( #10972 )
2021-10-12 13:50:34 +01:00
Brendan Abolivier
a18c568516
Merge tag 'v1.45.0rc1' into develop
...
Synapse 1.45.0rc1 (2021-10-12)
==============================
**Note:** We are aware of [a performance issue](https://github.com/matrix-org/synapse/issues/11049 ) introduced in Synapse v1.44.0, as well as [a bug](https://github.com/matrix-org/synapse/issues/11025 ) with the user directory when using application services. While this release candidate doesn't fix either of those issues, a second release candidate is expected to come out in a few days to address them.
Media storage providers module that read from Synapse's configuration need changes as of this version, see the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1450 ) for more information.
Features
--------
- Add [MSC3069](https://github.com/matrix-org/matrix-doc/pull/3069 ) support to `/account/whoami`. ([\#9655](https://github.com/matrix-org/synapse/issues/9655 ))
- Support autodiscovery of oEmbed previews. ([\#10822](https://github.com/matrix-org/synapse/issues/10822 ))
- Add a `user_may_send_3pid_invite` spam checker callback for modules to allow or deny 3PID invites. ([\#10894](https://github.com/matrix-org/synapse/issues/10894 ))
- Add a spam checker callback to allow or deny room joins. ([\#10910](https://github.com/matrix-org/synapse/issues/10910 ))
- Include an `update_synapse_database` script in the distribution. Contributed by @Fizzadar at Beeper. ([\#10954](https://github.com/matrix-org/synapse/issues/10954 ))
- Include exception information in JSON logging output. Contributed by @Fizzadar at Beeper. ([\#11028](https://github.com/matrix-org/synapse/issues/11028 ))
Bugfixes
--------
- Fix a minor bug in the response to `/_matrix/client/r0/voip/turnServer`. Contributed by @lukaslihotzki. ([\#10922](https://github.com/matrix-org/synapse/issues/10922 ))
- Fix a bug where empty `yyyy-mm-dd/` directories would be left behind in the media store's `url_cache_thumbnails/` directory. ([\#10924](https://github.com/matrix-org/synapse/issues/10924 ))
- Fix a bug introduced in Synapse v1.40.0 where the signature checks for room version 8 and 9 could be applied to earlier room versions in some situations. ([\#10927](https://github.com/matrix-org/synapse/issues/10927 ))
- Fix a long-standing bug wherein deactivated users still count towards the monthly active users limit. ([\#10947](https://github.com/matrix-org/synapse/issues/10947 ))
- Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#10956](https://github.com/matrix-org/synapse/issues/10956 ))
- Fix a long-standing bug where rebuilding the user directory wouldn't exclude support and deactivated users. ([\#10960](https://github.com/matrix-org/synapse/issues/10960 ))
- Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) `/batch_send` endpoint rejecting subsequent batches with unknown batch ID error in existing room versions from the room creator. ([\#10962](https://github.com/matrix-org/synapse/issues/10962 ))
- Fix a bug that could leak local users' per-room nicknames and avatars when the user directory is rebuilt. ([\#10981](https://github.com/matrix-org/synapse/issues/10981 ))
- Fix a long-standing bug where the remainder of a batch of user directory changes would be silently dropped if the server left a room early in the batch. ([\#10982](https://github.com/matrix-org/synapse/issues/10982 ))
- Correct a bugfix introduced in Synapse v1.44.0 that would catch the wrong error if a connection is lost before a response could be written to it. ([\#10995](https://github.com/matrix-org/synapse/issues/10995 ))
- Fix a long-standing bug where local users' per-room nicknames/avatars were visible to anyone who could see you in the user directory. ([\#11002](https://github.com/matrix-org/synapse/issues/11002 ))
- Fix a long-standing bug where a user's per-room nickname/avatar would overwrite their profile in the user directory when a room was made public. ([\#11003](https://github.com/matrix-org/synapse/issues/11003 ))
- Work around a regression, introduced in Synapse v1.39.0, that caused `SynapseError`s raised by the experimental third-party rules module callback `check_event_allowed` to be ignored. ([\#11042](https://github.com/matrix-org/synapse/issues/11042 ))
- Fix a bug in [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) insertion events in rooms that could cause cross-talk/conflicts between batches. ([\#10877](https://github.com/matrix-org/synapse/issues/10877 ))
Improved Documentation
----------------------
- Change wording ("reference homeserver") in Synapse repository documentation. Contributed by @maxkratz. ([\#10971](https://github.com/matrix-org/synapse/issues/10971 ))
- Fix a dead URL in development documentation (SAML) and change wording from "Riot" to "Element". Contributed by @maxkratz. ([\#10973](https://github.com/matrix-org/synapse/issues/10973 ))
- Add additional content to the Welcome and Overview page of the documentation. ([\#10990](https://github.com/matrix-org/synapse/issues/10990 ))
- Update links to MSCs in documentation. Contributed by @dklimpel. ([\#10991](https://github.com/matrix-org/synapse/issues/10991 ))
Internal Changes
----------------
- Improve type hinting in `synapse.util`. ([\#10888](https://github.com/matrix-org/synapse/issues/10888 ))
- Add further type hints to `synapse.storage.util`. ([\#10892](https://github.com/matrix-org/synapse/issues/10892 ))
- Fix type hints to be compatible with an upcoming change to Twisted. ([\#10895](https://github.com/matrix-org/synapse/issues/10895 ))
- Update utility code to handle C implementations of frozendict. ([\#10902](https://github.com/matrix-org/synapse/issues/10902 ))
- Drop old functionality which maintained database compatibility with Synapse versions before v1.31. ([\#10903](https://github.com/matrix-org/synapse/issues/10903 ))
- Clean-up configuration helper classes for the `ServerConfig` class. ([\#10915](https://github.com/matrix-org/synapse/issues/10915 ))
- Use direct references to config flags. ([\#10916](https://github.com/matrix-org/synapse/issues/10916 ), [\#10959](https://github.com/matrix-org/synapse/issues/10959 ), [\#10985](https://github.com/matrix-org/synapse/issues/10985 ))
- Clean up some of the federation event authentication code for clarity. ([\#10926](https://github.com/matrix-org/synapse/issues/10926 ), [\#10940](https://github.com/matrix-org/synapse/issues/10940 ), [\#10986](https://github.com/matrix-org/synapse/issues/10986 ), [\#10987](https://github.com/matrix-org/synapse/issues/10987 ), [\#10988](https://github.com/matrix-org/synapse/issues/10988 ), [\#11010](https://github.com/matrix-org/synapse/issues/11010 ), [\#11011](https://github.com/matrix-org/synapse/issues/11011 ))
- Refactor various parts of the codebase to use `RoomVersion` objects instead of room version identifier strings. ([\#10934](https://github.com/matrix-org/synapse/issues/10934 ))
- Refactor user directory tests in preparation for upcoming changes. ([\#10935](https://github.com/matrix-org/synapse/issues/10935 ))
- Include the event id in the logcontext when handling PDUs received over federation. ([\#10936](https://github.com/matrix-org/synapse/issues/10936 ))
- Fix logged errors in unit tests. ([\#10939](https://github.com/matrix-org/synapse/issues/10939 ))
- Fix a broken test to ensure that consent configuration works during registration. ([\#10945](https://github.com/matrix-org/synapse/issues/10945 ))
- Add type hints to filtering classes. ([\#10958](https://github.com/matrix-org/synapse/issues/10958 ))
- Add type-hint to `HomeserverTestcase.setup_test_homeserver`. ([\#10961](https://github.com/matrix-org/synapse/issues/10961 ))
- Fix the test utility function `create_room_as` so that `is_public=True` will explicitly set the `visibility` parameter of room creation requests to `public`. Contributed by @AndrewFerr. ([\#10963](https://github.com/matrix-org/synapse/issues/10963 ))
- Make the release script more robust and transparent. ([\#10966](https://github.com/matrix-org/synapse/issues/10966 ))
- Refactor [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) `/batch_send` mega function into smaller handler functions. ([\#10974](https://github.com/matrix-org/synapse/issues/10974 ))
- Log stack traces when a missing opentracing span is detected. ([\#10983](https://github.com/matrix-org/synapse/issues/10983 ))
- Update GHA config to run tests against Python 3.10 and PostgreSQL 14. ([\#10992](https://github.com/matrix-org/synapse/issues/10992 ))
- Fix a long-standing bug where `ReadWriteLock`s could drop logging contexts on exit. ([\#10993](https://github.com/matrix-org/synapse/issues/10993 ))
- Add a `CODEOWNERS` file to automatically request reviews from the `@matrix-org/synapse-core` team on new pull requests. ([\#10994](https://github.com/matrix-org/synapse/issues/10994 ))
- Add further type hints to `synapse.state`. ([\#11004](https://github.com/matrix-org/synapse/issues/11004 ))
- Remove the deprecated `BaseHandler` object. ([\#11005](https://github.com/matrix-org/synapse/issues/11005 ))
- Bump mypy version for CI to 0.910, and pull in new type stubs for dependencies. ([\#11006](https://github.com/matrix-org/synapse/issues/11006 ))
- Fix CI to run the unit tests without optional deps. ([\#11017](https://github.com/matrix-org/synapse/issues/11017 ))
- Ensure that cache config tests do not share state. ([\#11019](https://github.com/matrix-org/synapse/issues/11019 ))
- Add additional type hints to `synapse.server_notices`. ([\#11021](https://github.com/matrix-org/synapse/issues/11021 ))
- Add additional type hints for `synapse.push`. ([\#11023](https://github.com/matrix-org/synapse/issues/11023 ))
- When installing the optional developer dependencies, also include the dependencies needed for type-checking and unit testing. ([\#11034](https://github.com/matrix-org/synapse/issues/11034 ))
- Remove unnecessary list comprehension from `synapse_port_db` to satisfy code style requirements. ([\#11043](https://github.com/matrix-org/synapse/issues/11043 ))
2021-10-12 12:33:41 +01:00
Brendan Abolivier
a5871f53ed
Fixup changelog
2021-10-12 11:43:13 +01:00
Brendan Abolivier
8afa48f7f6
Typo
2021-10-12 11:38:33 +01:00
Brendan Abolivier
f6b62bdc4d
Add a link to the upgrade notes
2021-10-12 11:36:27 +01:00
Sean Quah
b8b905c4ea
Fix inconsistent behavior of get_last_client_by_ip ( #10970 )
...
Make `get_last_client_by_ip` return the same dictionary structure
regardless of whether the data has been persisted to the database.
This change will allow slightly cleaner type hints to be applied later
on.
2021-10-12 11:24:05 +01:00
Brendan Abolivier
9e13cd98af
Update upgrade notes
2021-10-12 11:23:51 +01:00
Sean Quah
6b18eb4430
Fix opentracing and Prometheus metrics for replication requests ( #10996 )
...
This commit fixes two bugs to do with decorators not instrumenting
`ReplicationEndpoint`'s `send_request` correctly. There are two
decorators on `send_request`: Prometheus' `Gauge.track_inprogress()`
and Synapse's `opentracing.trace`.
`Gauge.track_inprogress()` does not have any support for async
functions when used as a decorator. Since async functions behave like
regular functions that return coroutines, only the creation of the
coroutine was covered by the metric and none of the actual body of
`send_request`.
`Gauge.track_inprogress()` returns a regular, non-async function
wrapping `send_request`, which is the source of the next bug.
The `opentracing.trace` decorator would normally handle async functions
correctly, but since the wrapped `send_request` is a non-async function,
the decorator ends up suffering from the same issue as
`Gauge.track_inprogress()`: the opentracing span only measures the
creation of the coroutine and none of the actual function body.
Using `Gauge.track_inprogress()` as a context manager instead of a
decorator resolves both bugs.
2021-10-12 11:23:46 +01:00
Brendan Abolivier
b01e953291
Add warning about known issues
2021-10-12 10:58:26 +01:00
Brendan Abolivier
60af28c5dd
Fixup changelog
2021-10-12 10:55:39 +01:00
Brendan Abolivier
8c5255b664
1.45.0rc1
2021-10-12 10:47:15 +01:00
reivilibre
406f7bfa17
Add an approximate difference method to StateFilters ( #10825 )
2021-10-12 10:44:59 +01:00
David Robertson
e0f11ae4a5
disallow-untyped-defs for synapse.push ( #11023 )
2021-10-11 17:42:10 +01:00
reivilibre
5e29d417fc
Include the requirements for [mypy,lint] in [dev] ( #11034 )
2021-10-11 16:34:31 +01:00
reivilibre
3828dd819b
Pass through SynapseErrors that are raised from experimental check_event_allowed callback of the module API ( #11042 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2021-10-11 16:29:02 +01:00
reivilibre
4c838112dc
Remove unnecessary list comprehension in synapse_port_db to fix linting in CI ( #11043 )
2021-10-11 16:28:29 +01:00
reivilibre
b742cb2e4a
Release script improvements ( #10966 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-10-11 14:48:38 +01:00
Eric Eastwood
a7d22c36db
Refactor MSC2716 /batch_send endpoint into separate handler functions ( #10974 )
2021-10-08 18:35:00 -05:00
Patrick Cloke
1b112840d2
Autodiscover oEmbed endpoint from returned HTML ( #10822 )
...
Searches the returned HTML for an oEmbed endpoint using the
autodiscovery mechanism (`<link rel=...>`), and will request it
to generate the preview.
2021-10-08 14:14:42 -04:00
Olivier Wilkinson (reivilibre)
593eeac19e
Revert accidental push to develop.
2021-10-08 17:17:22 +01:00
Olivier Wilkinson (reivilibre)
d51a340019
Newsfile
...
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org >
2021-10-08 17:12:40 +01:00
Olivier Wilkinson (reivilibre)
9f23ff78da
Update contributing guide to use [all,dev]
2021-10-08 17:11:32 +01:00
Olivier Wilkinson (reivilibre)
c576598a68
Include the requirements for [mypy,lint] in [dev]
2021-10-08 17:11:14 +01:00
David Robertson
51a5da74cc
Annotate synapse.storage.util ( #10892 )
...
Also mark `synapse.streams` as having has no untyped defs
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
2021-10-08 14:25:16 +00:00
David Robertson
797ee7812d
Relax ignore-missing-imports for modules that have stubs now and update mypy ( #11006 )
...
Updating mypy past version 0.9 means that third-party stubs are no-longer distributed with typeshed. See http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html for details.
We therefore pull in stub packages in setup.py
Additionally, some modules that we were previously ignoring import failures for now have stubs. So let's use them.
The rest of this change consists of fixups to make the newer mypy + stubs pass CI.
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-10-08 14:49:41 +01:00
David Robertson
670a8d9a1e
Fix overwriting profile when making room public ( #11003 )
...
This splits apart `handle_new_user` into a function which adds an entry to the `user_directory` and a function which updates the room sharing tables. I plan to continue doing more of this kind of refactoring to clarify the implementation.
2021-10-08 12:52:48 +01:00
Patrick Cloke
eb9ddc8c2e
Remove the deprecated BaseHandler. ( #11005 )
...
The shared ratelimit function was replaced with a dedicated
RequestRatelimiter class (accessible from the HomeServer
object).
Other properties were copied to each sub-class that inherited
from BaseHandler.
2021-10-08 07:44:43 -04:00
Sean Quah
49a683d871
Fix long-standing bug where ReadWriteLock could drop logging contexts ( #10993 )
...
Use `PreserveLoggingContext()` to ensure that logging contexts are not
lost when exiting a read/write lock.
When exiting a read/write lock, callbacks on a `Deferred` are triggered
as a signal to any waiting coroutines. Any waiting coroutine that
becomes runnable is likely to follow the Synapse logging context rules
and will restore its own logging context, then either run to completion
or await another `Deferred`, resetting the logging context in the
process.
2021-10-08 12:27:16 +01:00
Nick Barrett
bb228f3523
Include exception in json logging ( #11028 )
2021-10-08 13:08:25 +02:00
Erik Johnston
0b4d5ce5e3
Fix CI to run the unit tests without optional deps ( #11017 )
...
This also turns off calculating code coverage, as we didn't use it and it was a lot of noise
2021-10-08 10:05:48 +01:00
David Robertson
e79ee48313
disallow-untyped-defs for synapse.server_notices ( #11021 )
2021-10-07 19:55:15 +01:00
Patrick Cloke
7301019d48
Ensure each cache config test uses separate state. ( #11019 )
...
Hopefully this fixes these tests sometimes failing in CI.
2021-10-07 09:38:31 -04:00
David Robertson
e0bf34dada
Don't alter directory entries for local users when setting a per-room nickname ( #11002 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-10-07 13:26:11 +01:00
Richard van der Hoff
96fe77c254
Improve the logging in _auth_and_persist_outliers ( #11010 )
...
Include the event ids being peristed
2021-10-07 11:43:25 +00:00
Richard van der Hoff
86af6b2f0e
Add a comment in _process_received_pdu ( #11011 )
2021-10-07 12:20:03 +01:00
Brendan Abolivier
52aefd5086
Catch AttributeErrors when calling registerProducer ( #10995 )
...
Looks like the wrong exception type was caught in #10932 .
2021-10-07 10:37:10 +00:00
David Robertson
f563676c09
disallow-untyped-defs for synapse.state (#11004 )
...
* `disallow-untyped-defs` for `synapse.state`
Much smaller than I was expecting!
2021-10-06 17:55:25 +00:00
Andrew Morgan
e564bdd127
Add content to the Synapse documentation intro page ( #10990 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-10-06 17:09:35 +00:00
Brendan Abolivier
4e51621064
Add a spamchecker method to allow or deny 3pid invites ( #10894 )
...
This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline.
Note that a module callback already exists for 3pid invites (https://matrix-org.github.io/synapse/develop/modules/third_party_rules_callbacks.html#check_threepid_can_be_invited ) but it doesn't check whether the sender of the invite is allowed to send it.
2021-10-06 17:18:13 +02:00
Patrick Cloke
f4b1a9a527
Require direct references to configuration variables. ( #10985 )
...
This removes the magic allowing accessing configurable
variables directly from the config object. It is now required
that a specific configuration class is used (e.g. `config.foo`
must be replaced with `config.server.foo`).
2021-10-06 10:47:41 -04:00
Brendan Abolivier
829f2a82b0
Add a spamchecker callback to allow or deny room joins ( #10910 )
...
Co-authored-by: Erik Johnston <erik@matrix.org >
2021-10-06 14:32:16 +00:00
Brendan Abolivier
b0460936c8
Add the synapse-core team as code owners ( #10994 )
...
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com >
2021-10-06 16:03:17 +02:00
David Robertson
370bca32e6
Don't drop user dir deltas when server leaves room ( #10982 )
...
Fix a long-standing bug where a batch of user directory changes would be
silently dropped if the server left a room early in the batch.
* Pull out `wait_for_background_update` in tests
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-10-06 12:56:45 +00:00
Max Kratz
38b7db5885
Updated development doc on samling environment for testing. ( #10973 )
2021-10-06 07:20:41 -04:00
Nick Barrett
c80878d22a
Add --run-background-updates option to update_database script. ( #10954 )
...
Signed-off-by: Nick Barrett <nick@beeper.com >
2021-10-06 11:26:18 +01:00
David Robertson
f8d0f72b27
More types for synapse.util, part 1 ( #10888 )
...
The following modules now pass `disallow_untyped_defs`:
* synapse.util.caches.cached_call
* synapse.util.caches.lrucache
* synapse.util.caches.response_cache
* synapse.util.caches.stream_change_cache
* synapse.util.caches.ttlcache pass
* synapse.util.daemonize
* synapse.util.patch_inline_callbacks pass `no-untyped-defs`
* synapse.util.versionstring
Additional typing in synapse.util.metrics. Didn't get this to pass `no-untyped-defs`, think I'll need to watch #10847
2021-10-06 11:20:49 +01:00
Max Kratz
6744273f0b
Remove "reference" wording according Synapse homeserver ( #10971 )
2021-10-06 10:05:07 +00:00
David Robertson
4f00432ce1
Fix potential leak of per-room profiles when the user dir is rebuilt. ( #10981 )
...
There are two steps to rebuilding the user directory:
1. a scan over rooms, followed by
2. a scan over local users.
The former reads avatars and display names from the `room_memberships`
table and therefore contains potentially private avatars and
display names. The latter reads from the the `profiles` table which only
contains public data; moreover it will overwrite any private profiles
that the rooms scan may have written to the user directory. This means
that the rebuild could leak private user while the rebuild was in
progress, only to later cover up the leaks once the rebuild had completed.
This change skips over local users when writing user_directory rows
when scanning rooms. Doing so means that it'll take longer for a rebuild
to make local users searchable, which is unfortunate. I think a future
PR can improve this by swapping the order of the two steps above. (And
indeed there's more to do here, e.g. copying from `profiles` without
going via Python.)
Small tidy-ups while I'm here:
* Remove duplicated code from test_initial. This was meant to be pulled into `purge_and_rebuild_user_dir`.
* Move `is_public` before updating sharing tables. No functional change; it's still before the first read of `is_public`.
* Don't bother creating a set from dict keys. Slightly nicer and makes the code simpler.
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-10-05 18:35:25 +01:00
Eric Eastwood
392863fbf1
Fix logic flaw preventing tracking of MSC2716 events in existing room versions ( #10962 )
...
We correctly allowed using the MSC2716 batch endpoint for
the room creator in existing room versions but accidentally didn't track
the events because of a logic flaw.
This prevented you from connecting subsequent chunks together because it would
throw the unknown batch ID error.
We only want to process MSC2716 events when:
- The room version supports MSC2716
- Any room where the homeserver has the `msc2716_enabled` experimental feature enabled and the event is from the room creator
2021-10-05 11:51:57 -05:00
Brendan Abolivier
2faac70e63
Merge branch 'master' into develop
2021-10-05 14:13:25 +01:00
Brendan Abolivier
b2c5e79291
1.44.0
2021-10-05 13:45:24 +01:00
Richard van der Hoff
3a5b0cbe7a
Ensure that we reject events which use rejected events for auth ( #10956 )
...
When we consider whether to accept events, we should not accept those which
depend on rejected events for their auth events.
This (together with earlier changes such as
https://github.com/matrix-org/synapse/pull/10771 and
https://github.com/matrix-org/synapse/pull/10896 ) forms a partial fix to
https://github.com/matrix-org/synapse/issues/9595 . There still remain code
paths where we do not check the `auth_events` at all.
2021-10-05 13:23:29 +01:00
Richard van der Hoff
787af4a106
Host cache_joined_hosts_for_event to caller ( #10986 )
...
`_check_event_auth` is only called in two places, and only one of those sets
`send_on_behalf_of`. Warming the cache isn't really part of auth anyway, so
moving it out makes a lot more sense.
2021-10-05 13:01:41 +01:00
Richard van der Hoff
d099535deb
_update_auth_events_and_context_for_auth: add some comments (#10987 )
...
Add some more comments about wtf is going on here.
2021-10-05 12:50:38 +01:00
Richard van der Hoff
cb88ed912b
_check_event_auth: move event validation earlier (#10988 )
...
There's little point in doing a fancy state reconciliation dance if the event
itself is invalid.
Likewise, there's no point checking it again in `_check_for_soft_fail`.
2021-10-05 12:50:07 +01:00
David Robertson
6f6e956338
Run CI with Python 3.10 and Postgres 14 ( #10992 )
2021-10-05 12:43:04 +01:00
Dirk Klimpel
7036a7a60a
Update links to MSCs in documentation ( #10991 )
...
Based on matrix-doc switching from master -> main and
MSCs being merged.
2021-10-05 11:35:19 +00:00
Sean Quah
660c8c1415
Log stack traces when a missing opentracing span is detected ( #10983 )
...
Make it easier to track down where opentracing spans are going missing
by including stack traces in the logs.
2021-10-05 12:23:25 +01:00
Hillery Shay
eda8c88b84
Add functionality to remove deactivated users from the monthly_active_users table ( #10947 )
...
* add test
* add function to remove user from monthly active table in deactivate code
* add function to remove user from monthly active table
* add changelog entry
* update changelog number
* requested changes
* update docstring on new function
* fix lint error
* Update synapse/storage/databases/main/monthly_active_users.py
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-10-04 08:34:42 -07:00
AndrewFerr
30f0240401
Make is_public Optional[bool] for create_room_as test util ( #10951 ) ( #10963 )
...
Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net >
2021-10-04 14:43:03 +00:00
Brendan Abolivier
730b40dd5e
Merge tag 'v1.44.0rc3' into develop
...
Synapse 1.44.0rc3 (2021-10-04)
==============================
Bugfixes
--------
- Fix a bug introduced in Synapse v1.40.0 where changing a user's display name or avatar in a restricted room would cause an authentication error. ([\#10933](https://github.com/matrix-org/synapse/issues/10933 ))
- Fix `/admin/whois/{user_id}` endpoint, which was broken in v1.44.0rc1. ([\#10968](https://github.com/matrix-org/synapse/issues/10968 ))
2021-10-04 15:33:42 +01:00
Brendan Abolivier
2d2c6a41fe
1.44.0rc3
2021-10-04 14:57:40 +01:00
David Robertson
f7b034a24b
Consistently exclude from user_directory ( #10960 )
...
* Introduce `should_include_local_users_in_dir`
We exclude three kinds of local users from the user_directory tables. At
present we don't consistently exclude all three in the same places. This
commit introduces a new function to gather those exclusion conditions
together. Because we have to handle local and remote users in different
ways, I've made that function only consider the case of remote users.
It's the caller's responsibility to make the local versus remote
distinction clear and correct.
A test fixup is required. The test now hits a path which makes db
queries against the users table. The expected rows were missing, because
we were using a dummy user that hadn't actually been registered.
We also add new test cases to covert the exclusion logic.
----
By my reading this makes these changes:
* When an app service user registers or changes their profile, they will
_not_ be added to the user directory. (Previously only support and
deactivated users were excluded). This is consistent with the logic that
rebuilds the user directory. See also [the discussion
here](https://github.com/matrix-org/synapse/pull/10914#discussion_r716859548 ).
* When rebuilding the directory, exclude support and disabled users from
room sharing tables. Previously only appservice users were excluded.
* Exclude all three categories of local users when rebuilding the
directory. Previously `_populate_user_directory_process_users` didn't do
any exclusion.
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-10-04 11:45:51 +00:00
Patrick Cloke
a0f48ee89d
Use direct references for configuration variables (part 7). ( #10959 )
2021-10-04 07:18:54 -04:00
Sean Quah
d1cbad388f
Fix error in get_user_ip_and_agents when fetching from the database ( #10968 )
2021-10-01 17:22:13 +01:00
Patrick Cloke
a071144a5c
Merge remote-tracking branch 'origin/release-v1.44' into develop
2021-10-01 12:21:28 -04:00
Patrick Cloke
32072dcdac
Strip "join_authorised_via_users_server" from join events which do not need it. ( #10933 )
...
This fixes a "Event not signed by authorising server" error when
transition room member from join -> join, e.g. when updating a
display name or avatar URL for restricted rooms.
2021-10-01 11:39:17 -04:00
David Robertson
e46ac85d67
type-hint HomeserverTestcase.setup_test_homeserver ( #10961 )
...
* type-hint `HomeserverTestcase.setup_test_homeserver`
For better IDE completion. A small drive-by.
2021-10-01 12:22:47 +01:00
Patrick Cloke
7e440520c9
Add type hints to filtering classes. ( #10958 )
2021-10-01 07:02:32 -04:00
Patrick Cloke
9e5a429c8b
Clean-up registration tests ( #10945 )
...
Uses `override_config` and fixes test_auto_create_auto_join_where_no_consent
to properly configure auto-join rooms.
2021-09-30 14:06:02 -04:00
Patrick Cloke
d1bf5f7c9d
Strip "join_authorised_via_users_server" from join events which do not need it. ( #10933 )
...
This fixes a "Event not signed by authorising server" error when
transition room member from join -> join, e.g. when updating a
display name or avatar URL for restricted rooms.
2021-09-30 11:13:59 -04:00
Patrick Cloke
7d84d2523a
Fix errors in Synapse logs from unit tests. ( #10939 )
...
Fix some harmless errors from background processes (mostly
due to awaiting Mock objects) that occurred in the Synapse
logs during unit tests.
2021-09-30 11:03:29 -04:00
Olivier Wilkinson (reivilibre)
44dee1fe8c
Merge tag 'v1.44.0rc2' into develop
...
Synapse 1.44.0rc2 (2021-09-30)
==============================
Bugfixes
--------
- Fix a bug introduced in v1.44.0rc1 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) `/batch_send` endpoint to return a 500 error. ([\#10938](https://github.com/matrix-org/synapse/issues/10938 ))
- Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services. ([\#10944](https://github.com/matrix-org/synapse/issues/10944 ))
Improved Documentation
----------------------
- Minor updates to the installation instructions. ([\#10919](https://github.com/matrix-org/synapse/issues/10919 ))
2021-09-30 13:40:24 +01:00
Lukas Lihotzki
145cb6d08e
Fix getTurnServer response: return an integer ttl ( #10922 )
...
`ttl` must be an integer according to the OpenAPI spec:
https://github.com/matrix-org/matrix-doc/blob/old_master/data/api/client-server/voip.yaml#L70
True division (`/`) returns a float instead (`"ttl": 7200.0`).
Floor division (`//`) returns an integer, so the response is spec compliant.
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de >
2021-09-30 08:04:55 -04:00
David Robertson
29364145b2
Pass str to twisted's IReactorTCP ( #10895 )
...
This follows a correction made in twisted/twisted#1664 and should fix our Twisted Trial CI job.
Until that change is in a twisted release, we'll have to ignore the type
of the `host` argument. I've raised #10899 to remind us to review the
issue in a few months' time.
2021-09-30 12:51:47 +01:00
Olivier Wilkinson (reivilibre)
3412f5c8d8
1.44.0rc2
2021-09-30 12:40:24 +01:00
Eric Eastwood
c4bf48ee6f
Fix event context for outliers in important MSC2716 spot ( #10938 )
...
Fix event context for outlier causing failures in all of the MSC2716
Complement tests.
The `EventContext.for_outlier` refactor happened in
https://github.com/matrix-org/synapse/pull/10883
and this spot was left out.
2021-09-30 11:34:44 +01:00
reivilibre
a03ed5e6ae
Fix issue causing sending presence to ASes to fail (due to incomplete type annotations) ( #10944 )
2021-09-30 11:06:47 +01:00
David Robertson
3aefc7b66d
Refactor user directory tests ( #10935 )
...
* Pull out GetUserDirectoryTables helper
* Don't rebuild the dir in tests that don't need it
In #10796 I changed registering a user to add directory entries under.
This means we don't have to force a directory regbuild in to tests of
the user directory search.
* Move test_initial to tests/storage
* Add type hints to both test_user_directory files
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-09-30 11:04:40 +01:00
Richard van der Hoff
428174f902
Split event_auth.check into two parts ( #10940 )
...
Broadly, the existing `event_auth.check` function has two parts:
* a validation section: checks that the event isn't too big, that it has the rught signatures, etc.
This bit is independent of the rest of the state in the room, and so need only be done once
for each event.
* an auth section: ensures that the event is allowed, given the rest of the state in the room.
This gets done multiple times, against various sets of room state, because it forms part of
the state res algorithm.
Currently, this is implemented with `do_sig_check` and `do_size_check` parameters, but I think
that makes everything hard to follow. Instead, we split the function in two and call each part
separately where it is needed.
2021-09-29 18:59:15 +01:00
Olivier Wilkinson (reivilibre)
a19aa8b162
Merge tag 'v1.44.0rc1' into develop
...
Synapse 1.44.0rc1 (2021-09-29)
==============================
Features
--------
- Only allow the
[MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 )
`/batch_send?chunk_id=xxx` endpoint to connect to an already existing
insertion event.
([\#10776](https://github.com/matrix-org/synapse/issues/10776 ))
- Improve oEmbed URL previews by processing the author name, photo, and
video information.
([\#10814](https://github.com/matrix-org/synapse/issues/10814 ),
[\#10819](https://github.com/matrix-org/synapse/issues/10819 ))
- Speed up responding with large JSON objects to requests.
([\#10868](https://github.com/matrix-org/synapse/issues/10868 ),
[\#10905](https://github.com/matrix-org/synapse/issues/10905 ))
- Add a `user_may_create_room_with_invites` spam checker callback to
allow modules to allow or deny a room creation request based on the
invites and/or 3PID invites it includes.
([\#10898](https://github.com/matrix-org/synapse/issues/10898 ))
Bugfixes
--------
- Fix a long-standing bug that caused an `AssertionError` when purging
history in certain rooms. Contributed by @Kokokokoka.
([\#10690](https://github.com/matrix-org/synapse/issues/10690 ))
- Fix a long-standing bug which caused deactivated users that were later
reactivated to be missing from the user directory.
([\#10782](https://github.com/matrix-org/synapse/issues/10782 ))
- Fix a long-standing bug that caused unbanning a user by sending a
membership event to fail. Contributed by @aaronraimist.
([\#10807](https://github.com/matrix-org/synapse/issues/10807 ))
- Fix a long-standing bug where logging contexts would go missing when
federation requests time out.
([\#10810](https://github.com/matrix-org/synapse/issues/10810 ))
- Fix a long-standing bug causing an error in the deprecated
`/initialSync` endpoint when using the undocumented `from` and `to`
parameters.
([\#10827](https://github.com/matrix-org/synapse/issues/10827 ))
- Fix a bug causing the `remove_stale_pushers` background job to
repeatedly fail and log errors. This bug affected Synapse servers that
had been upgraded from version 1.28 or older and are using SQLite.
([\#10843](https://github.com/matrix-org/synapse/issues/10843 ))
- Fix a long-standing bug in Unicode support of the room search admin
API breaking search for rooms with non-ASCII characters.
([\#10859](https://github.com/matrix-org/synapse/issues/10859 ))
- Fix a bug introduced in Synapse 1.37.0 which caused `knock` membership
events which we sent to remote servers to be incorrectly stored in the
local database.
([\#10873](https://github.com/matrix-org/synapse/issues/10873 ))
- Fix invalidating one-time key count cache after claiming keys. The bug
was introduced in Synapse v1.41.0. Contributed by Tulir at Beeper.
([\#10875](https://github.com/matrix-org/synapse/issues/10875 ))
- Fix a long-standing bug causing application service users to be
subject to MAU blocking if the MAU limit had been reached, even if
configured not to be blocked.
([\#10881](https://github.com/matrix-org/synapse/issues/10881 ))
- Fix a long-standing bug which could cause events pulled over
federation to be incorrectly rejected.
([\#10907](https://github.com/matrix-org/synapse/issues/10907 ))
- Fix a long-standing bug causing URL cache files to be stored in
storage providers. Server admins may safely delete the `url_cache/` and
`url_cache_thumbnails/` directories from any configured storage
providers to reclaim space.
([\#10911](https://github.com/matrix-org/synapse/issues/10911 ))
- Fix a long-standing bug leading to race conditions when creating media
store and config directories.
([\#10913](https://github.com/matrix-org/synapse/issues/10913 ))
Improved Documentation
----------------------
- Fix some crashes in the Module API example code, by adding JSON
encoding/decoding.
([\#10845](https://github.com/matrix-org/synapse/issues/10845 ))
- Add developer documentation about experimental configuration flags.
([\#10865](https://github.com/matrix-org/synapse/issues/10865 ))
- Properly remove deleted files from GitHub pages when generating the
documentation.
([\#10869](https://github.com/matrix-org/synapse/issues/10869 ))
Internal Changes
----------------
- Fix GitHub Actions config so we can run sytest on synapse from
parallel branches.
([\#10659](https://github.com/matrix-org/synapse/issues/10659 ))
- Split out
[MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) meta
events to their own fields in the `/batch_send` response.
([\#10777](https://github.com/matrix-org/synapse/issues/10777 ))
- Add missing type hints to REST servlets.
([\#10785](https://github.com/matrix-org/synapse/issues/10785 ),
[\#10817](https://github.com/matrix-org/synapse/issues/10817 ))
- Simplify the internal logic which maintains the user directory
database tables.
([\#10796](https://github.com/matrix-org/synapse/issues/10796 ))
- Use direct references to config flags.
([\#10812](https://github.com/matrix-org/synapse/issues/10812 ),
[\#10885](https://github.com/matrix-org/synapse/issues/10885 ),
[\#10893](https://github.com/matrix-org/synapse/issues/10893 ),
[\#10897](https://github.com/matrix-org/synapse/issues/10897 ))
- Specify the type of token in generic "Invalid token" error messages.
([\#10815](https://github.com/matrix-org/synapse/issues/10815 ))
- Make `StateFilter` frozen so it is hashable.
([\#10816](https://github.com/matrix-org/synapse/issues/10816 ))
- Fix a long-standing bug where an `m.room.message` event containing a
null byte would cause an internal server error.
([\#10820](https://github.com/matrix-org/synapse/issues/10820 ))
- Add type hints to the state database.
([\#10823](https://github.com/matrix-org/synapse/issues/10823 ))
- Opt out of cache expiry for `get_users_who_share_room_with_user`, to
hopefully improve `/sync` performance when you
haven't synced recently.
([\#10826](https://github.com/matrix-org/synapse/issues/10826 ))
- Track cache eviction rates more finely in Prometheus's monitoring.
([\#10829](https://github.com/matrix-org/synapse/issues/10829 ))
- Add missing type hints to `synapse.handlers`.
([\#10831](https://github.com/matrix-org/synapse/issues/10831 ),
[\#10856](https://github.com/matrix-org/synapse/issues/10856 ))
- Extend the Module API to let plug-ins check whether an ID is local and
to access IP + User Agent data.
([\#10833](https://github.com/matrix-org/synapse/issues/10833 ))
- Factor out PNG image data to a constant to be used in several tests.
([\#10834](https://github.com/matrix-org/synapse/issues/10834 ))
- Add a test to ensure state events sent by modules get persisted
correctly.
([\#10835](https://github.com/matrix-org/synapse/issues/10835 ))
- Rename [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 )
fields and event types from `chunk` to `batch` to match the
`/batch_send` endpoint.
([\#10838](https://github.com/matrix-org/synapse/issues/10838 ))
- Rename [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 )
`/batch_send` query parameter from `?prev_event` to more obvious usage
with `?prev_event_id`.
([\#10839](https://github.com/matrix-org/synapse/issues/10839 ))
- Add type hints to `synapse.http.site`.
([\#10867](https://github.com/matrix-org/synapse/issues/10867 ))
- Include outlier status when we log V2 or V3 events.
([\#10879](https://github.com/matrix-org/synapse/issues/10879 ))
- Break down Grafana's cache expiry time series based on reason for
eviction, c.f.
[\#10829](https://github.com/matrix-org/synapse/issues/10829 ).
([\#10880](https://github.com/matrix-org/synapse/issues/10880 ))
- Clean up some of the federation event authentication code for clarity.
([\#10883](https://github.com/matrix-org/synapse/issues/10883 ),
[\#10884](https://github.com/matrix-org/synapse/issues/10884 ),
[\#10896](https://github.com/matrix-org/synapse/issues/10896 ),
[\#10901](https://github.com/matrix-org/synapse/issues/10901 ))
- Allow the `.` and `~` characters when creating registration tokens as
per the change to
[MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231 ).
([\#10887](https://github.com/matrix-org/synapse/issues/10887 ))
- Clean up some unnecessary parentheses in places around the codebase.
([\#10889](https://github.com/matrix-org/synapse/issues/10889 ))
- Improve type hinting in the user directory code.
([\#10891](https://github.com/matrix-org/synapse/issues/10891 ))
- Update development testing script `test_postgresql.sh` to use a
supported Python version and make re-runs quicker.
([\#10906](https://github.com/matrix-org/synapse/issues/10906 ))
- Document and summarize changes in schema version `61` – `64`.
([\#10917](https://github.com/matrix-org/synapse/issues/10917 ))
- Update release script to sign the newly created git tags.
([\#10925](https://github.com/matrix-org/synapse/issues/10925 ))
- Fix Debian builds due to `dh-virtualenv` no longer being able to build
their docs.
([\#10931](https://github.com/matrix-org/synapse/issues/10931 ))
F124520CEEE062448FE1C8442D2EFA2F32FBE047
<olivier@librepush.net >" [ultimate]
2021-09-29 14:23:39 +01:00
Richard van der Hoff
176aa55fd5
add event id to logcontext when handling incoming PDUs ( #10936 )
2021-09-29 11:59:43 +01:00
Richard van der Hoff
e32b9f44ee
Update installation instructions ( #10919 )
...
Various updates to the install docs.
2021-09-29 10:57:53 +00:00
Patrick Cloke
94b620a5ed
Use direct references for configuration variables (part 6). ( #10916 )
2021-09-29 06:44:15 -04:00
Travis Ralston
8cef1ab2ac
Implement MSC3069: Guest support on whoami ( #9655 )
2021-09-29 11:32:45 +01:00
Olivier Wilkinson (reivilibre)
13032b6603
Bump the date because the release ran over
2021-09-29 11:13:03 +01:00
Olivier Wilkinson (reivilibre)
1b9ce5e8a6
Indicate when bugs were introduced and tidy up
2021-09-29 11:09:00 +01:00
Olivier Wilkinson (reivilibre)
67815cc3db
Tweak changelog
2021-09-29 11:00:56 +01:00
Richard van der Hoff
5279b9161b
Use RoomVersion objects ( #10934 )
...
Various refactors to use `RoomVersion` objects instead of room version identifiers.
2021-09-29 10:57:10 +01:00
Sean Quah
2be0fde3d6
Fix empty url_cache_thumbnails/yyyy-mm-dd/ directories being left behind ( #10924 )
2021-09-29 10:24:37 +01:00
Eric Eastwood
9fd057b8c5
Ensure (room_id, next_batch_id) is unique to avoid cross-talk/conflicts between batches (MSC2716) ( #10877 )
...
Part of [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 )
Part of https://github.com/matrix-org/synapse/issues/10737
2021-09-28 21:23:16 -05:00
Erik Johnston
62800a8fe3
Add #10932 to release
2021-09-28 17:32:31 +01:00
Hillery Shay
0f007fe009
Update utility code to handle C implementations of frozendict ( #10902 )
...
* update _handle_frozendict to work with c implementations of frozen dict
* add changelog
* add clarifying comment to _handle_frozendict
2021-09-28 09:13:23 -07:00
Richard van der Hoff
8aaa4b7b5d
Drop backwards-compatibility support for "outlier" ( #10903 )
...
Before Synapse 1.31 (#9411 ), we relied on `outlier` being stored in the
`internal_metadata` column. We can now assume nobody will roll back their
deployment that far and drop the legacy support.
2021-09-28 15:25:36 +01:00
Richard van der Hoff
2622b28c5c
Inline _check_event_auth for outliers ( #10926 )
...
* Inline `_check_event_auth` for outliers
When we are persisting an outlier, most of `_check_event_auth` is redundant:
* `_update_auth_events_and_context_for_auth` does nothing, because the
`input_auth_events` are (now) exactly the event's auth_events,
which means that `missing_auth` is empty.
* we don't care about soft-fail, kicking guest users or `send_on_behalf_of`
for outliers
... so the only thing that matters is the auth itself, so let's just do that.
* `_auth_and_persist_fetched_events_inner`: de-async `prep`
`prep` no longer calls any `async` methods, so let's make it synchronous.
* Simplify `_check_event_auth`
We no longer need to support outliers here, which makes things rather simpler.
* changelog
* lint
2021-09-28 15:25:07 +01:00
Erik Johnston
37bb93d181
Fix exception responding to request that has been closed ( #10932 )
...
Introduced in #10905
2021-09-28 14:36:19 +01:00
Patrick Cloke
eb2c7e51c4
Clean-up type hints in server config ( #10915 )
...
By using attrs instead of dicts to store configuration.
Also updates some of the attrs classes to use proper type
hints and auto_attribs.
2021-09-28 09:24:40 -04:00
Erik Johnston
2b9d174791
Fixup changelog
2021-09-28 13:50:05 +01:00
Erik Johnston
bc69d49362
Fixup changelog
2021-09-28 13:48:42 +01:00
Patrick Cloke
c3ccad7785
Only do restricted join rules signature checks for room versions 8/9. ( #10927 )
...
Otherwise the presence of a (bogus, unused) field could cause
auth checks to fail.
2021-09-28 08:44:19 -04:00
Erik Johnston
3c50192d3f
1.44.0rc1
2021-09-28 13:42:21 +01:00
Erik Johnston
a8bbf08576
Fix debian package builds. ( #10931 )
...
This was due to dh-virtualenv builds being broken due to Shpinx removing
deprecated APIs.
2021-09-28 12:13:51 +01:00
Erik Johnston
707d5e4e48
Encode JSON responses on a thread in C, mk2 ( #10905 )
...
Currently we use `JsonEncoder.iterencode` to write JSON responses, which ensures that we don't block the main reactor thread when encoding huge objects. The downside to this is that `iterencode` falls back to using a pure Python encoder that is *much* less efficient and can easily burn a lot of CPU for huge responses. To fix this, while still ensuring we don't block the reactor loop, we encode the JSON on a threadpool using the standard `JsonEncoder.encode` functions, which is backed by a C library.
Doing so, however, requires `respond_with_json` to have access to the reactor, which it previously didn't. There are two ways of doing this:
1. threading through the reactor object, which is a bit fiddly as e.g. `DirectServeJsonResource` doesn't currently take a reactor, but is exposed to modules and so is a PITA to change; or
2. expose the reactor in `SynapseRequest`, which requires updating a bunch of servlet types.
I went with the latter as that is just a mechanical change, and I think makes sense as a request already has a reactor associated with it (via its http channel).
2021-09-28 09:37:58 +00:00
Erik Johnston
d37841787a
Sign the git tag in release script ( #10925 )
2021-09-27 15:39:49 +01:00
Sean Quah
f7768f62cb
Avoid storing URL cache files in storage providers ( #10911 )
...
URL cache files are short-lived and it does not make sense to offload
them (eg. to the cloud) or back them up.
2021-09-27 12:55:27 +01:00
Sean Quah
6c83c27107
Fix race conditions when creating media store and config directories ( #10913 )
2021-09-27 11:29:23 +01:00
Eric Eastwood
d138187045
Document changes to schema version 61 - 64 ( #10917 )
...
As pointed out by @richvdh, https://github.com/matrix-org/synapse/pull/10838#discussion_r715424244
Retroactively summarize `61` - `64`
2021-09-24 17:09:12 -05:00
Brendan Abolivier
b10257e879
Add a spamchecker callback to allow or deny room creation based on invites ( #10898 )
...
This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline.
This adds a callback that's fairly similar to user_may_create_room except it also allows processing based on the invites sent at room creation.
2021-09-24 16:38:23 +02:00
David Robertson
ea01d4c2de
Update postgresql testing script ( #10906 )
...
- Use sytest:bionic. Sytest:latest is two years old (do we want
CI to push out latest at all?) and comes with Python 3.5, which we
explictly no longer support. The script now runs under PostgreSQL 10
as a result.
- Advertise script in the docs
- Move pg testing script to scripts-dev directory
- Write to host as the script's exector, not root
A few changes to make it speedier to re-run the tests:
- Create blank DB in the container, not the script, so we don't have to
`initdb` each time
- Use a named volume to persist the tox environment, so we don't have to
fetch and install a bunch of packages from PyPI each time
Co-authored-by: reivilibre <olivier@librepush.net >
2021-09-24 14:27:09 +00:00
Richard van der Hoff
0420d4e6a5
Stop trying to auth/persist events whose auth events we do not have. ( #10907 )
2021-09-24 14:01:45 +01:00
Patrick Cloke
bb7fdd821b
Use direct references for configuration variables (part 5). ( #10897 )
2021-09-24 07:25:21 -04:00
Richard van der Hoff
85551b7a85
Factor out common code for persisting fetched auth events ( #10896 )
...
* Factor more stuff out of `_get_events_and_persist`
It turns out that the event-sorting algorithm in `_get_events_and_persist` is
also useful in other circumstances. Here we move the current
`_auth_and_persist_fetched_events` to `_auth_and_persist_fetched_events_inner`,
and then factor the sorting part out to `_auth_and_persist_fetched_events`.
* `_get_remote_auth_chain_for_event`: remove redundant `outlier` assignment
`get_event_auth` returns events with the outlier flag already set, so this is
redundant (though we need to update a test where `get_event_auth` is mocked).
* `_get_remote_auth_chain_for_event`: move existing-event tests earlier
Move a couple of tests outside the loop. This is a bit inefficient for now, but
a future commit will make it better. It should be functionally identical.
* `_get_remote_auth_chain_for_event`: use `_auth_and_persist_fetched_events`
We can use the same codepath for persisting the events fetched as part of an
auth chain as for those fetched individually by `_get_events_and_persist` for
building the state at a backwards extremity.
* `_get_remote_auth_chain_for_event`: use a dict for efficiency
`_auth_and_persist_fetched_events` sorts the events itself, so we no longer
need to care about maintaining the ordering from `get_event_auth` (and no
longer need to sort by depth in `get_event_auth`).
That means that we can use a map, making it easier to filter out events we
already have, etc.
* changelog
* `_auth_and_persist_fetched_events`: improve docstring
2021-09-24 11:56:33 +01:00
Richard van der Hoff
261c9763c4
Simplify _auth_and_persist_fetched_events ( #10901 )
...
Combine the two loops over the list of events, and hence get rid of
`_NewEventInfo`. Also pass the event back alongside the context, so that it's
easier to process the result.
2021-09-24 11:56:13 +01:00
Erik Johnston
50022cff96
Add reactor to SynapseRequest and fix up types. ( #10868 )
2021-09-24 11:01:25 +01:00
Jason Robinson
fa74536384
Fix AuthBlocking check when requester is appservice ( #10881 )
...
If the MAU count had been reached, Synapse incorrectly blocked appservice users even though they've been explicitly configured not to be tracked (the default). This was due to bypassing the relevant if as it was chained behind another earlier hit if as an elif.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-09-24 10:41:18 +01:00
David Robertson
7f3352743e
Improve typing in user_directory files ( #10891 )
...
* Improve typing in user_directory files
This makes the user_directory.py in storage pass most of mypy's
checks (including `no-untyped-defs`). Unfortunately that file is in the
tangled web of Store class inheritance so doesn't pass mypy at the moment.
The handlers directory has already been mypyed.
Co-authored-by: reivilibre <olivier@librepush.net >
2021-09-24 10:38:22 +01:00
Kokokokoka
e704cc2a48
In _purge_history_txn, ensure that txn.fetchall has elements before accessing rows ( #10690 )
...
This change adds a check for row existence before accessing row element, this should fix issue #10669
Signed-off-by: Vasya Boytsov vasiliy.boytsov@phystech.edu
2021-09-24 09:19:51 +00:00
Callum Brown
90d9fc7505
Allow . and ~ chars in registration tokens ( #10887 )
...
Per updates to MSC3231 in order to use the same grammar
as other identifiers.
2021-09-23 17:58:12 +00:00
Richard van der Hoff
a7304adc7d
Factor out _get_remote_auth_chain_for_event from _update_auth_events_and_context_for_auth ( #10884 )
...
* Reload auth events from db after fetching and persisting
In `_update_auth_events_and_context_for_auth`, when we fetch the remote auth
tree and persist the returned events: load the missing events from the database
rather than using the copies we got from the remote server.
This is mostly in preparation for additional refactors, but does have an
advantage in that if we later get around to checking the rejected status, we'll
be able to make use of it.
* Factor out `_get_remote_auth_chain_for_event` from `_update_auth_events_and_context_for_auth`
* changelog
2021-09-23 17:34:33 +01:00
Patrick Cloke
47854c71e9
Use direct references for configuration variables (part 4). ( #10893 )
2021-09-23 12:03:01 -04:00
David Robertson
a10988983a
Break down cache expiry reasons in grafana ( #10880 )
...
A follow-up to #10829
2021-09-23 14:45:32 +01:00
David Robertson
dcfd864970
Fix reactivated users not being added to the user directory ( #10782 )
...
Co-authored-by: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com >
Co-authored-by: reivilibre <olivier@librepush.net >
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-09-23 12:02:13 +00:00
Patrick Cloke
e584534403
Use direct references for some configuration variables (part 3) ( #10885 )
...
This avoids the overhead of searching through the various
configuration classes by directly referencing the class that
the attributes are in.
It also improves type hints since mypy can now resolve the
types of the configuration variables.
2021-09-23 07:13:34 -04:00
Andrew Morgan
aa2c027792
Remove unnecessary parentheses around tuples returned from methods ( #10889 )
2021-09-23 11:59:07 +01:00
Richard van der Hoff
26f2bfedbf
Factor out a separate EventContext.for_outlier ( #10883 )
...
Constructing an EventContext for an outlier is actually really simple, and
there's no sense in going via an `async` method in the `StateHandler`.
This also means that we can resolve a bunch of FIXMEs.
2021-09-22 17:58:57 +01:00
Hillery Shay
f78b68a96b
Treat "\u0000" as "\u0020" for the purposes of message search (message indexing) ( #10820 )
...
* add test to check if null code points are being inserted
* add logic to detect and replace null code points before insertion into db
* lints
* add license to test
* change approach to null substitution
* add type hint for SearchEntry
* Add changelog entry
Signed-off-by: H.Shay <shaysquared@gmail.com >
* updated changelog
* update chanelog message
* remove duplicate changelog
* Update synapse/storage/databases/main/events.py remove extra space
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
* rename and move test file, update tests, delete old test file
* fix typo in comments
* update _find_highlights_in_postgres to replace null byte with space
* replace null byte in sqlite search insertion
* beef up and reorganize test for this pr
* update changelog
* add type hints and update docstring
* check db engine directly vs using env variable
* refactor tests to be less repetetive
* move rplace logic into seperate function
* requested changes
* Fix typo.
* Update synapse/storage/databases/main/search.py
Co-authored-by: reivilibre <olivier@librepush.net >
* Update changelog.d/10820.misc
Co-authored-by: Aaron Raimist <aaron@raim.ist >
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
Co-authored-by: reivilibre <olivier@librepush.net >
Co-authored-by: Aaron Raimist <aaron@raim.ist >
2021-09-22 08:25:26 -07:00
Tulir Asokan
03db6701d5
Fix invalidating OTK count cache after claim ( #10875 )
...
The invalidation was missing in `_claim_e2e_one_time_key_returning`,
which is used on SQLite 3.24+ and Postgres. This could break e2ee if
nothing else happened to invalidate the caches before the keys ran out.
Signed-off-by: Tulir Asokan <tulir@beeper.com >
2021-09-22 15:31:05 +01:00
Richard van der Hoff
8f2a52766b
Ensure we mark sent knocks as outliers ( #10873 )
2021-09-22 15:20:18 +01:00
Patrick Cloke
6fc8be9a1b
Include more information in oEmbed previews. ( #10819 )
...
* Improved titles (fall back to the author name if there's not title) and include the site name.
* Handle photo/video payloads.
* Include the original URL in the Open Graph response.
* Fix the expiration time (by properly converting from seconds to milliseconds).
2021-09-22 09:45:20 -04:00
Sean Quah
9391de3f37
Fix /initialSync error due to unhashable RoomStreamToken ( #10827 )
...
The deprecated /initialSync endpoint maintains a cache of responses,
using parameter values as part of the cache key. When a `from` or `to`
parameter is specified, it gets converted into a `StreamToken`, which
contains a `RoomStreamToken` and forms part of the cache key.
`RoomStreamToken`s need to be made hashable for this to work.
2021-09-22 14:43:26 +01:00
Patrick Cloke
52913d56a5
Add documentation for experimental feature flags. ( #10865 )
2021-09-22 13:41:42 +00:00
David Robertson
724aef9a87
Opt out of cache expiry for get_users_who_share_room_with_user ( #10826 )
...
* Allow LruCaches to opt out of time-based expiry
* Don't expire `get_users_who_share_room` & friends
2021-09-22 14:21:58 +01:00
David Teller
80828eda06
Extend ModuleApi with the methods we'll need to reject spam based on …IP - resolves #10832 ( #10833 )
...
Extend ModuleApi with the methods we'll need to reject spam based on IP - resolves #10832
Signed-off-by: David Teller <davidt@element.io >
2021-09-22 13:09:43 +00:00
Richard van der Hoff
4ecf51812e
Include outlier status in str(event) for V2/V3 events ( #10879 )
...
I meant to do this before, in #10591 , but because I'm stupid I forgot to do it
for V2 and V3 events.
I've factored the common code out to `EventBase` to save us having two copies
of it.
This means that for `FrozenEvent` we replace `self.get("event_id", None)` with
`self.event_id`, which I think is safe. `get()` is an alias for
`self._dict.get()`, whereas `event_id()` is an `@property` method which looks
up `self._event_id`, which is populated during construction from the same
dict. We don't seem to rely on the fallback, because if the `event_id` key is
absent from the dict then construction of the `EventBase` object will
fail.
Long story short, the only way this could change behaviour is if
`event_dict["event_id"]` is changed *after* the `EventBase` object is
constructed without updating the `_event_id` field, or vice versa - either of
which would be very problematic anyway and the behavior of `str(event)` is the
least of our worries.
2021-09-22 12:30:59 +01:00
David Robertson
a2d7195e01
Track why we're evicting from caches ( #10829 )
...
So we can see distinguish between "evicting because the cache is too big" and "evicting because the cache entries haven't been recently used".
2021-09-22 10:59:52 +01:00
Eric Eastwood
51e2db3598
Rename MSC2716 things from chunk to batch to match /batch_send endpoint ( #10838 )
...
See https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r684574497
Dropping support for older MSC2716 room versions so we don't have to worry about
supporting both chunk and batch events.
2021-09-21 15:06:28 -05:00
Patrick Cloke
4054dfa409
Add type hints for event streams. ( #10856 )
2021-09-21 13:34:26 -04:00
Erik Johnston
b25a494779
Add types to http.site ( #10867 )
2021-09-21 16:41:27 +00:00
Patrick Cloke
ebd8baf61f
Clear our destination directories before copying files to GitHub pages. ( #10869 )
...
This should fix stale deleted files being still accessible.
2021-09-21 16:32:46 +00:00
Patrick Cloke
ba7a91aea5
Refactor oEmbed previews ( #10814 )
...
The major change is moving the decision of whether to use oEmbed
further up the call-stack. This reverts the _download_url method to
being a "dumb" functionwhich takes a single URL and downloads it
(as it was before #7920 ).
This also makes more minor refactorings:
* Renames internal variables for clarity.
* Factors out shared code between the HTML and rich oEmbed
previews.
* Fixes tests to preview an oEmbed image.
2021-09-21 16:09:57 +00:00
Brendan Abolivier
2843058a8b
Test that state events sent by modules correctly end up in the room's state ( #10835 )
...
Test for #10830
Ideally the test would also make sure the new state event comes down sync, but this is probably good enough.
2021-09-21 17:40:20 +02:00
Hillery Shay
5fca3c8ae6
Allow Synapse Admin API's Room Search to accept non-ASCII characters ( #10859 )
...
* add tests for checking if room search works with non-ascii char
* change encoding on parse_string to UTF-8
* lints
* properly encode search term
* lints
* add changelog file
* update changelog number
* set changelog entry filetype to .bugfix
* Revert "set changelog entry filetype to .bugfix"
This reverts commit be8e5a314251438ec4ec7dbc59ba32162c93e550.
* update changelog message and file type
* change parse_string default encoding back to ascii and update room search admin api calll to parse string
* refactor tests
* Update tests/rest/admin/test_room.py
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-09-21 08:04:35 -07:00
Eric Eastwood
ee557b5375
Rename /batch_send query parameter from ?prev_event to more obvious usage with ?prev_event_id (MSC2716) ( #10839 )
...
As mentioned in https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r705872887
and https://github.com/matrix-org/synapse/issues/10737
2021-09-21 14:10:01 +01:00
David Robertson
706b0e41a1
Merge tag 'v1.43.0' into develop
2021-09-21 14:05:00 +01:00
David Robertson
60453315bd
Always add local users to the user directory ( #10796 )
...
It's a simplification, but one that'll help make the user directory logic easier
to follow with the other changes upcoming. It's not strictly required for those
changes, but this will help simplify the resulting logic that listens for
`m.room.member` events and generally make the logic easier to follow.
This means the config option `search_all_users` ends up controlling the
search query only, and not the data we store. The cost of doing so is an
extra row in the `user_directory` and `user_directory_search` tables for
each local user which
- belongs to no public rooms
- belongs to no private rooms of size ≥ 2
I think the cost of this will be marginal (since they'll already have entries
in `users` and `profiles` anyway).
As a small upside, a homeserver whose directory was built with this
change can toggle `search_all_users` without having to rebuild their
directory.
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-09-21 12:02:34 +00:00
David Robertson
9ffa787eb2
Fix typo again
2021-09-21 12:24:47 +01:00
David Robertson
9b5782d51d
Specify MSC name; fix typo
...
one day I'll learn how to spell hierarchy
2021-09-21 12:10:50 +01:00
David Robertson
c17e698e1b
Point to upgrade notes
2021-09-21 12:01:54 +01:00
David Robertson
6c92ba3eac
Move deprecation notice from 1.43 rc to release
2021-09-21 11:52:37 +01:00
David Robertson
c4ef61136f
1.43.0
2021-09-21 11:49:15 +01:00
Aaron Raimist
6a751ff5e0
Allow sending a membership event to unban a user ( #10807 )
...
* Allow membership event to unban user
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-09-21 10:23:34 +00:00
David Robertson
f455b0e420
GHA: reintroduce an env var for $GITHUB_HEAD_REF ( #10659 )
...
This should ensure GHA runs synapse against the same-named sytest branch
2021-09-20 17:35:16 +01:00
Patrick Cloke
b3590614da
Require type hints in the handlers module. ( #10831 )
...
Adds missing type hints to methods in the synapse.handlers
module and requires all methods to have type hints there.
This also removes the unused construct_auth_difference method
from the FederationHandler.
2021-09-20 08:56:23 -04:00
reivilibre
437961744c
Fix remove_stale_pushers job on SQLite. ( #10843 )
2021-09-20 10:26:13 +01:00
Charles Wright
6b6bb81b23
Fix #10837 by adding JSON encoding/decoding to the Module API example… ( #10845 )
2021-09-17 18:04:37 +01:00
David Robertson
b4c1af8cea
Merge branch 'release-v1.43' into develop
2021-09-17 12:15:17 +01:00
David Robertson
4ed4ab0e93
Add hyperlink to #9424 in changelog
2021-09-17 10:48:07 +01:00
David Robertson
daac1e645c
1.43.0rc2
2021-09-17 10:43:51 +01:00
Patrick Cloke
bfb4b858a9
Create a constant for a small png image in tests. ( #10834 )
...
To avoid duplicating it between a few tests.
2021-09-16 12:01:14 -04:00
Erik Johnston
9a6f4a684f
Cleanup opentracing logging for syncs ( #10828 )
...
We added a bunch of spans in #10704 , but this ended up adding a lot of
redundant spans for rooms where nothing changed, so instead we only
start the span if there might be something interesting going on.
2021-09-15 17:14:25 +01:00
Patrick Cloke
3eba047d38
Add type hints to state database module. ( #10823 )
2021-09-15 09:54:13 -04:00
Patrick Cloke
b93259082c
Add missing type hints to non-client REST servlets. ( #10817 )
...
Including admin, consent, key, synapse, and media. All REST servlets
(the synapse.rest module) now require typed method definitions.
2021-09-15 08:45:32 -04:00
Patrick Cloke
8c7a531e27
Use direct references for some configuration variables (part 2) ( #10812 )
2021-09-15 08:34:52 -04:00
Eric Eastwood
145c006ef7
Verify ?chunk_id actually corresponds to an insertion event that exists (MSC2716) ( #10776 )
2021-09-15 09:34:30 +01:00
Eric Eastwood
1c555527b3
Split out /batch_send meta events to their own fields (MSC2716) ( #10777 )
2021-09-15 09:30:58 +01:00
reivilibre
8eb7cb2e0d
Make StateFilter frozen so we can hash it ( #10816 )
...
Also enables Mypy for related tests.
2021-09-14 16:35:53 +01:00
Sean Quah
14b8c0476f
Prevent logging context going missing on federation request timeout ( #10810 )
...
In `MatrixFederationHttpClient._send_request()`, we make a HTTP request
using an `Agent`, wrap that request in a timeout and await the resulting
`Deferred`. On its own, the `Agent` performing the HTTP request
correctly stashes and restores the logging context while waiting.
The addition of the timeout introduces a path where the logging context
is not restored when execution resumes.
To address this, we wrap the timeout `Deferred` in a
`make_deferred_yieldable()` to stash the logging context and restore it
on completion of the `await`. However this is not sufficient, since by
the time we construct the timeout `Deferred`, the `Agent` has already
stashed and cleared the logging context when using
`make_deferred_yieldable()` to produce its `Deferred` for the request.
Hence, we wrap the `Agent` request in a `run_in_background()` to "fork"
and preserve the logging context so that we can stash and restore it
when `await`ing the timeout `Deferred`.
This approach is similar to the one used with `defer.gatherResults`.
Note that the code is still not fully correct. When a timeout occurs,
the request remains running in the background (existing behavior which
is nothing to do with the new call to `run_in_background`) and may
re-start the logging context after it has finished.
2021-09-14 13:01:30 +01:00
Andrew Morgan
51e1b96d04
Merge tag 'v1.43.0rc1' into develop
...
Synapse 1.43.0rc1 (2021-09-14)
This release drops support for the deprecated, unstable API for [MSC2858](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix ), as well as the undocumented `experimental.msc2858_enabled` config option. Client authors should update their clients to use the stable API, available since Synapse 1.30.
Features
--------
- Allow room creators to send historical events specified by [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) in existing room versions. ([\#10566](https://github.com/matrix-org/synapse/issues/10566 ))
- Add config option to use non-default manhole password and keys. ([\#10643](https://github.com/matrix-org/synapse/issues/10643 ))
- Skip final GC at shutdown to improve restart performance. ([\#10712](https://github.com/matrix-org/synapse/issues/10712 ))
- Allow configuration of the oEmbed URLs used for URL previews. ([\#10714](https://github.com/matrix-org/synapse/issues/10714 ), [\#10759](https://github.com/matrix-org/synapse/issues/10759 ))
- Prefer [room version 9](https://github.com/matrix-org/matrix-doc/pull/3375 ) for restricted rooms per the [room version capabilities](https://github.com/matrix-org/matrix-doc/pull/3244 ) API. ([\#10772](https://github.com/matrix-org/synapse/issues/10772 ))
Bugfixes
--------
- Fix a long-standing bug where room avatars were not included in email notifications. ([\#10658](https://github.com/matrix-org/synapse/issues/10658 ))
- Fix a bug where the ordering algorithm was skipping the `origin_server_ts` step in the spaces summary resulting in unstable room orderings. ([\#10730](https://github.com/matrix-org/synapse/issues/10730 ))
- Fix edge case when persisting events into a room where there are multiple events we previously hadn't calculated auth chains for (and hadn't marked as needing to be calculated). ([\#10743](https://github.com/matrix-org/synapse/issues/10743 ))
- Fix a bug which prevented calls to `/createRoom` that included the `room_alias_name` parameter from being handled by worker processes. ([\#10757](https://github.com/matrix-org/synapse/issues/10757 ))
- Fix a bug which prevented user registration via SSO to require consent tracking for SSO mapping providers that don't prompt for Matrix ID selection. Contributed by @AndrewFerr. ([\#10733](https://github.com/matrix-org/synapse/issues/10733 ))
- Only return the stripped state events for the `m.space.child` events in a room for the spaces summary from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946 ). ([\#10760](https://github.com/matrix-org/synapse/issues/10760 ))
- Properly handle room upgrades of spaces. ([\#10774](https://github.com/matrix-org/synapse/issues/10774 ))
- Fix a bug which generated invalid homeserver config when the `frontend_proxy` worker type was passed to the Synapse Worker-based Complement image. ([\#10783](https://github.com/matrix-org/synapse/issues/10783 ))
Improved Documentation
----------------------
- Minor fix to the `media_repository` developer documentation. Contributed by @cuttingedge1109. ([\#10556](https://github.com/matrix-org/synapse/issues/10556 ))
- Update the documentation to note that the `/spaces` and `/hierarchy` endpoints can be routed to workers. ([\#10648](https://github.com/matrix-org/synapse/issues/10648 ))
- Clarify admin API documentation on undoing room deletions. ([\#10735](https://github.com/matrix-org/synapse/issues/10735 ))
- Split up the modules documentation and add examples for module developers. ([\#10758](https://github.com/matrix-org/synapse/issues/10758 ))
- Correct 2 typographical errors in the [Log Contexts documentation](https://matrix-org.github.io/synapse/latest/log_contexts.html ). ([\#10795](https://github.com/matrix-org/synapse/issues/10795 ))
- Fix a wording mistake in the sample configuration. Contributed by @bramvdnheuvel:nltrix.net. ([\#10804](https://github.com/matrix-org/synapse/issues/10804 ))
Deprecations and Removals
-------------------------
- Remove the [unstable MSC2858 API](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix ), including the undocumented `experimental.msc2858_enabled` config option. The unstable API has been deprecated since Synapse 1.35. Client authors should update their clients to use the stable API introduced in Synapse 1.30 if they have not already done so. ([\#10693](https://github.com/matrix-org/synapse/issues/10693 ))
Internal Changes
----------------
- Add OpenTracing logging to help debug stuck messages (as described by issue [#9424 ](https://github.com/matrix-org/synapse/issues/9424 )). ([\#10704](https://github.com/matrix-org/synapse/issues/10704 ))
- Add type annotations to the `synapse.util` package. ([\#10601](https://github.com/matrix-org/synapse/issues/10601 ))
- Ensure `rooms.creator` field is always populated for easy lookup in [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716 ) usage later. ([\#10697](https://github.com/matrix-org/synapse/issues/10697 ))
- Add missing type hints to REST servlets. ([\#10707](https://github.com/matrix-org/synapse/issues/10707 ), [\#10728](https://github.com/matrix-org/synapse/issues/10728 ), [\#10736](https://github.com/matrix-org/synapse/issues/10736 ))
- Do not include rooms with unknown room versions in the spaces summary results. ([\#10727](https://github.com/matrix-org/synapse/issues/10727 ))
- Additional error checking for the `preset` field when creating a room. ([\#10738](https://github.com/matrix-org/synapse/issues/10738 ))
- Clean up some of the federation event authentication code for clarity. ([\#10744](https://github.com/matrix-org/synapse/issues/10744 ), [\#10745](https://github.com/matrix-org/synapse/issues/10745 ), [\#10746](https://github.com/matrix-org/synapse/issues/10746 ), [\#10771](https://github.com/matrix-org/synapse/issues/10771 ), [\#10773](https://github.com/matrix-org/synapse/issues/10773 ), [\#10781](https://github.com/matrix-org/synapse/issues/10781 ))
- Add an index to `presence_stream` to hopefully speed up startups a little. ([\#10748](https://github.com/matrix-org/synapse/issues/10748 ))
- Refactor event size checking code to simplify searching the codebase for the origins of certain error strings that are occasionally emitted. ([\#10750](https://github.com/matrix-org/synapse/issues/10750 ))
- Move tests relating to rooms having encryption out of the user directory tests. ([\#10752](https://github.com/matrix-org/synapse/issues/10752 ))
- Use `attrs` internally for the URL preview code & update documentation. ([\#10753](https://github.com/matrix-org/synapse/issues/10753 ))
- Minor speed ups when joining large rooms over federation. ([\#10754](https://github.com/matrix-org/synapse/issues/10754 ), [\#10755](https://github.com/matrix-org/synapse/issues/10755 ), [\#10756](https://github.com/matrix-org/synapse/issues/10756 ), [\#10780](https://github.com/matrix-org/synapse/issues/10780 ), [\#10784](https://github.com/matrix-org/synapse/issues/10784 ))
- Add a constant for `m.federate`. ([\#10775](https://github.com/matrix-org/synapse/issues/10775 ))
- Add a script to update the Debian changelog in a Docker container for systems that are not Debian-based. ([\#10778](https://github.com/matrix-org/synapse/issues/10778 ))
- Change the format of authenticated users in logs when a user is being puppeted by and admin user. ([\#10779](https://github.com/matrix-org/synapse/issues/10779 ))
- Remove fixed and flakey tests from the Sytest blacklist. ([\#10788](https://github.com/matrix-org/synapse/issues/10788 ))
- Improve internal details of the user directory code. ([\#10789](https://github.com/matrix-org/synapse/issues/10789 ))
- Use direct references to config flags. ([\#10798](https://github.com/matrix-org/synapse/issues/10798 ))
- Ensure the Rust reporter passes type checking with jaeger-client 4.7's type annotations. ([\#10799](https://github.com/matrix-org/synapse/issues/10799 ))
2021-09-14 12:59:53 +01:00
Patrick Cloke
b996782df5
Convert media repo's FileInfo to attrs. ( #10785 )
...
This is mostly an internal change, but improves type hints in the
media code.
2021-09-14 07:09:38 -04:00
Andrew Morgan
474edce1c4
update changelog wording
2021-09-14 12:04:28 +01:00
Andrew Morgan
5acc2f1f6f
changelog improvements
2021-09-14 11:55:02 +01:00
Andrew Morgan
814b4be08e
update changelog wording
2021-09-14 11:52:19 +01:00
Andrew Morgan
8fdcf45be0
update wording
2021-09-14 11:48:34 +01:00
Andrew Morgan
d725e0956f
1.43.0rc1
2021-09-14 11:47:11 +01:00
David Robertson
319b8b6bef
Name the type of token in "Invalid token" messages ( #10815 )
...
I had one of these error messages yesterday and assumed it was an
invalid auth token (because that was an HTTP query parameter in the
test) I was working on. In fact, it was an invalid next batch token for
syncing.
2021-09-14 11:25:05 +01:00
Patrick Cloke
01c88a09cd
Use direct references for some configuration variables ( #10798 )
...
Instead of proxying through the magic getter of the RootConfig
object. This should be more performant (and is more explicit).
2021-09-13 13:07:12 -04:00