Commit graph

24019 commits

Author SHA1 Message Date
Eric Eastwood
8aa2297644 Merge branch 'madlittlemods/sliding-sync-room-data' into madlittlemods/sliding-sync-required-state 2024-07-01 22:41:25 -05:00
Eric Eastwood
8b73185094 Trigger CI again 2024-07-01 22:41:08 -05:00
Eric Eastwood
78df54af2d Get state at leave/ban 2024-07-01 22:40:18 -05:00
Eric Eastwood
dfb43247c7 Merge branch 'madlittlemods/sliding-sync-room-data' into madlittlemods/sliding-sync-required-state 2024-07-01 21:50:01 -05:00
Eric Eastwood
7c9513ccb1 Add missing test description 2024-07-01 21:49:41 -05:00
Eric Eastwood
b8687e771c Select to_key if to_key else from_key
See https://github.com/element-hq/synapse/pull/17320#discussion_r1646591886
2024-07-01 21:45:58 -05:00
Eric Eastwood
2bd6cba76d Select to_key if to_key else from_key
See https://github.com/element-hq/synapse/pull/17320#discussion_r1646591886
2024-07-01 21:42:11 -05:00
Eric Eastwood
e4195875b9 Protect from no timeline_events 2024-07-01 21:21:38 -05:00
Eric Eastwood
73f2903bc5 Merge branch 'madlittlemods/sliding-sync-room-data' into madlittlemods/sliding-sync-required-state
Conflicts:
	synapse/handlers/sliding_sync.py
