summary refs log tree commit diff
path: root/static (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-08-09SS: Hook up notification countsErik Johnston1-5/+8
2024-08-08Start handlers for new media endpoints when media resource configured (#17483)devonh6-70/+132
This is in response to issue #17473. Not all the necessary handlers to deal with media requests are started now when configuring synapse to use a media worker as per the [example config](https://element-hq.github.io/synapse/latest/workers.html#synapseappmedia_repository). The new media endpoints introduced with authenticated media fall under the `client` & `federation` handlers in synapse. This PR starts up handlers for the new media endpoints if a worker has been configured with only the `media` resource type. ### 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)) --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-08-08Replace deprecated `HTTPAdapter.get_connection` method with ↵Andrew Morgan2-7/+19
`get_connection_with_tls_context` (#17536)
2024-08-08SSS: Implement PREVIOUSLY room tracking (#17535)Erik Johnston3-88/+53
Implement tracking of rooms that have had updates that have not been sent down to clients. Simplified Sliding Sync (SSS)
2024-08-07Sliding Sync: Use `stream_ordering` based timeline pagination for ↵Eric Eastwood9-126/+311
incremental sync (#17510) Use `stream_ordering` based `timeline` pagination for incremental `/sync` in Sliding Sync. Previously, we were always using a `topological_ordering` but we should only be using that for historical scenarios (initial `/sync`, newly joined, or haven't sent the room down the connection before). This is slightly different than what the [spec suggests](https://spec.matrix.org/v1.10/client-server-api/#syncing) > Events are ordered in this API according to the arrival time of the event on the homeserver. This can conflict with other APIs which order events based on their partial ordering in the event graph. This can result in duplicate events being received (once per distinct API called). Clients SHOULD de-duplicate events based on the event ID when this happens. But we've had a [discussion below in this PR](https://github.com/element-hq/synapse/pull/17510#discussion_r1699105569) and this matches what Sync v2 already does and seems like it makes sense. Created a spec issue https://github.com/matrix-org/matrix-spec/issues/1917 to clarify this. Related issues: - https://github.com/matrix-org/matrix-spec/issues/1917 - https://github.com/matrix-org/matrix-spec/issues/852 - https://github.com/matrix-org/matrix-spec-proposals/pull/4033
2024-08-07Bump bytes from 1.6.1 to 1.7.1 (#17526)dependabot[bot]1-2/+2
2024-08-07Bump regex from 1.10.5 to 1.10.6 (#17527)dependabot[bot]1-2/+2
2024-08-07Fixup sliding sync comment (#17531)Erik Johnston2-1/+2
c.f. https://github.com/element-hq/synapse/pull/17529#discussion_r1705780925
2024-08-06Sliding Sync: Add more tracing (#17514)Eric Eastwood6-240/+346
Spawning from looking at a couple traces and wanting a little more info. Follow-up to github.com/element-hq/synapse/pull/17501 The changes in this PR allow you to find slow Sliding Sync traces ignoring the `wait_for_events` time. In Jaeger, you can now filter for the `current_sync_for_user` operation with `RESULT.result=true` indicating that it actually returned non-empty results. If you want to find traces for your own user, you can use `RESULT.result=true ARG.sync_config.user="@madlittlemods:matrix.org"`
2024-08-06Clarify `auto_accept_invites.worker_to_run_on` config docs (#17515)Andrew Morgan2-1/+6
2024-08-061.113.0rc1 v1.113.0rc1 github/release-v1.113 release-v1.113Andrew Morgan20-18/+51
2024-08-06Bump phonenumbers from 8.13.39 to 8.13.42 (#17521)dependabot[bot]1-3/+3
2024-08-06Bump towncrier from 23.11.0 to 24.7.1 (#17523)dependabot[bot]1-5/+5
2024-08-06Bump black from 24.4.2 to 24.8.0 (#17522)dependabot[bot]1-25/+25
2024-08-06Bump serde_json from 1.0.121 to 1.0.122 (#17525)dependabot[bot]1-2/+2
2024-08-06SS: Reset connection if token is unrecognized (#17529)Erik Johnston4-17/+57
This triggers the client to start a new sliding sync connection. If we don't do this and the client asks for the full range of rooms, we end up sending down all rooms and their state from scratch (which can be very slow) This causes things like https://github.com/element-hq/element-x-ios/issues/3115 after we restart the server --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-08-05Sliding Sync: Easier to understand timeline assertions in tests (#17511)Eric Eastwood2-21/+104
Added `_assertTimelineEqual(...)` because I got fed up trying to understand the crazy diffs from the standard `self.assertEqual(...)`/`self.assertListEqual(...)` Before: ``` [FAIL] Traceback (most recent call last): File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 103, in test_rooms_limited_initial_sync self.assertListEqual( File "/usr/lib/python3.12/unittest/case.py", line 1091, in assertListEqual self.assertSequenceEqual(list1, list2, msg, seq_type=list) File "/usr/lib/python3.12/unittest/case.py", line 1073, in assertSequenceEqual self.fail(msg) twisted.trial.unittest.FailTest: Lists differ: ['$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0w[95 chars]isM'] != ['$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4[95 chars]nnU'] First differing element 0: '$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0wWA' '$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4-E' - ['$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0wWA', - '$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4-E', ? ^ + ['$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4-E', ? ^ - '$q4PRxQ_pBZkQI1keYuZPTtExQ23DqpUI3-Lxwfj_isM'] + '$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0wWA', + '$j3Xj-t2F1wH9kUHsI8X5yqS7hkdSyN2owaArfvk8nnU'] ``` After: ``` [FAIL] Traceback (most recent call last): File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 178, in test_rooms_limited_initial_sync self._assertTimelineEqual( File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 110, in _assertTimelineEqual self._assertListEqual( File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 79, in _assertListEqual self.fail(f"{diff_message}\n{message}") twisted.trial.unittest.FailTest: Items must Expected items to be in actual ('?' = missing expected items): [ (10, master) $w-BoqW1PQQFU4TzVJW5OIelugxh0mY12wrfw6mbC6D4 (m.room.message) activity4 (11, master) $sSidTZf1EOQmCVDU4mrH_1-bopMQhwcDUO2IhoemR6M (m.room.message) activity5 ? (12, master) $bgOcc3D-2QSkbk4aBxKVyOOQJGs7ZuncRJwG3cEANZg (m.room.member, @user1:test) join ] Actual ('+' = found expected items): [ + (11, master) $sSidTZf1EOQmCVDU4mrH_1-bopMQhwcDUO2IhoemR6M (m.room.message) activity5 + (10, master) $w-BoqW1PQQFU4TzVJW5OIelugxh0mY12wrfw6mbC6D4 (m.room.message) activity4 (9, master) $FmCNyc11YeFwiJ4an7_q6H0LCCjQOKd6UCr5VKeXXUw (m.room.message, None) activity3 ] ```
2024-08-05Update log lineErik Johnston1-1/+1
2024-08-05Log what we send downErik Johnston1-0/+11
2024-08-05Don't send down list opsErik Johnston2-23/+1
2024-07-31Sliding Sync: Add typing notification extension (MSC3961) (#17505)Eric Eastwood9-7/+640
[MSC3961](https://github.com/matrix-org/matrix-spec-proposals/pull/3961): Sliding Sync Extension: Typing Notifications Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-07-31Sliding Sync: Split and move tests (#17504)Eric Eastwood15-5860/+6315
Split and move Sliding Sync tests so we have some more sane test file sizes
2024-07-31Sliding Sync: Fix `limited` response description (make accurate) (#17507)Eric Eastwood2-2/+3
2024-07-30Sliding Sync: Update filters to be robust against remote invite rooms (#17450)Eric Eastwood11-109/+1597
Update `filters.is_encrypted` and `filters.types`/`filters.not_types` to be robust when dealing with remote invite rooms in Sliding Sync. Part of [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync Follow-up to https://github.com/element-hq/synapse/pull/17434 We now take into account current state, fallback to stripped state for invite/knock rooms, then historical state. If we can't determine the info needed to filter a room (either from state or stripped state), it is filtered out.
2024-07-30Sliding Sync: Add receipts extension (MSC3960) (#17489)Eric Eastwood7-268/+1070
[MSC3960](https://github.com/matrix-org/matrix-spec-proposals/pull/3960): Receipts extension Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-07-30Bump types-setuptools from 70.1.0.20240627 to 71.1.0.20240726 (#17497)dependabot[bot]1-3/+3
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30Bump types-pyopenssl from 24.1.0.20240425 to 24.1.0.20240722 (#17496)dependabot[bot]1-3/+3
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30Bump bcrypt from 4.1.3 to 4.2.0 (#17495)dependabot[bot]1-28/+28
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30Bump serde_json from 1.0.120 to 1.0.121 (#17493)dependabot[bot]1-2/+3
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-301.112.0 v1.112.0 github/release-v1.112 release-v1.112Olivier 'reivilibre4-2/+32
2024-07-30Upgrade locked dependency on Twisted to 24.7.0rc1. (#17502)reivilibre8-57/+65
I also update the tests and HTTP Proxy code to fix it for this new Twisted release. Pulls in fix for https://github.com/twisted/twisted/security/advisories/GHSA-c8m8-j448-xjx7 Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2024-07-30Add bold emphasis to some parts of the changelog v1.111.1 github/release-v1.111 release-v1.111Olivier 'reivilibre1-2/+2
2024-07-301.111.1Olivier 'reivilibre4-2/+27
2024-07-30Handle increases in timeline limitErik Johnston2-2/+100
2024-07-30Upgrade locked dependency on Twisted to 24.7.0rc1. (#17502)reivilibre8-57/+65
I also update the tests and HTTP Proxy code to fix it for this new Twisted release. Pulls in fix for https://github.com/twisted/twisted/security/advisories/GHSA-c8m8-j448-xjx7 Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2024-07-30Don't set the initial flagErik Johnston1-7/+8
2024-07-30Remember previous timeline limitErik Johnston2-20/+54
2024-07-30Only mark as updated if entry has changedErik Johnston1-1/+3
2024-07-30Add fast path if from_token is NoneErik Johnston1-8/+11
2024-07-30Refactor to make LIVE non-static valueErik Johnston1-2/+5
2024-07-30Bump ruff from 0.5.4 to 0.5.5 (#17494)dependabot[bot]2-21/+21
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30Add some more opentracing to sliding sync (#17501)Erik Johnston3-5/+34
This will make it easier to see what it is doing in jaeger.
2024-07-30Fix `failures` property in `/keys/query` (#17499)Richard van der Hoff3-11/+75
Fixes: https://github.com/element-hq/synapse/issues/17498 Fixes: https://github.com/element-hq/element-web/issues/27867
2024-07-30Only send rooms with updates down sliding sync (#17479)Erik Johnston5-30/+138
Rather than always including all rooms in range. Also adds a pre-filter to rooms that checks the stream change cache to see if anything might have happened. Based on #17447 --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-07-29Sliding Sync: Track whether we have sent rooms down to clients (#17447)Erik Johnston9-45/+814
The basic idea is that we introduce a new token for a sliding sync connection, which stores the mapping of room to room "status" (i.e. have we sent the room down?). This token allows us to handle duplicate requests properly. In future it can be used to store more "per-connection" information safely. In future this should be migrated into the DB, so its important that we try to reduce the number of syncs where we need to update the per-connection information. In this PoC this only happens when we: a) send down a set of room for the first time, or b) we have previously sent down a room and there are updates but we are not sending the room down the sync (due to not falling in a list range) Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-07-29Trace stuffErik Johnston1-0/+4
2024-07-28TestErik Johnston1-9/+24
2024-07-28Revert room subsErik Johnston1-8/+1
2024-07-28fixupErik Johnston1-1/+4
2024-07-28UpdatesErik Johnston2-3/+3
2024-07-28Always initial on room subsErik Johnston1-1/+5
2024-07-26TagErik Johnston1-1/+7
2024-07-26log responseErik Johnston1-0/+1
2024-07-26LINTErik Johnston1-0/+1
2024-07-26REVERTErik Johnston1-24/+0
2024-07-26REVERTErik Johnston1-2/+2
2024-07-26REVERTErik Johnston4-10/+11
2024-07-26REVERTErik Johnston2-26/+0
2024-07-26REVERTErik Johnston5-5/+5
2024-07-26FIXUPErik Johnston1-2/+5
2024-07-26Also log json requestErik Johnston1-0/+2
2024-07-26Don't send down rooms if nothing has happenedErik Johnston2-27/+15
2024-07-26Make it clear we only filter out rooms in incremental syncErik Johnston1-2/+2
2024-07-26Add test that empty room comes down initial syncErik Johnston1-11/+29
2024-07-26Review commentsErik Johnston2-7/+4
2024-07-26Add never testErik Johnston1-0/+70
2024-07-26Previously state testErik Johnston1-0/+111
2024-07-26Review commentsErik Johnston2-15/+21
2024-07-25Fix nested quote syntaxEric Eastwood1-1/+1
2024-07-25