summary refs log tree commit diff
path: root/synapse/logging/utils.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-04-23Revert "Merge pull request #7315 from matrix-org/babolivier/request_token"Brendan Abolivier7-121/+3
This reverts commit 6f4319368b3afab661c55367b9348f9b77bc04a5, reversing changes made to 0d775fcc2d0c7b6a07dad5430256d4d6c75a9f0d.
2020-04-22Stop the master relaying USER_SYNC for other workers (#7318)Richard van der Hoff10-159/+199
Long story short: if we're handling presence on the current worker, we shouldn't be sending USER_SYNC commands over replication. In an attempt to figure out what is going on here, I ended up refactoring some bits of the presencehandler code, so the first 4 commits here are non-functional refactors to move this code slightly closer to sanity. (There's still plenty to do here :/). Suggest reviewing individual commits. Fixes (I hope) #7257.
2020-04-22Config option to inhibit 3PID errors on /requestTokenBrendan Abolivier7-3/+121
Adds a request_token_inhibit_errors configuration flag (disabled by default) which, if enabled, change the behaviour of all /requestToken endpoints so that they return a 200 and a fake sid if the 3PID was/was not found associated with an account (depending on the endpoint), instead of an error. Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2020-04-22Fix replication metrics when using redis (#7325)Erik Johnston3-37/+30
2020-04-22formatting for the changelog v1.12.4rc1Richard van der Hoff1-1/+1
2020-04-22Another go at fixing one-word commands (#7326)Richard van der Hoff3-1/+44
I messed this up last time I tried (#7239 / e13c6c7).
2020-04-221.12.4rc1Richard van der Hoff6-5/+18
2020-04-221.12.4rc1Richard van der Hoff1-1/+1
2020-04-22fix changelog nameRichard van der Hoff1-0/+0
2020-04-22Extend StreamChangeCache to support multiple entities per stream ID (#7303)Richard van der Hoff6-56/+272
First some background: StreamChangeCache is used to keep track of what "entities" have changed since a given stream ID. So for example, we might use it to keep track of when the last to-device message for a given user was received [1], and hence whether we need to pull any to-device messages from the database on a sync [2]. Now, it turns out that StreamChangeCache didn't support more than one thing being changed at a given stream_id (this was part of the problem with #7206). However, it's entirely valid to send to-device messages to more than one user at a time. As it turns out, this did in fact work, because *some* methods of StreamChangeCache coped ok with having multiple things changing on the same stream ID, and it seems we never actually use the methods which don't work on the stream change caches where we allow multiple changes at the same stream ID. But that feels horribly fragile, hence: let's update StreamChangeCache to properly support this, and add some typing and some more tests while we're at it. [1]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L301 [2]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L47-L51
2020-04-22Extend room admin api with additional attributes (#7225)Dirk Klimpel6-604/+869
2020-04-22Add ability to run replication protocol over redis. (#7040)Erik Johnston12-36/+342
This is configured via the `redis` config options.
2020-04-22Do not treat display names as globs for push rules. (#7271)Patrick Cloke4-30/+106
2020-04-22Reduce logging verbosity of URL cache cleanup. (#7295)Michael Kaye2-2/+8
2020-04-22Query missing cross-signing keys on local sig upload (#7289)Andrew Morgan3-18/+180
2020-04-22import urllib.parse when using urllib.parse.quote (#7319)Andrew Morgan2-1/+2
2020-04-22Reduce federation logging on success (#7321)Michael Kaye2-8/+15
Splitting based on the response code means we can avoid double logging here and identical information from line 164 while still logging at info if we don't get a good response and need to retry.
2020-04-21Fix changelog fileRichard van der Hoff2-1/+1
I updated the PR and forgot to update the changelog.
2020-04-21Support GET account_data requests on a worker (#7311)Richard van der Hoff4-0/+17
2020-04-20Revert "Query missing cross-signing keys on local sig upload"Richard van der Hoff3-141/+12
This was incorrectly merged to the release branch before it was ready. This reverts commit 72fe2affb6ac86d433b80b6452da57052365aa26.
2020-04-20Always send the user updates to their own device list (#7160)David Baker3-3/+19
2020-04-20Fix indention in generated config file (#7300)Lars Franke3-48/+49
Also adjust sample_config.yaml Signed-off-by: Lars Franke <frcl@mailbox.org>
2020-04-20Reject unknown UI auth sessions (instead of silently generating a new one) ↵Patrick Cloke2-65/+95
(#7268)
2020-04-20On catchup, process each row with its own stream id (#7286)Richard van der Hoff3-5/+72
Other parts of the code (such as the StreamChangeCache) assume that there will not be multiple changes with the same stream id. This code was introduced in #7024, and I hope this fixes #7206.
2020-04-17Use a template for the SSO success page to allow for customization. (#7279)Patrick Cloke6-37/+66
2020-04-17Added explicit Python build tools to snap requirements (#7213)James2-0/+5
Signed-off-by: James Hebden <james@ec0.io>
2020-04-17Query missing cross-signing keys on local sig uploadAndrew Morgan3-12/+141
Add changelog Save retrieved keys to the db lint Fix and de-brittle remote result dict processing Use query_user_devices instead, assume only master, self_signing key types Make changelog more useful Remove very specific exception handling Wrap get_verify_key_from_cross_signing_key in a try/except Note that _get_e2e_cross_signing_verify_key can raise a SynapseError lint Add comment explaining why this is useful Only fetch master and self_signing key types Fix log statements, docstrings Remove extraneous items from remote query try/except lint Factor key retrieval out into a separate function Send device updates, modeled after SigningKeyEduUpdater._handle_signing_key_updates Update method docstring
2020-04-17Improve type checking in `replication.tcp.Stream` (#7291)Richard van der Hoff5-122/+143
The general idea here is to get rid of the type: ignore annotations on all of the current_token and update_function assignments, which would have caught #7290. After a bit of experimentation, it seems like the least-awful way to do this is to pass the offending functions in as parameters to the Stream constructor. Unfortunately that means that the concrete implementations no longer have the same constructor signature as Stream itself, which means that it gets hard to correctly annotate STREAMS_MAP. I've also introduced a couple of new types, to take out some duplication.
2020-04-17Improve example TURN configuration in documentation (#7284)nataraj-hates-MS-for-stealing-github1-1/+1
2020-04-17Clarify the comments for media_storage_providers options (#7272)Tristan Lins3-8/+7
2020-04-16Do not treat display names as globs for push rules. (#7271)Patrick Cloke4-30/+106
2020-04-16Fix 'generator object is not subscriptable' error (#7290)Richard van der Hoff2-1/+3
Some of the query functions return generators rather than lists, so we can't index into the result. Happily we already have a copy of the results. (think this was introduced in #7024)
2020-04-15Convert auth handler to async/await (#7261)Patrick Cloke10-170/+224
2020-04-15Add notes to the changelog about an additional SSO template. (#7259)Patrick Cloke2-4/+9
2020-04-15Allow specifying the value of Accept-Language header for URL previews (#7265)Andrew Morgan5-2/+116
2020-04-15Add some warnings and notes about slow upgrade (#7275)Richard van der Hoff2-2/+74
Fixes #7144.
2020-04-15Fix a potentially-huge sql query (#7274)Richard van der Hoff2-7/+17
We could end up looking up tens of thousands of events, which could cause large amounts of data to be logged to the postgres log.
2020-04-14Fix the parameters of a test fixture (#7243)Zay11Zay2-1/+2
2020-04-14Only register devices edu handler on the master process (#7255)Andrew Morgan2-7/+12
2020-04-14Only register devices edu handler on the master process (#7255)Andrew Morgan2-7/+12
2020-04-13Add setting to nginx configuration to allow larger file uploads (#7251)Ryan Hovland2-0/+4
2020-04-13Check on room creation if the user is allowed to publish the room to the ↵PeerD2-0/+8
room directory. (#7260)
2020-04-11typosMatthew Hodgson2-2/+2
2020-04-09Default PL100 to enable encryption in a room (#7230)Andrew Morgan4-4/+299
2020-04-09Do not allow a deactivated user to login via SSO. (#7240)Patrick Cloke8-10/+110
2020-04-09Unblacklist /upgrade creates a new room (#7228)Andrew Morgan2-2/+1
This commit was originally merged in #7228 but reverted in #7254 as the associated sytest was not ready yet. Now that it is, we can merge this again.
2020-04-09Add matrix-synapse-shared-secret-auth as an example password provider (#7248)Andrew Morgan2-0/+2
2020-04-09Revert "Unblacklist /upgrade creates a new room (#7228)" (#7254)Andrew Morgan2-1/+2
This reverts commit 59f0ca8b87c15a314859d94978d90a8aa0e7543b.
2020-04-09Unblacklist /upgrade creates a new room (#7228)Andrew Morgan2-2/+1
2020-04-09Fix --help commandline argument (#7249)Richard van der Hoff2-16/+9
I don't really remember why this was so complicated; I think it dates back to the time when we had to instantiate the Config classes before we could call `add_arguments` - ie before #5597. In any case, I don't think there's a good reason for it any more, and the impact of it being complicated is that `--help` doesn't work correctly.
2020-04-09Make it clearer to the user that they haven't overridden onLogin/Register ↵Andrew Morgan3-3/+3
(#7237)
2020-04-09Upgrade jQuery to 3.x on fallback login/registration screens (#7236)Andrew Morgan9-16/+15
2020-04-08Fix bad merge of CHANGES.mdRichard van der Hoff1-5/+1
2020-04-08Remove redundant checks on `daemonize` from synctl (#7233)Richard van der Hoff2-9/+12
We pass --daemonize on the commandline, which (since at least #4853) overrides whatever the config file, so there is no need for it to be set in the config file.
2020-04-08Make systemd-with-workers doc official (#7234)Richard van der Hoff10-194/+134
Simplify and update this documentation, and make it part of the core dist.
2020-04-08Fix changelog for #7235Brendan Abolivier2-1/+1