summary refs log tree commit diff
path: root/CHANGES.md (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-09-29Wire up tokenErik Johnston4-45/+252
2020-09-29Reduce usages of RoomStreamToken constructorErik Johnston5-11/+9
2020-09-29Add metrics to track success/otherwise of replication requests (#8406)Richard van der Hoff2-12/+29
One hope is that this might provide some insights into #3365.
2020-09-29Fix handling of connection timeouts in outgoing http requests (#8400)Richard van der Hoff9-98/+311
* Remove `on_timeout_cancel` from `timeout_deferred` The `on_timeout_cancel` param to `timeout_deferred` wasn't always called on a timeout (in particular if the canceller raised an exception), so it was unreliable. It was also only used in one place, and to be honest it's easier to do what it does a different way. * Fix handling of connection timeouts in outgoing http requests Turns out that if we get a timeout during connection, then a different exception is raised, which wasn't always handled correctly. To fix it, catch the exception in SimpleHttpClient and turn it into a RequestTimedOutError (which is already a documented exception). Also add a description to RequestTimedOutError so that we can see which stage it failed at. * Fix incorrect handling of timeouts reading federation responses This was trapping the wrong sort of TimeoutError, so was never being hit. The effect was relatively minor, but we should fix this so that it does the expected thing. * Fix inconsistent handling of `timeout` param between methods `get_json`, `put_json` and `delete_json` were applying a different timeout to the response body to `post_json`; bring them in line and test. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Erik Johnston <erik@matrix.org>
2020-09-28Add checks for postgres sequence consistency (#8402)Erik Johnston8-6/+160
2020-09-28Create a mechanism for marking tests "logcontext clean" (#8399)Richard van der Hoff4-21/+41
2020-09-28Add `ui_auth_sessions_ips` table to `synapse_port_db` ignore list (#8410)Dagfinn Ilmari Mannsåker2-0/+2
This table was created in #8034 (1.20.0). It references `ui_auth_sessions`, which is ignored, so this one should be too. Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
2020-09-28A pair of tiny cleanups in the federation request code. (#8401)Richard van der Hoff3-3/+2
2020-09-28typoMatthew Hodgson1-1/+1
2020-09-25Escape the error description on the sso_error template. (#8405)Patrick Cloke2-1/+2
2020-09-25Fix occasional "Re-starting finished log context" from keyring (#8398)Richard van der Hoff3-90/+101
* Fix test_verify_json_objects_for_server_awaits_previous_requests It turns out that this wasn't really testing what it thought it was testing (in particular, `check_context` was turning failures into success, which was making the tests pass even though it wasn't clear they should have been. It was also somewhat overcomplex - we can test what it was trying to test without mocking out perspectives servers. * Fix warnings about finished logcontexts in the keyring We need to make sure that we finish the key fetching magic before we run the verifying code, to ensure that we don't mess up our logcontexts.
2020-09-25Allow existing users to login via OpenID Connect. (#8345)Tdxdxoz6-17/+76
Co-authored-by: Benjamin Koch <bbbsnowball@gmail.com> This adds configuration flags that will match a user to pre-existing users when logging in via OpenID Connect. This is useful when switching to an existing SSO system.
2020-09-25Fix schema delta for servers that have not backfilled (#8396)Erik Johnston3-2/+9
Fixes #8395.
2020-09-24Fix MultiWriteIdGenerator's handling of restarts. (#8374)Erik Johnston7-30/+274
On startup `MultiWriteIdGenerator` fetches the maximum stream ID for each instance from the table and uses that as its initial "current position" for each writer. This is problematic as a) it involves either a scan of events table or an index (neither of which is ideal), and b) if rows are being persisted out of order elsewhere while the process restarts then using the maximum stream ID is not correct. This could theoretically lead to race conditions where e.g. events that are persisted out of order are not sent down sync streams. We fix this by creating a new table that tracks the current positions of each writer to the stream, and update it each time we finish persisting a new entry. This is a relatively small overhead when persisting events. However for the cache invalidation stream this is a much bigger relative overhead, so instead we note that for invalidation we don't actually care about reliability over restarts (as there's no caches to invalidate) and simply don't bother reading and writing to the new table in that particular case.
2020-09-24s/URLs/variables in changelog v1.20.1 github/release-v1.20.1 release-v1.20.1Andrew Morgan1-1/+1
2020-09-24s/accidentally/incorrectly in changelogAndrew Morgan1-1/+1
2020-09-24Update changelog wordingAndrew Morgan1-1/+1
2020-09-241.20.1Andrew Morgan5-3/+17
2020-09-24Mark the shadow_banned column as boolean in synapse_port_db. (#8386)Patrick Cloke3-0/+2
2020-09-24Hotfix: disable autoescape by default when rendering Jinja2 templates (#8394)Andrew Morgan3-3/+12
#8037 changed the default `autoescape` option when rendering Jinja2 templates from `False` to `True`. This caused some bugs, noticeably around redirect URLs being escaped in SAML2 auth confirmation templates, causing those URLs to break for users. This change returns the previous behaviour as it stood. We may want to look at each template individually and see whether autoescaping is a good idea at some point, but for now lets just fix the breakage.
2020-09-24Add type annotations to SimpleHttpClient (#8372)Richard van der Hoff4-61/+143
2020-09-24Add new sequences to port DB script (#8387)Erik Johnston2-0/+25
2020-09-24Add EventStreamPosition type (#8388)Erik Johnston11-57/+100
The idea is to remove some of the places we pass around `int`, where it can represent one of two things: 1. the position of an event in the stream; or 2. a token that partitions the stream, used as part of the stream tokens. The valid operations are then: 1. did a position happen before or after a token; 2. get all events that happened before or after a token; and 3. get all events between two tokens. (Note that we don't want to allow other operations as we want to change the tokens to be vector clocks rather than simple ints)
2020-09-24Mark the shadow_banned column as boolean in synapse_port_db. (#8386)Patrick Cloke3-0/+2
2020-09-23Factor out `_send_dummy_event_for_room` (#8370)Richard van der Hoff2-48/+55
this makes it possible to use from the manhole, and seems cleaner anyway.
2020-09-23Improve logging of state resolution (#8371)Richard van der Hoff2-48/+17
I'd like to get a better insight into what we are doing with respect to state res. The list of state groups we are resolving across should be short (if it isn't, that's a massive problem in itself), so it should be fine to log it in ite entiretly. I've done some grepping and found approximately zero cases in which the "shortcut" code delivered the result, so I've ripped that out too.
2020-09-23Fix bug which caused failure on join with malformed membership events (#8385)Richard van der Hoff2-3/+8
2020-09-23Use `async with` for ID gens (#8383)Erik Johnston15-105/+144
This will allow us to hit the DB after we've finished using the generated stream ID.
2020-09-23Don't push if an user account has expired (#8353)Mathieu Velten4-5/+34
2020-09-23Do not check lint/test dependencies at runtime. (#8377)Patrick Cloke5-15/+25
moves non-runtime dependencies out of synapse.python_dependencies (test and lint)
2020-09-23Add note to reverse_proxy.md about disabling Apache's mod_security2 (#8375)Julian Fietkau2-0/+9