2024-07-01 21:20:16 -05:00
Eric Eastwood
0061561988 Merge branch 'develop' into madlittlemods/sliding-sync-room-data 2024-07-01 19:10:30 -05:00
Eric Eastwood
10d78d66b7 Protect for non-existent prev events 2024-07-01 19:04:46 -05:00
Eric Eastwood
a4263bf925 Update stream tests with prev event info 2024-07-01 18:56:45 -05:00
Eric Eastwood
9e53336a71 Avoid fetching full events for prev_event_ids
See https://github.com/element-hq/synapse/pull/17320#discussion_r1658832755
2024-07-01 13:44:00 -05:00
dependabot[bot]
635e3927d2
Bump types-setuptools from 69.5.0.20240423 to 70.1.0.20240627 (#17380) 2024-07-01 17:46:58 +01:00
Eric Eastwood
6045e118d6 Merge branch 'develop' into madlittlemods/sliding-sync-room-data 2024-07-01 11:34:46 -05:00
dependabot[bot]
a1b8897668
Bump serde_json from 1.0.117 to 1.0.119 (#17385) 2024-07-01 13:42:37 +01:00
dependabot[bot]
76b9f14c0a
Bump log from 0.4.21 to 0.4.22 (#17384) 2024-07-01 13:42:00 +01:00
dependabot[bot]
1eccbfb82f
Bump cryptography from 42.0.7 to 42.0.8 (#17382) 2024-07-01 13:41:48 +01:00
Erik Johnston
2f5a77efae
Limit size of presence EDUs (#17371)
Otherwise they are unbounded.

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-07-01 12:48:36 +01:00
davidegirardi
b11f5c984b
Clarify url_preview_url_blacklist is a usability feature (#17356) 2024-06-28 14:39:54 +01:00
Eric Eastwood
32b8b68df6 Add TODO to handle state resets
See https://github.com/element-hq/synapse/pull/17320#discussion_r1656548733
2024-06-27 18:13:34 -05:00
Eric Eastwood
1158058aa5 Opt for tackling more batch scenarios in future PRs 2024-06-27 17:58:31 -05:00
Eric Eastwood
63c7b5017a (doesn't work) Add test for batch persisting multiple member events for the same user 2024-06-27 16:34:41 -05:00
Eric Eastwood
325856e14b Inclusive ranges 2024-06-27 15:57:01 -05:00
Eric Eastwood
f77403251c Add better comments 2024-06-27 15:39:43 -05:00
Eric Eastwood
ba56350642 Passing current tests 2024-06-27 15:31:18 -05:00
Eric Eastwood
eb159c11cd Don't worry about state_reset for now
See:

 - Why no `COALESCE` https://github.com/element-hq/synapse/pull/17320#discussion_r1657435662
 - Don't worry about `state_reset` for now, https://github.com/element-hq/synapse/pull/17320#discussion_r1657562645
2024-06-27 14:38:55 -05:00
Eric Eastwood
81c06bec20 Detect state resets 2024-06-27 11:50:18 -05:00
Eric Eastwood
15fcead2a5 Slight clean-up 2024-06-27 11:33:41 -05:00
Eric Eastwood
830e09d2de Grab prev_membership to see whether the server left the room (fixes tests)
See https://github.com/element-hq/synapse/pull/17320#discussion_r1657170493

`prev_membership` helps determine whether we should include the `event_id=null` row because
we can check whether we have already left.

 - When we leave the room causing the server to leave the room, the `prev_event_id` will be our join event
 - When the server leaves the room after us, the `prev_event_id` will be leave event
 - In the state reset case, `prev_event_id` will be our join event
2024-06-27 10:20:33 -05:00
Till
27756c9fdf
Use rstcheck to "lint" the README (#17367)
Follow up to https://github.com/element-hq/synapse/pull/17363, so we can
detect issues with the RST file early on.


### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-06-27 13:36:08 +02:00
Erik Johnston
cc5e5893fe
Handle multiple rows device inbox (#17362)
Fix bug where we don't get new to-device from remote if they resent a
message we've already persisted and have recorded in the DB twice.

`device_federation_inbox` table doesn't have a unique index, and so we
can race and store an entry in there twice. If we do so then
`simple_select_one_txn` will throw an error due to the query returning
more than one row. We should add an unique index, but it doesn't really
matter so lets just handle the case of multiple rows correctly for now.
2024-06-27 11:04:31 +01:00
Eric Eastwood
956f20ef74 (currently failing) Add test to make sure membership changes don't re-appear if the server leaves the room later 2024-06-27 01:24:37 -05:00
Eric Eastwood
f163fcf08a Remove need for topological_ordering 2024-06-27 01:21:49 -05:00
Eric Eastwood
935b98c474 All get_current_state_delta_membership_changes_for_user(...) tests passing 2024-06-27 00:49:51 -05:00
Eric Eastwood
7eb1806ee3 Fix lints 2024-06-26 21:06:05 -05:00
Eric Eastwood
b7914e7676 Add skipped test for state resets 2024-06-26 21:01:54 -05:00
Eric Eastwood
8df39d1baf Remove redundant instance_name column 2024-06-26 20:22:03 -05:00
Eric Eastwood
2a944ffcef Add state of the db in each situation 2024-06-26 20:20:17 -05:00
Eric Eastwood
48d0acfbcd Actually test get_current_state_delta_membership_changes_for_user(...) in remote join test 2024-06-26 19:52:12 -05:00
Eric Eastwood
0b9a903ca1 Add test that remotely joins room 2024-06-26 19:35:18 -05:00
Eric Eastwood
ec2d8dc1e3 Create events using helper 2024-06-26 18:52:24 -05:00
Eric Eastwood
2bf39231ed Add some tests for get_current_state_delta_membership_changes_for_user(...) 2024-06-26 18:40:36 -05:00
Till Faelligen
7c169f4d2c
Merge branch 'release-v1.110' into develop 2024-06-26 19:00:51 +02:00
Till Faelligen
f75da9cc53
1.110.0rc2 2024-06-26 18:14:57 +02:00
Till
75c19bf57a
Fix uploading packages to PyPi (#17363)
As per
https://github.com/sphinx-doc/sphinx/issues/3921#issuecomment-315581557,
we need double underscores.
Running `rst2html README.rst > /dev/null` found some more warnings.
2024-06-26 18:14:29 +02:00
Till
b924a8e1a9
Fix uploading packages to PyPi (#17363)
As per
https://github.com/sphinx-doc/sphinx/issues/3921#issuecomment-315581557,
we need double underscores.
Running `rst2html README.rst > /dev/null` found some more warnings.
2024-06-26 18:01:39 +02:00
Till Faelligen
a8dcd686fb
Fix typo 2024-06-26 15:10:49 +02:00
Till Faelligen
315b8d2032
Update changelog 2024-06-26 14:39:57 +02:00
Till Faelligen
9f47513458
1.110.0rc1 2024-06-26 14:09:13 +02:00