Commit graph

24143 commits

Author SHA1 Message Date
Till Faelligen
e64a35cb00
Route key queries to the client_reader 2024-08-30 12:01:31 +02:00
Till Faelligen
58c8a2c6fd
Merge branch 'develop' of github.com:element-hq/synapse into anoa/configure_workers_updates 2024-08-29 15:40:21 +02:00
Erik Johnston
b21134de3b
Fix starting non-media repos (#17626)
Regressed in #17543.

The `max_download_size` config is not available on workers that don't
load the media repo.

Besides, we should honour the max_size param that was passed into the
function.
2024-08-29 12:26:17 +00:00
Olivier 'reivilibre
56bcba2b16 Add metrics listener config for main process 2024-08-29 11:48:22 +01:00
meise
a8f29c9913
docs: fix typo in saml2_config example (#17594) 2024-08-29 10:39:16 +00:00
Dirk Klimpel
9eed8cd878
fix listener docs - admin api only on main process (#17590) 2024-08-29 10:33:14 +00:00
Erik Johnston
8678516e79
Sliding sync: Always send your own receipts down (#17617)
When returning receipts in sliding sync for initial rooms we should
always include our own receipts in the room (even if they don't match
any timeline events).

Reviewable commit-by-commit.

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-08-29 10:09:40 +01:00
Till
573c6d7e69
Use max_upload_size as the limit when following the Location header (#17543)
Otherwise we use the `expected_size` from the initial federation
request, which might be far too low.

### 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: Erik Johnston <erikj@element.io>
2024-08-29 09:25:10 +02:00
Olivier 'reivilibre
40a684e169 Gen metrics scraping configurations, for use with file_sd_configs 2024-08-28 18:58:02 +01:00
Erik Johnston
689641b903
Sliding sync: factor out room list logic (#17622)
Move calculating of the room lists out of the core handler. This should
make it easier to switch things around to start using the tables in
#17512.

This is just moving code between files and methods.

Reviewable commit-by-commit
2024-08-28 18:42:19 +01:00
Krishan
e75a23a63d
Fix hierarchy returning 403 when room is accessible through federation (#17194) 2024-08-28 15:45:49 +01:00
Shay
e563e4bdf3
Fix content length on federation /thumbnail responses (#17532) 2024-08-28 11:29:12 +01:00
dependabot[bot]
f4032d3e71
Bump serde from 1.0.208 to 1.0.209 (#17613) 2024-08-28 10:09:26 +01:00
eyJhb
8da16e55fe
hash_password accepts stdin now (#17608)
`hash_password` now actually accepts password from stdin. The `getpass`
reads from TTY, and does NOT accept stdin in any way.

The manpage has been updated to reflect that.
2024-08-27 18:51:43 +01:00
dependabot[bot]
d9cc0faf4b
Bump pyyaml from 6.0.1 to 6.0.2 (#17611) 2024-08-27 14:55:56 +01:00
dependabot[bot]
cca77af68f
Bump phonenumbers from 8.13.43 to 8.13.44 (#17610) 2024-08-27 14:55:47 +01:00
dependabot[bot]
48742da536
Bump attrs from 23.2.0 to 24.2.0 (#17609) 2024-08-27 14:55:38 +01:00
dependabot[bot]
940b932405
Bump pygithub from 2.3.0 to 2.4.0 (#17612) 2024-08-27 14:55:27 +01:00
dependabot[bot]
a2b2f6d09b
Bump serde_json from 1.0.125 to 1.0.127 (#17614) 2024-08-27 14:55:03 +01:00
Erik Johnston
defd4aca67
Speed up fetching latest stream positions via cache (#17606)
The idea is to engineer it so that the vast majority of the rooms can
stay in the cache, so we can just ignore them.
2024-08-27 11:03:56 +00:00
Erik Johnston
b4d95409fb
Fix @tag_args for non-methods (#17604)
The decorator assumed we were always wrapping function methods
2024-08-27 11:47:28 +01:00
dependabot[bot]
f1a1c7fc53
Bump types-setuptools from 71.1.0.20240726 to 71.1.0.20240818 (#17586) 2024-08-23 09:53:14 +01:00
dependabot[bot]
cb9fa062b7
Bump sentry-sdk from 2.12.0 to 2.13.0 (#17585) 2024-08-23 09:53:06 +01:00
dependabot[bot]
74b75cfd54
Bump cryptography from 42.0.8 to 43.0.0 (#17584) 2024-08-23 09:52:53 +01:00
dependabot[bot]
87d13fd143
Bump types-jsonschema from 4.23.0.20240712 to 4.23.0.20240813 (#17583) 2024-08-23 09:52:34 +01:00
dependabot[bot]
ad2cd9aefd
Bump serde_json from 1.0.124 to 1.0.125 (#17582) 2024-08-23 09:52:26 +01:00
dependabot[bot]
ad0ee53993
Bump serde from 1.0.206 to 1.0.208 (#17581) 2024-08-23 09:52:16 +01:00
Till Faelligen
84880cbe94
Route createRoom to event creators, add sliding_sync worker type 2024-08-21 11:56:08 +02:00
Erik Johnston
92b38c1afd
Sliding sync: Split up handler into its own module (#17595)
That file was getting long.

The changes are non functional, and simply split things up into:
- the main class
- the connection store
- the extensions
- the types
2024-08-20 18:30:23 +00:00
Quentin Gliech
a8e313836d
changelog: move SSSS some changes in the features section 2024-08-20 15:18:13 +02:00
Quentin Gliech
7c9684b5dc
1.114.0rc1 2024-08-20 14:57:22 +02:00
Erik Johnston
f1e8d2d15a
Sliding Sync: Speed up getting receipts for initial rooms (#17592)
Let's only pull out the events we care about. Note that the index isn't
necessary here, as postgres is happy to scan the set of rooms for the
events.
2024-08-20 12:57:34 +01:00
Erik Johnston
10428046e4
Add metrics for sliding sync processing time (#17593)
This should let us see how quickly we actually process things in
practice.
2024-08-20 11:36:49 +00:00
Erik Johnston
6eb98a4f1c
Sliding Sync: Handle timeline limit changes (take 2) (#17579)
This supersedes #17503, given the per-connection state is being heavily
rewritten it felt easier to recreate the PR on top of that work.

This correctly handles the case of timeline limits going up and down.

This does not handle changes in `required_state`, but that can be done
as a separate PR.

Based on #17575.

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-08-20 10:31:25 +01:00
Erik Johnston
950ba844f7
Sliding Sync: Batch up fetching receipts (#17589)
This is to make initial sliding sync a bit faster
2024-08-20 10:13:26 +01:00
Erik Johnston
8b8d74d12f
Sliding sync: Correctly track which read receipts we have or have not sent down. (#17575)
Add connection tracking to the receipts extension.

Based on #17574

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-08-19 21:16:07 +01:00
Erik Johnston
261e746281
Sliding sync: Add classes for per-connection state (#17574)
This is some prep work ahead of correctly tracking receipts, where we
will also want to track the room status in terms of last receipt we had
sent down.

Essentially, we add two classes `PerConnectionState` and a mutable
version, and then operate on those.

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-08-19 20:09:41 +01:00
Erik Johnston
993644ded0
Fix zero length media handling (#17570)
Results in:

```
AssertionError: null
  File "synapse/http/server.py", line 332, in _async_render_wrapper
    callback_return = await self._async_render(request)
  File "synapse/http/server.py", line 544, in _async_render
    callback_return = await raw_callback_return
  File "synapse/federation/transport/server/_base.py", line 369, in new_func
    response = await func(
  File "synapse/federation/transport/server/federation.py", line 826, in on_GET
    await self.media_repo.get_local_media(
  File "synapse/media/media_repository.py", line 473, in get_local_media
    await respond_with_multipart_responder(
  File "synapse/media/_base.py", line 353, in respond_with_multipart_responder
    assert content_length is not None
```
2024-08-19 15:06:44 +01:00
Erik Johnston
a5d25bb623
Test github token before running release script (#17562)
This stops people from getting half way through a step and it failing
due to the github token having expired (this happens to me every damn
time).
2024-08-19 14:15:36 +01:00
Till Faelligen
50bb114032
Add metrics 2024-08-19 14:53:24 +02:00
Erik Johnston
f162c92f2a
Speed up /keys/changes (#17548)
Follow on from #17537.

This is just adding a batched lookup function (you might want to hide
whitespace in the diff).
2024-08-16 16:04:02 +01:00
Erik Johnston
9ce489be5e
Add a flag to /versions about SSS support (#17571)
So that clients can check for support. Note that if the feature is only
enabled for some users, the `/versions` request must be authenticated to
pick up that SSS is enabled for the user
2024-08-16 08:54:57 +01:00
Till Faelligen
e466404b4f
Fix paths, remove logging (for now), disable passwords 2024-08-15 14:22:50 +02:00
Till Faelligen
4dd02db657
Fix parameter ordering 2024-08-15 11:33:10 +02:00
Andrew Morgan
333f806d06 fixup: Add SYNAPSE_CONFIG_TEMPLATE_DIR env var 2024-08-14 19:00:57 +01:00
Andrew Morgan
550d2a1e77 start.py: Support SYNAPSE_CONFIG_TEMPLATE_DIR 2024-08-14 18:57:23 +01:00
Andrew Morgan
61349bd860 create data directory if it doesn't exist
ideally this would be done in `main`
2024-08-14 18:52:47 +01:00
Andrew Morgan
20bd26ecad Allow configuring data dir in start.py 2024-08-14 18:47:47 +01:00
Andrew Morgan
e91cd9c722 Allow running python from a venv 2024-08-14 17:27:36 +01:00
Andrew Morgan
18a331a18c Document additional environment variables 2024-08-14 17:27:34 +01:00