Erik Johnston
d6ae1aef46
Merge remote-tracking branch 'origin/develop' into erikj/test_send
2021-05-04 17:37:15 +01:00
Erik Johnston
e3bc4617fc
Time external cache response time ( #9904 )
2021-05-04 15:14:22 +01:00
Andrew Morgan
b85821aca2
Add port parameter to the sample config for psycopg2 args ( #9911 )
...
Adds the `port` option with the default value to the sample config file.
2021-05-04 13:28:59 +01:00
Erik Johnston
aa1a026509
Stuff
2021-04-30 15:19:31 +01:00
Erik Johnston
260c760d69
Don't log response
2021-04-30 15:18:17 +01:00
Erik Johnston
49da5e9ec4
Chunk _check_sigs_and_hash_and_fetch
2021-04-30 15:17:50 +01:00
Erik Johnston
3b2991e3fb
Log memory usage
2021-04-30 15:00:22 +01:00
Erik Johnston
aec80899ab
Merge branch 'erikj/stream_deserealize' into erikj/test_send
2021-04-30 14:21:58 +01:00
Erik Johnston
68f1d258d9
Use ijson
2021-04-30 14:19:27 +01:00
Erik Johnston
8481bacc93
Merge branch 'erikj/efficient_presence_join' into erikj/test_send
2021-04-30 13:37:08 +01:00
Erik Johnston
68b6106ce5
Newsfile
2021-04-30 13:36:50 +01:00
Erik Johnston
0ed608cf56
Increase perf of handling presence when joining large rooms.
...
We ended up doing a *lot* of duplicate work, and e.g. ended up doing n^2
worth of `is_mine_id(..)` checks across all joined users.
2021-04-30 13:34:15 +01:00
Erik Johnston
ac0143c4ac
Record size of incoming bytes
2021-04-30 10:24:19 +01:00
Erik Johnston
f5a25c7b53
Merge branch 'erikj/limit_how_often_gc' into erikj/test_send
2021-04-30 10:14:23 +01:00
Erik Johnston
5813719696
Merge branch 'erikj/fix_presence_joined' into erikj/test_send
2021-04-30 10:14:18 +01:00
Erik Johnston
6640fb467f
Use correct name
2021-04-29 17:44:54 +01:00
Erik Johnston
0c8cd62149
Newsfile
2021-04-29 17:36:34 +01:00
Erik Johnston
996c0ce3d5
Use get_current_users_in_room from store and not StateHandler
2021-04-29 17:35:47 +01:00
Erik Johnston
938efeb595
Add some logging
2021-04-29 16:41:16 +01:00
Erik Johnston
4a3a9597f5
Merge remote-tracking branch 'origin/develop' into erikj/test_send
2021-04-29 16:41:04 +01:00
Andrew Morgan
4d624f467a
Merge tag 'v1.33.0rc2' into develop
...
Synapse 1.33.0rc2 (2021-04-29)
==============================
Bugfixes
--------
- Fix tight loop when handling presence replication when using workers. Introduced in v1.33.0rc1. ([\#9900](https://github.com/matrix-org/synapse/issues/9900 ))
2021-04-29 14:35:14 +01:00
Andrew Morgan
d11f2dfee5
typo in changelog
v1.33.0rc2
2021-04-29 14:31:14 +01:00
Patrick Cloke
bb4b11846f
Add missing type hints to handlers and fix a Spam Checker type hint. ( #9896 )
...
The user_may_create_room_alias method on spam checkers
declared the room_alias parameter as a str when in reality it is
passed a RoomAlias object.
2021-04-29 07:17:28 -04:00
Andrew Morgan
e9444cc74d
1.33.0rc2
2021-04-29 11:45:37 +01:00
ThibF
0085dc5abc
Delete room endpoint ( #9889 )
...
Support the delete of a room through DELETE request and mark
previous request as deprecated through documentation.
Signed-off-by: Thibault Ferrante <thibault.ferrante@pm.me >
2021-04-29 10:31:45 +01:00
Erik Johnston
351f886bc8
Newsfile
2021-04-28 14:55:46 +01:00
Erik Johnston
79627b3a3c
Limit how often GC happens by time.
...
Synapse can be quite memory intensive, and unless care is taken to tune
the GC thresholds it can end up thrashing, causing noticable performance
problems for large servers. We fix this by limiting how often we GC a
given generation, regardless of current counts/thresholds.
This does not help with the reverse problem where the thresholds are set
too high, but that should only happen in situations where they've been
manually configured.
Adds a `gc_min_seconds_between` config option to override the defaults.
Fixes #9890 .
2021-04-28 14:51:31 +01:00
Erik Johnston
802560211a
Merge remote-tracking branch 'origin/release-v1.33.0' into develop
2021-04-28 14:43:10 +01:00
Erik Johnston
e4ab8676b4
Fix tight loop handling presence replication. ( #9900 )
...
Only affects workers. Introduced in #9819 .
Fixes #9899 .
2021-04-28 14:42:50 +01:00
Patrick Cloke
10a08ab88a
Use the parent's logging context name for runWithConnection. ( #9895 )
...
This fixes a regression where the logging context for runWithConnection
was reported as runWithConnection instead of the connection name,
e.g. "POST-XYZ".
2021-04-28 07:44:52 -04:00
Andrew Morgan
fa6679e794
Merge tag 'v1.33.0rc1' into develop
...
Synapse 1.33.0rc1 (2021-04-28)
==============================
Features
--------
- Update experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083 ): restricting room access via group membership. ([\#9800](https://github.com/matrix-org/synapse/issues/9800 ), [\#9814](https://github.com/matrix-org/synapse/issues/9814 ))
- Add experimental support for handling presence on a worker. ([\#9819](https://github.com/matrix-org/synapse/issues/9819 ), [\#9820](https://github.com/matrix-org/synapse/issues/9820 ), [\#9828](https://github.com/matrix-org/synapse/issues/9828 ), [\#9850](https://github.com/matrix-org/synapse/issues/9850 ))
- Return a new template when an user attempts to renew their account multiple times with the same token, stating that their account is set to expire. This replaces the invalid token template that would previously be shown in this case. This change concerns the optional account validity feature. ([\#9832](https://github.com/matrix-org/synapse/issues/9832 ))
Bugfixes
--------
- Fixes the OIDC SSO flow when using a `public_baseurl` value including a non-root URL path. ([\#9726](https://github.com/matrix-org/synapse/issues/9726 ))
- Fix thumbnail generation for some sites with non-standard content types. Contributed by @rkfg. ([\#9788](https://github.com/matrix-org/synapse/issues/9788 ))
- Add some sanity checks to identity server passed to 3PID bind/unbind endpoints. ([\#9802](https://github.com/matrix-org/synapse/issues/9802 ))
- Limit the size of HTTP responses read over federation. ([\#9833](https://github.com/matrix-org/synapse/issues/9833 ))
- Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists. ([\#9867](https://github.com/matrix-org/synapse/issues/9867 ))
- Fix a long-standing bug where errors from federation did not propagate to the client. ([\#9868](https://github.com/matrix-org/synapse/issues/9868 ))
Improved Documentation
----------------------
- Add a note to the docker docs mentioning that we mirror upstream's supported Docker platforms. ([\#9801](https://github.com/matrix-org/synapse/issues/9801 ))
Internal Changes
----------------
- Add a dockerfile for running Synapse in worker-mode under Complement. ([\#9162](https://github.com/matrix-org/synapse/issues/9162 ))
- Apply `pyupgrade` across the codebase. ([\#9786](https://github.com/matrix-org/synapse/issues/9786 ))
- Move some replication processing out of `generic_worker`. ([\#9796](https://github.com/matrix-org/synapse/issues/9796 ))
- Replace `HomeServer.get_config()` with inline references. ([\#9815](https://github.com/matrix-org/synapse/issues/9815 ))
- Rename some handlers and config modules to not duplicate the top-level module. ([\#9816](https://github.com/matrix-org/synapse/issues/9816 ))
- Fix a long-standing bug which caused `max_upload_size` to not be correctly enforced. ([\#9817](https://github.com/matrix-org/synapse/issues/9817 ))
- Reduce CPU usage of the user directory by reusing existing calculated room membership. ([\#9821](https://github.com/matrix-org/synapse/issues/9821 ))
- Small speed up for joining large remote rooms. ([\#9825](https://github.com/matrix-org/synapse/issues/9825 ))
- Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9838](https://github.com/matrix-org/synapse/issues/9838 ))
- Only store the raw data in the in-memory caches, rather than objects that include references to e.g. the data stores. ([\#9845](https://github.com/matrix-org/synapse/issues/9845 ))
- Limit length of accepted email addresses. ([\#9855](https://github.com/matrix-org/synapse/issues/9855 ))
- Remove redundant `synapse.types.Collection` type definition. ([\#9856](https://github.com/matrix-org/synapse/issues/9856 ))
- Handle recently added rate limits correctly when using `--no-rate-limit` with the demo scripts. ([\#9858](https://github.com/matrix-org/synapse/issues/9858 ))
- Disable invite rate-limiting by default when running the unit tests. ([\#9871](https://github.com/matrix-org/synapse/issues/9871 ))
- Pass a reactor into `SynapseSite` to make testing easier. ([\#9874](https://github.com/matrix-org/synapse/issues/9874 ))
- Make `DomainSpecificString` an `attrs` class. ([\#9875](https://github.com/matrix-org/synapse/issues/9875 ))
- Add type hints to `synapse.api.auth` and `synapse.api.auth_blocking` modules. ([\#9876](https://github.com/matrix-org/synapse/issues/9876 ))
- Remove redundant `_PushHTTPChannel` test class. ([\#9878](https://github.com/matrix-org/synapse/issues/9878 ))
- Remove backwards-compatibility code for Python versions < 3.6. ([\#9879](https://github.com/matrix-org/synapse/issues/9879 ))
- Small performance improvement around handling new local presence updates. ([\#9887](https://github.com/matrix-org/synapse/issues/9887 ))
2021-04-28 12:12:29 +01:00
Andrew Morgan
8ba086980d
Reword account validity template change to sound less like a bugfix
v1.33.0rc1
2021-04-28 12:07:49 +01:00
Erik Johnston
391bfe9a7b
Reduce memory footprint of caches ( #9886 )
2021-04-28 11:59:28 +01:00
Andrew Morgan
787de3190f
1.33.0rc1
2021-04-28 11:43:33 +01:00
Andrew Morgan
4e0fd35bc9
Revert "Experimental Federation Speedup ( #9702 )"
...
This reverts commit 05e8c70c05 .
2021-04-28 11:38:33 +01:00
Erik Johnston
dd2d32dcdb
Add type hints to presence handler ( #9885 )
2021-04-28 11:07:47 +01:00
Andrew Morgan
fe604a022a
Remove various bits of compatibility code for Python <3.6 ( #9879 )
...
I went through and removed a bunch of cruft that was lying around for compatibility with old Python versions. This PR also will now prevent Synapse from starting unless you're running Python 3.6+.
2021-04-27 13:13:07 +01:00
Patrick Cloke
1350b053da
Pass errors back to the client when trying multiple federation destinations. ( #9868 )
...
This ensures that something like an auth error (403) will be
returned to the requester instead of attempting to try more
servers, which will likely result in the same error, and then
passing back a generic 400 error.
2021-04-27 07:30:34 -04:00
Erik Johnston
0ffa5fb935
Use current state table for presence.get_interested_remotes ( #9887 )
...
This should be a lot quicker than asking the state handler.
2021-04-27 10:09:41 +01:00
Erik Johnston
6237096e80
Newsfile
2021-04-26 14:23:15 +01:00
Erik Johnston
1b4ec8ef0e
Export jemalloc stats to prometheus when used
2021-04-26 14:18:06 +01:00
Richard van der Hoff
3ff2251754
Improved validation for received requests ( #9817 )
...
* Simplify `start_listening` callpath
* Correctly check the size of uploaded files
2021-04-23 19:20:44 +01:00
Richard van der Hoff
84936e2264
Kill off _PushHTTPChannel. ( #9878 )
...
First of all, a fixup to `FakeChannel` which is needed to make it work with the default HTTP channel implementation.
Secondly, it looks like we no longer need `_PushHTTPChannel`, because as of #8013 , the producer that gets attached to the `HTTPChannel` is now an `IPushProducer`. This is good, because it means we can remove a whole load of test-specific boilerplate which causes variation between tests and production.
2021-04-23 18:40:57 +01:00
Andrew Morgan
695b73c861
Allow OIDC cookies to work on non-root public baseurls ( #9726 )
...
Applied a (slightly modified) patch from https://github.com/matrix-org/synapse/issues/9574 .
As far as I understand this would allow the cookie set during the OIDC flow to work on deployments using public baseurls that do not sit at the URL path root.
2021-04-23 18:22:47 +01:00
Richard van der Hoff
59d24c5bef
pass a reactor into SynapseSite ( #9874 )
2021-04-23 17:06:47 +01:00
Patrick Cloke
e83627926f
Add type hints to auth and auth_blocking. ( #9876 )
2021-04-23 12:02:16 -04:00
Erik Johnston
a15c003e5b
Make DomainSpecificString an attrs class ( #9875 )
2021-04-23 15:46:29 +01:00
Andrew Morgan
ceaa76970f
Remove room and user invite ratelimits in default unit test config ( #9871 )
2021-04-23 13:37:48 +01:00
Erik Johnston
9d25a0ae65
Split presence out of master ( #9820 )
2021-04-23 12:21:55 +01:00
Patrick Cloke
d924827da1
Check for space membership during a remote join of a restricted room ( #9814 )
...
When receiving a /send_join request for a room with join rules set to 'restricted',
check if the user is a member of the spaces defined in the 'allow' key of the join rules.
This only applies to an experimental room version, as defined in MSC3083.
2021-04-23 07:05:51 -04:00