summary refs log tree commit diff
path: root/synapse/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'v1.33.0' into babolivier/dinsic_1.41.0Brendan Abolivier2021-08-3132-39/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.33.0 (2021-05-05) =========================== Features -------- - Build Debian packages for Ubuntu 21.04 (Hirsute Hippo). ([\#9909](https://github.com/matrix-org/synapse/issues/9909)) 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)) 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))
| * Remove various bits of compatibility code for Python <3.6 (#9879)Andrew Morgan2021-04-271-1/+1
| | | | | | 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+.
| * Limit length of accepted email addresses (#9855)Erik Johnston2021-04-221-0/+30
| |
| * Remove `synapse.types.Collection` (#9856)Richard van der Hoff2021-04-222-4/+2
| | | | | | This is no longer required, since we have dropped support for Python 3.5.
| * Merge branch 'master' into developAndrew Morgan2021-04-201-5/+9
| |\
| * | Sanity check identity server passed to bind/unbind. (#9802)Denis Kasak2021-04-191-0/+32
| | | | | | | | | | | | Signed-off-by: Denis Kasak <dkasak@termina.org.uk>
| * | Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-1432-33/+0
| | | | | | | | | | | | | | | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* | | Merge tag 'v1.32.0' into babolivier/dinsic_1.41.0Brendan Abolivier2021-08-314-44/+71
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.32.0 (2021-04-20) =========================== **Note:** This release requires Python 3.6+ and Postgres 9.6+ or SQLite 3.22+. This release removes the deprecated `GET /_synapse/admin/v1/users/<user_id>` admin API. Please use the [v2 API](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/user_admin_api.rst#query-user-account) instead, which has improved capabilities. This release requires Application Services to use type `m.login.application_service` when registering users via the `/_matrix/client/r0/register` endpoint to comply with the spec. Please ensure your Application Services are up to date. Bugfixes -------- - Fix the log lines of nested logging contexts. Broke in 1.32.0rc1. ([\#9829](https://github.com/matrix-org/synapse/issues/9829)) Synapse 1.32.0rc1 (2021-04-13) ============================== Features -------- - Add a Synapse module for routing presence updates between users. ([\#9491](https://github.com/matrix-org/synapse/issues/9491)) - Add an admin API to manage ratelimit for a specific user. ([\#9648](https://github.com/matrix-org/synapse/issues/9648)) - Include request information in structured logging output. ([\#9654](https://github.com/matrix-org/synapse/issues/9654)) - Add `order_by` to the admin API `GET /_synapse/admin/v2/users`. Contributed by @dklimpel. ([\#9691](https://github.com/matrix-org/synapse/issues/9691)) - Replace the `room_invite_state_types` configuration setting with `room_prejoin_state`. ([\#9700](https://github.com/matrix-org/synapse/issues/9700)) - Add experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083): restricting room access via group membership. ([\#9717](https://github.com/matrix-org/synapse/issues/9717), [\#9735](https://github.com/matrix-org/synapse/issues/9735)) - Update experimental support for Spaces: include `m.room.create` in the room state sent with room-invites. ([\#9710](https://github.com/matrix-org/synapse/issues/9710)) - Synapse now requires Python 3.6 or later. It also requires Postgres 9.6 or later or SQLite 3.22 or later. ([\#9766](https://github.com/matrix-org/synapse/issues/9766)) Bugfixes -------- - Prevent `synapse_forward_extremities` and `synapse_excess_extremity_events` Prometheus metrics from initially reporting zero-values after startup. ([\#8926](https://github.com/matrix-org/synapse/issues/8926)) - Fix recently added ratelimits to correctly honour the application service `rate_limited` flag. ([\#9711](https://github.com/matrix-org/synapse/issues/9711)) - Fix longstanding bug which caused `duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key"` errors. ([\#9725](https://github.com/matrix-org/synapse/issues/9725)) - Fix bug where sharded federation senders could get stuck repeatedly querying the DB in a loop, using lots of CPU. ([\#9770](https://github.com/matrix-org/synapse/issues/9770)) - Fix duplicate logging of exceptions thrown during federation transaction processing. ([\#9780](https://github.com/matrix-org/synapse/issues/9780)) Updates to the Docker image --------------------------- - Move opencontainers labels to the final Docker image such that users can inspect them. ([\#9765](https://github.com/matrix-org/synapse/issues/9765)) Improved Documentation ---------------------- - Make the `allowed_local_3pids` regex example in the sample config stricter. ([\#9719](https://github.com/matrix-org/synapse/issues/9719)) Deprecations and Removals ------------------------- - Remove old admin API `GET /_synapse/admin/v1/users/<user_id>`. ([\#9401](https://github.com/matrix-org/synapse/issues/9401)) - Make `/_matrix/client/r0/register` expect a type of `m.login.application_service` when an Application Service registers a user, to align with [the relevant spec](https://spec.matrix.org/unstable/application-service-api/#server-admin-style-permissions). ([\#9548](https://github.com/matrix-org/synapse/issues/9548)) Internal Changes ---------------- - Replace deprecated `imp` module with successor `importlib`. Contributed by Cristina Muñoz. ([\#9718](https://github.com/matrix-org/synapse/issues/9718)) - Experiment with GitHub Actions for CI. ([\#9661](https://github.com/matrix-org/synapse/issues/9661)) - Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9682](https://github.com/matrix-org/synapse/issues/9682)) - Update `scripts-dev/complement.sh` to use a local checkout of Complement, allow running a subset of tests and have it use Synapse's Complement test blacklist. ([\#9685](https://github.com/matrix-org/synapse/issues/9685)) - Improve Jaeger tracing for `to_device` messages. ([\#9686](https://github.com/matrix-org/synapse/issues/9686)) - Add release helper script for automating part of the Synapse release process. ([\#9713](https://github.com/matrix-org/synapse/issues/9713)) - Add type hints to expiring cache. ([\#9730](https://github.com/matrix-org/synapse/issues/9730)) - Convert various testcases to `HomeserverTestCase`. ([\#9736](https://github.com/matrix-org/synapse/issues/9736)) - Start linting mypy with `no_implicit_optional`. ([\#9742](https://github.com/matrix-org/synapse/issues/9742)) - Add missing type hints to federation handler and server. ([\#9743](https://github.com/matrix-org/synapse/issues/9743)) - Check that a `ConfigError` is raised, rather than simply `Exception`, when appropriate in homeserver config file generation tests. ([\#9753](https://github.com/matrix-org/synapse/issues/9753)) - Fix incompatibility with `tox` 2.5. ([\#9769](https://github.com/matrix-org/synapse/issues/9769)) - Enable Complement tests for [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946): Spaces Summary API. ([\#9771](https://github.com/matrix-org/synapse/issues/9771)) - Use mock from the standard library instead of a separate package. ([\#9772](https://github.com/matrix-org/synapse/issues/9772)) - Update Black configuration to target Python 3.6. ([\#9781](https://github.com/matrix-org/synapse/issues/9781)) - Add option to skip unit tests when building Debian packages. ([\#9793](https://github.com/matrix-org/synapse/issues/9793))
| * | Always use the name as the log ID. (#9829)Patrick Cloke2021-04-201-5/+9
| |/ | | | | | | | | As far as I can tell our logging contexts are meant to log the request ID, or sometimes the request ID followed by a suffix (this is generally stored in the name field of LoggingContext). There's also code to log the name@memory location, but I'm not sure this is ever used. This simplifies the code paths to require every logging context to have a name and use that in logging. For sub-contexts (created via nested_logging_contexts, defer_to_threadpool, Measure) we use the current context's str (which becomes their name or the string "sentinel") and then potentially modify that (e.g. add a suffix).
| * Bugbear: Add Mutable Parameter fixes (#9682)Jonathan de Jong2021-04-081-6/+8
| | | | | | | | | | | | | | Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
| * Add type hints to expiring cache. (#9730)Patrick Cloke2021-04-061-32/+51
| |
| * Update mypy configuration: `no_implicit_optional = True` (#9742)Jonathan de Jong2021-04-051-1/+3
| |
* | Merge commit '78e48f61b' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-233-46/+75
|\|
| * Add type hints to DictionaryCache and TTLCache. (#9442)Patrick Cloke2021-03-292-44/+73
| |
| * Make it possible to use dmypy (#9692)Erik Johnston2021-03-261-2/+2
| | | | | | | | | | | | | | | | | | Running `dmypy run` will do a `mypy` check while spinning up a daemon that makes rerunning `dmypy run` a lot faster. `dmypy` doesn't support `follow_imports = silent` and has `local_partial_types` enabled, so this PR enables those options and fixes the issues that were newly raised. Note that `local_partial_types` will be enabled by default in upcoming mypy releases.
* | Merge commit 'e5801db83' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-232-2/+2
|\|
| * Enable addtional flake8-bugbear linting checks. (#9659)Jonathan de Jong2021-03-242-2/+2
| |
* | Merge commit '4ecba9bd5' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-1/+1
|\|
| * Fixed code misc. quality issues (#9649)Ankit Dobhal2021-03-221-1/+1
| | | | | | | | | | - Merge 'isinstance' calls. - Remove unnecessary dict call outside of comprehension. - Use 'sys.exit()' calls.
* | Merge commit '22db45bd4' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-233-14/+111
|\|
| * Add logging to ObservableDeferred callbacks (#9523)Jonathan de Jong2021-03-091-8/+18
| |
| * Add ResponseCache tests. (#9458)Jonathan de Jong2021-03-081-6/+4
| |
| * Record the SSO Auth Provider in the login token (#9510)Richard van der Hoff2021-03-041-0/+89
| | | | | | This great big stack of commits is a a whole load of hoop-jumping to make it easier to store additional values in login tokens, and then to actually store the SSO Identity Provider in the login token. (Making use of that data will follow in a subsequent PR.)
* | Merge commit 'a5daae2a5' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-32/+2
|\|
| * Revert "Fix #8518 (sync requests being cached wrongly on timeout) (#9358)"Patrick Cloke2021-03-021-32/+2
| | | | | | | | | | | | | | This reverts commit f5c93fc9931e4029bbd8000f398b6f39d67a8c46. This is being backed out due to a regression (#9507) and additional review feedback being provided.
* | Merge commit 'e12077a78' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-2/+32
|\|
| * Fix #8518 (sync requests being cached wrongly on timeout) (#9358)Jonathan de Jong2021-02-241-2/+32
| | | | | | | | | | | | | | This fixes #8518 by adding a conditional check on `SyncResult` in a function when `prev_stream_token == current_stream_token`, as a sanity check. In `CachedResponse.set.<remove>()`, the result is immediately popped from the cache if the conditional function returns "false". This prevents the caching of a timed-out `SyncResult` (that has `next_key` as the stream key that produced that `SyncResult`). The cache is prevented from returning a `SyncResult` that makes the client request the same stream key over and over again, effectively making it stuck in a loop of requesting and getting a response immediately for as long as the cache keeps those values. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
* | Merge commit 'd2f0ec12d' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-2312-49/+175
|\|
| * Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-1611-48/+45
| | | | | | | | | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
| * Clean up caching/locking of OIDC metadata load (#9362)Richard van der Hoff2021-02-161-0/+129
| | | | | | | | Ensure that we lock correctly to prevent multiple concurrent metadata load requests, and generally clean up the way we construct the metadata cache.
| * Fix some typos.Patrick Cloke2021-02-121-1/+1
| |
| * Merge tag 'v1.27.0rc2' into developPatrick Cloke2021-02-111-3/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.27.0rc2 (2021-02-11) ============================== Features -------- - Further improvements to the user experience of registration via single sign-on. ([\#9297](https://github.com/matrix-org/synapse/issues/9297)) Bugfixes -------- - Fix ratelimiting introduced in v1.27.0rc1 for invites to respect the `ratelimit` flag on application services. ([\#9302](https://github.com/matrix-org/synapse/issues/9302)) - Do not automatically calculate `public_baseurl` since it can be wrong in some situations. Reverts behaviour introduced in v1.26.0. ([\#9313](https://github.com/matrix-org/synapse/issues/9313)) Improved Documentation ---------------------- - Clarify the sample configuration for changes made to the template loading code. ([\#9310](https://github.com/matrix-org/synapse/issues/9310))
* | \ Merge commit 'e40d88cff' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-3/+12
|\ \ \ | | |/ | |/|
| * | Backout changes for automatically calculating the public baseurl. (#9313)Patrick Cloke2021-02-111-3/+12
| | | | | | | | | | | | This breaks some people's configurations (if their Client-Server API is not accessed via port 443).
* | | Merge commit '3f58fc848' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-15/+18
|\ \ \ | | |/ | |/|
| * | Type hints and validation improvements. (#9321)Patrick Cloke2021-02-081-15/+18
| |/ | | | | | | | | * Adds type hints to the groups servlet and stringutils code. * Assert the maximum length of some input values for spec compliance.
* | Merge commit '18ab35284' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-0/+106
|\|
| * Merge branch 'social_login' into developRichard van der Hoff2021-02-011-0/+106
| |\
| | * Replace username picker with a template (#9275)Richard van der Hoff2021-02-011-0/+106
| | | | | | | | | | | | | | | There's some prelimiary work here to pull out the construction of a jinja environment to a separate function. I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
* | | Merge commit '2e537a028' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-1/+2
|\| |
| * | Pass a dict, instead of None, to modules if a None config is specified in ↵Andrew Morgan2021-01-271-1/+2
| |/ | | | | | | | | | | | | | | | | the homeserver config (#9229) If a Synapse module's config block were empty in YAML, thus being translated to a `Nonetype` in Python, then some modules could fail as that None ends up getting passed to their `parse_config` method. Modules are expected to accept a `dict` instead. This PR ensures that if the user does end up specifying an empty config block (such as what [the default oidc config in the sample config](https://github.com/matrix-org/synapse/blob/5310808d3bebd17275355ecd474bc013e8c7462d/docs/sample_config.yaml#L1816-L1845) states) then `None` is not passed to the module. An empty dict is passed instead. This code assumes that no existing modules are relying on receiving a `None` config block, but I'd really hope that they aren't.
* | Merge commit 'a01605c13' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-1/+1
|\|
| * Fix chain cover update to handle events with duplicate auth events (#9210)Erik Johnston2021-01-221-1/+1
| |
* | Merge commit '0cd2938bc' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-0/+92
|\|
| * Support icons for Identity Providers (#9154)Richard van der Hoff2021-01-201-0/+92
| |
* | Merge commit '3e4cdfe5d' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-0/+19
|\|
| * Remote dependency on distutils (#9125)Richard van der Hoff2021-01-151-0/+19
| | | | | | | | | | | | | | | | | | `distutils` is pretty much deprecated these days, and replaced with `setuptools`. It's also annoying because it's you can't `pip install` it, and it's hard to figure out which debian package we should depend on to make sure it's there. Since we only use it for a tiny function anyway, let's just vendor said function into our codebase.
* | Merge commit '20af31088' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-1/+1
|\|
| * Fix event chain bg update. (#9118)Erik Johnston2021-01-141-1/+1
| | | | | | | | We passed in a graph to `sorted_topologically` which didn't have an entry for each node (as we dropped nodes with no edges).
* | Merge commit '98a64b7f7' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-1/+52
|\|
| * Use a chain cover index to efficiently calculate auth chain difference (#8868)Erik Johnston2021-01-111-1/+52
| |
* | Merge commit 'a03d71dc9' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-1/+2
|\|
| * Fix "Starting metrics collection from sentinel context" errors (#9053)Erik Johnston2021-01-081-1/+2
| |
* | Merge commit '23d701864' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-1/+1
|\|
| * Empty iterables should count towards cache usage. (#9028)Patrick Cloke2021-01-061-1/+1
| |
* | Merge commit '0312266ee' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-1/+9
|\|
| * Add type hints to the logging context code. (#8939)Patrick Cloke2021-01-051-1/+9
| |
* | Merge commit 'f14428b25' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-162-8/+7
|\|
| * Allow spam-checker modules to be provide async methods. (#8890)David Teller2020-12-112-8/+7
| | | | | | | | Spam checker modules can now provide async methods. This is implemented in a backwards-compatible manner.
* | Merge commit 'cf7d3c90d' into dinsicAndrew Morgan2021-04-161-6/+58
|\|
| * Better formatting for config errors from modules (#8874)Richard van der Hoff2020-12-081-6/+58
| | | | | | | | | | | | | | | | | | | | The idea is that the parse_config method of extension modules can raise either a ConfigError or a JsonValidationError, and it will be magically turned into a legible error message. There's a few components to it: * Separating the "path" and the "message" parts of a ConfigError, so that we can fiddle with the path bit to turn it into an absolute path. * Generally improving the way ConfigErrors get printed. * Passing in the config path to load_module so that it can wrap any exceptions that get caught appropriately.
* | Change check_3pid_allowed to async (#76)Mathieu Velten2021-01-181-13/+10
| |
* | Merge commit 'f27a78969' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-47/+188
|\|
| * Implement and use an @lru_cache decorator (#8595)Richard van der Hoff2020-10-301-47/+188
| | | | | | We don't always need the full power of a DeferredCache.
* | Merge commit 'c97da1e45' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-313-26/+22
|\|
| * Merge pull request #8678 from matrix-org/rav/fix_frozen_eventsRichard van der Hoff2020-10-282-25/+21
| |\ | | | | | | Fix serialisation errors when using third-party event rules.
| | * Remove frozendict_json_encoder and support frozendicts everywhereRichard van der Hoff2020-10-282-25/+21
| | | | | | | | | | | | | | | | | | Not being able to serialise `frozendicts` is fragile, and it's annoying to have to think about which serialiser you want. There's no real downside to supporting frozendicts, so let's just have one json encoder.
| * | Tell Black to format code for Python 3.5 (#8664)Dan Callahan2020-10-271-1/+1
| |/ | | | | | | | | | | | | | | This allows trailing commas in multi-line arg lists. Minor, but we might as well keep our formatting current with regard to our minimum supported Python version. Signed-off-by: Dan Callahan <danc@element.io>
* | Merge commit 'ec0e9c469' into dinsicAndrew Morgan2020-12-312-8/+22
|\|
| * Optimise CacheDescriptor (#8594) github/release-v1.21.3 release-v1.21.3Richard van der Hoff2020-10-211-5/+7
| | | | | | don't bother constricting a CacheContext unless we need one.
| * fix failure caseRichard van der Hoff2020-10-211-1/+4
| |
| * optimise DeferredCache.setRichard van der Hoff2020-10-211-3/+12
| |
* | Merge commit '9146a8a69' into dinsicAndrew Morgan2020-12-312-34/+55
|\|
| * Push some deferred wrangling down into DeferredCacheRichard van der Hoff2020-10-212-34/+55
| |
* | Merge commit 'de5cafe98' into dinsicAndrew Morgan2020-12-312-11/+34
|\|
| * Fix 'LruCache' object has no attribute '_on_resize' (#8591)Richard van der Hoff2020-10-191-1/+9
| | | | | | We need to make sure we are readu for the `set_cache_factor` callback.
| * Add `DeferredCache.get_immediate` method (#8568)Richard van der Hoff2020-10-191-10/+25
| | | | | | | | | | | | | | | | | | | | | | * Add `DeferredCache.get_immediate` method A bunch of things that are currently calling `DeferredCache.get` are only really interested in the result if it's completed. We can optimise and simplify this case. * Remove unused 'default' parameter to DeferredCache.get() * another get_immediate instance
* | Merge commit '97647b33c' into dinsicAndrew Morgan2020-12-313-23/+85
|\|
| * Replace DeferredCache with LruCache where possible (#8563)Richard van der Hoff2020-10-191-0/+3
| | | | | | Most of these uses don't need a full-blown DeferredCache; LruCache is lighter and more appropriate.
| * review commentsRichard van der Hoff2020-10-161-3/+8
| |
| * Apply suggestions from code reviewRichard van der Hoff2020-10-161-1/+1
| | | | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
| * type annotations for LruCacheRichard van der Hoff2020-10-163-23/+77
| |
* | Merge commit '3ee17585c' into dinsicAndrew Morgan2020-12-314-54/+57
|\|
| * Make LruCache register its own metrics (#8561)Richard van der Hoff2020-10-164-54/+57
| | | | | | | | | | rather than have everything that instantiates an LruCache manage metrics separately, have LruCache do it itself.
* | Merge commit '74976a8e4' into dinsicAndrew Morgan2020-12-316-271/+332
|\|
| * Enable mypy for synapse.util.caches (#8547)Richard van der Hoff2020-10-151-1/+1
| | | | | | This seemed to entail dragging in a type stub for SortedList.
| * move DeferredCache into its own moduleRichard van der Hoff2020-10-142-282/+294
| |
| * Rename Cache->DeferredCacheRichard van der Hoff2020-10-141-7/+12
| |
| * Add some more type annotations to CacheRichard van der Hoff2020-10-142-23/+61
| |
| * Add type hints to response cache. (#8507)Patrick Cloke2020-10-091-22/+28
| |
| * Clarify error message when plugin config parsers raise an error (#8492)Richard van der Hoff2020-10-081-1/+1
| | | | | | | | | | | | | | | | | | This turns: Failed to parse config for 'myplugin': Exception('error message') into: Failed to parse config for 'myplugin': error message.
* | Merge commit 'cc40a59b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-10/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc40a59b4': 1.21.0 Add prometheus metrics to track federation delays (#8430) Make token serializing/deserializing async (#8427) Allow additional SSO properties to be passed to the client (#8413) changelog Add an improved "forward extremities" metric Rewrite BucketCollector Fix _exposition.py to stop stripping samples Drop support for ancient prometheus_client (#8426) Various clean ups to room stream tokens. (#8423) changelog Report state res metrics to Prometheus and log Move Measure calls into `resolve_events_with_store` Expose a `get_resource_usage` method in `Measure` Move `resolve_events_with_store` into StateResolutionHandler
| * Expose a `get_resource_usage` method in `Measure`Richard van der Hoff2020-09-291-10/+21
| |
* | Merge commit 'f43c66d23' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-29/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f43c66d23': Add support for running Complement against the local checkout (#8317) Filter out appservices from mau count (#8404) Only assert valid next_link params when provided (#8417) Add metrics to track success/otherwise of replication requests (#8406) Fix handling of connection timeouts in outgoing http requests (#8400) Changelog Don't check whether a 3pid is allowed to register during password reset Add checks for postgres sequence consistency (#8402) Create a mechanism for marking tests "logcontext clean" (#8399) Add `ui_auth_sessions_ips` table to `synapse_port_db` ignore list (#8410) A pair of tiny cleanups in the federation request code. (#8401) typo
| * Fix handling of connection timeouts in outgoing http requests (#8400)Richard van der Hoff2020-09-291-29/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge commit '4325be1a5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-212-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4325be1a5': Fix missing null character check on guest_access room state Fixed a bug with reactivating users with the admin API (#8362) Admin API for reported events (#8217) Fix wording of deprecation notice in changelog Deprecation warning for synapse admin api being accessible under /_matrix Create function to check for long names in devices (#8364) Add a comment re #1691 Fix a bad merge from release-v1.20.0. (#8354) Admin API for querying rooms where a user is a member (#8306) Catch-up after Federation Outage (bonus): Catch-up on Synapse Startup (#8322) Simplify super() calls to Python 3 syntax. (#8344) Allow appservice users to /login (#8320) Update test logging to be able to accept braces (#8335) Move lint dependencies to extras_require (#8330)
| * Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-182-2/+2
| | | | | | | | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* | Merge commit '837293c31' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-4/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '837293c31': Remove obsolete __future__ imports (#8337) Use admin_patterns for all admin APIs. (#8331) Fix a potential bug of UnboundLocalError (#8329) Switch metaclass initialization to python 3-compatible syntax (#8326) Catch-up after Federation Outage (split, 4): catch-up loop (#8272) Use slots in attrs classes where possible (#8296) Fix typos in comments. Add the topic and avatar to the room details admin API (#8305) Improve SAML error messages (#8248) Add experimental support for sharding event persister. Again. (#8294) Make `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281) Use TLSv1.2 for fake servers in tests (#8208) Add /_synapse/client to the reverse proxy docs (#8227) Clean up `Notifier.on_new_room_event` code path (#8288)
| * Remove obsolete __future__ imports (#8337)Jonathan de Jong2020-09-171-2/+0
| |
| * Use slots in attrs classes where possible (#8296)Patrick Cloke2020-09-142-2/+2
| | | | | | | | | | slots use less memory (and attribute access is faster) while slightly limiting the flexibility of the class attributes. This focuses on objects which are instantiated "often" and for short periods of time.
| * Merge tag 'v1.20.0rc3' into developPatrick Cloke2020-09-111-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.20.0rc3 (2020-09-11) ============================== Bugfixes -------- - Fix a bug introduced in v1.20.0rc1 where the wrong exception was raised when invalid JSON data is encountered. ([\#8291](https://github.com/matrix-org/synapse/issues/8291))
* | \ Merge commit '2832ef5bb' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * commit '2832ef5bb': 1.20.0rc3 Fix the exception that is raised when invalid JSON is encountered. (#8291) Remove shared rooms info from upgrade/workers doc as it's still experimental (#8290)
| * | Fix the exception that is raised when invalid JSON is encountered. (#8291)Patrick Cloke2020-09-101-1/+1
| | |
* | | Merge commit 'a3a90ee03' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-42/+8
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | * commit 'a3a90ee03': Show a confirmation page during user password reset (#8004) Do not error when thumbnailing invalid files (#8236) Remove some unused distributor signals (#8216) Fixup pusher pool notifications (#8287) Revert "Fixup pusher pool notifications" Fixup pusher pool notifications
| * | Remove some unused distributor signals (#8216)Patrick Cloke2020-09-091-42/+8
| | | | | | | | | | | | | | | Removes the `user_joined_room` and stops calling it since there are no observers. Also cleans-up some other unused signals and related code.
* | | Merge commit 'e45b83411' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-50/+85
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e45b83411': Add types to async_helpers (#8260) Fix mypy error on develop (#8282) Include method in thumbnail media name (#7124) Add types to StreamToken and RoomStreamToken (#8279) Add a config option for validating 'next_link' parameters against a domain whitelist (#8275) Clean up types for PaginationConfig (#8250) Use the right constructor for log records (#8278) Fix `MultiWriterIdGenerator.current_position`. (#8257)
| * | Add types to async_helpers (#8260)Patrick Cloke2020-09-081-50/+85
| | |
* | | Merge commit 'cca03dbec' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cca03dbec': fix typo s/fixes/fix/ Directly import json from the standard library. (#8259) Allow for make_awaitable's return value to be re-used. (#8261) Rename 'populate_stats_process_rooms_2' background job back to 'populate_stats_process_rooms' again (#8243)
| * | Directly import json from the standard library. (#8259)Patrick Cloke2020-09-082-3/+4
| |/ | | | | | | | | By importing from canonicaljson the simplejson module was still being used in some situations. After this change the std lib json is consistenty used throughout Synapse.
* | Merge commit '17fa4c7ca' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-2017-31/+31
|\| | | | | | | | | | | | | | | * commit '17fa4c7ca': Catch up after Federation Outage (split, 2): Track last successful stream ordering after transmission (#8247) Catch-up after Federation Outage (split, 1) (#8230) Fix type signature in simple_select_one_onecol and friends (#8241) Stop sub-classing object (#8249)
| * Stop sub-classing object (#8249)Patrick Cloke2020-09-0417-31/+31
| |
* | Merge commit '208e1d3eb' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-14/+28
|\| | | | | | | | | | | | | | | | | | | * commit '208e1d3eb': Fix typing for `@cached` wrapped functions (#8240) Remove useless changelog about reverting a #8239. Revert pinning of setuptools (#8239) Fix typing for SyncHandler (#8237) wrap `_get_e2e_device_keys_and_signatures_txn` in a non-txn method (#8231) Add an overload for simple_select_one_onecol_txn. (#8235)
| * Fix typing for `@cached` wrapped functions (#8240)Erik Johnston2020-09-031-14/+28
| | | | | | This requires adding a mypy plugin to fiddle with the type signatures a bit.
* | Merge commit 'd2ac767de' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-8/+8
|\| | | | | | | | | | | | | * commit 'd2ac767de': Convert ReadWriteLock to async/await. (#8202) Fix incorrect return signature Fix `wait_for_stream_position` for multiple waiters. (#8196)
| * Convert ReadWriteLock to async/await. (#8202)Patrick Cloke2020-08-281-8/+8
| |
* | Merge commit 'c9c544cda' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-48/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c9c544cda': Remove `ChainedIdGenerator`. (#8123) Switch the JSON byte producer from a pull to a push producer. (#8116) Updated docs: Added note about missing 308 redirect support. (#8120) Be stricter about JSON that is accepted by Synapse (#8106) Convert runWithConnection to async. (#8121) Remove the unused inlineCallbacks code-paths in the caching code (#8119) Separate `get_current_token` into two. (#8113) Convert events worker database to async/await. (#8071) Add a link to the matrix-synapse-rest-password-provider. (#8111)
| * Be stricter about JSON that is accepted by Synapse (#8106)Patrick Cloke2020-08-191-2/+12
| |
| * Remove the unused inlineCallbacks code-paths in the caching code (#8119)Patrick Cloke2020-08-191-46/+8
| |
* | Merge commit '3c01724b3' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-3/+1
|\| | | | | | | | | | | | | | | | | * commit '3c01724b3': Fix the return type of send_nonmember_events. (#8112) Remove : from allowed client_secret chars (#8101) Rename changelog from bugfix to misc. Iteratively encode JSON responses to avoid blocking the reactor. (#8013) Return the previous stream token if a non-member event is a duplicate. (#8093)
| * Remove : from allowed client_secret chars (#8101)Andrew Morgan2020-08-181-3/+1
| | | | | | | | | | | | | | Closes: https://github.com/matrix-org/synapse/issues/6766 Equivalent Sydent PR: https://github.com/matrix-org/sydent/pull/309 I believe it's now time to remove the extra allowed `:` from `client_secret` parameters.
* | Merge commit '9d1e4942a' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-3/+6
|\| | | | | | | | | | | | | | | | | * commit '9d1e4942a': Fix typing for notifier (#8064) Add comment explaining cast Handle optional dependencies for Oidc and Saml Newsfile Change HomeServer definition to work with typing.
| * Fix typing for notifier (#8064)Erik Johnston2020-08-121-3/+6
| |
* | Merge commit '4e874ed59' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+1
|\| | | | | | | | | * commit '4e874ed59': Remove unnecessary maybeDeferred calls (#8044)
| * Remove unnecessary maybeDeferred calls (#8044)Patrick Cloke2020-08-071-1/+1
| |
* | Merge commit '4dd27e6d1' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-2/+9
|\| | | | | | | | | * commit '4dd27e6d1': Reduce unnecessary whitespace in JSON. (#7372)
| * Reduce unnecessary whitespace in JSON. (#7372)David Vo2020-08-072-2/+9
| |
* | Merge commit 'fe6cfc80e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-28/+27
|\| | | | | | | | | * commit 'fe6cfc80e': Convert some util functions to async (#8035)
| * Convert some util functions to async (#8035)Patrick Cloke2020-08-062-28/+27
| |
* | Merge commit '0a86850ba' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-2/+8
|\| | | | | | | | | * commit '0a86850ba': Stop the parent process flushing the logs on exit (#8012)
| * Stop the parent process flushing the logs on exit (#8012)Richard van der Hoff2020-08-051-2/+8
| | | | | | This solves the problem that the first few lines are logged twice on matrix.org. Hopefully the comments explain it.
* | Merge commit '916cf2d43' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-0/+131
|\| | | | | | | | | * commit '916cf2d43': re-implement daemonize (#8011)
| * re-implement daemonize (#8011)Richard van der Hoff2020-08-041-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | This has long been something I've wanted to do. Basically the `Daemonize` code is both too flexible and not flexible enough, in that it offers a bunch of features that we don't use (changing UID, closing FDs in the child, logging to syslog) and doesn't offer a bunch that we could do with (redirecting stdout/err to a file instead of /dev/null; having the parent not exit until the child is running). As a first step, I've lifted the Daemonize code and removed the bits we don't use. This should be a non-functional change. Fixing everything else will come later.
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-032-3/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'de119063f': (31 commits) Convert room list handler to async/await. (#7912) Element CSS and logo in email templates (#7919) Lint the contrib/ directory in CI and linting scripts, add synctl to linting script (#7914) Remove unused code from synapse.logging.utils. (#7897) Fix a typo in the sample config. (#7890) Fix deprecation warning: import ABC from collections.abc (#7892) Change sample config's postgres user to synapse_user (#7889) Fix deprecation warning due to invalid escape sequences (#7895) Remove Ubuntu Eoan that is now EOL (#7888) Fix the trace function for async functions. (#7872) Add help for creating a user via docker (#7885) Switch to Debian:Slim from Alpine for the docker image (#7839) Stop using 'device_max_stream_id' (#7882) Fix TypeError in synapse.notifier (#7880) Add a default limit (of 100) to get/sync operations. (#7858) Change "unknown room ver" logging to warning. (#7881) Convert device handler to async/await (#7871) Convert synapse.app to async/await. (#7868) Convert _base, profile, and _receipts handlers to async/await (#7860) Add admin endpoint to get members in a room. (#7842) ...
| * Fix deprecation warning: import ABC from collections.abc (#7892)Karthikeyan Singaravelan2020-07-201-1/+1
| |
| * Convert device handler to async/await (#7871)Patrick Cloke2020-07-171-2/+26
| |
* | Merge commit '43726783e' into dinsicAndrew Morgan2020-08-036-7/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '43726783e': (22 commits) 1.17.0rc1 Fix some spelling mistakes / typos. (#7811) `update_membership` declaration: now always returns an event id. (#7809) Improve stacktraces from exceptions in background processes (#7808) Fix `can only concatenate list (not "tuple") to list` exception (#7810) Pass original request headers from workers to the main process. (#7797) Generate real events when we reject invites (#7804) Add `HomeServer.signing_key` property (#7805) Revert "Update the installation docs on apt-transport-https (#7801)" Do not use simplejson in Synapse. (#7800) Stop passing bytes when dumping JSON (#7799) Update the installation docs on apt-transport-https (#7801) shuffle changelog slightly Change Caddy links (old is deprecated) (#7789) Stop populating unused table `local_invites`. (#7793) Refactor getting replication updates from database v2. (#7740) Add libwebp dependency to Dockerfile (#7791) Add documentation for JWT login type and improve sample config. (#7776) Convert the appservice handler to async/await. (#7775) Don't ignore `set_tweak` actions with no explicit `value`. (#7766) ...
| * Fix some spelling mistakes / typos. (#7811)Patrick Cloke2020-07-096-7/+7
| |
* | Merge commit '5cdca53aa' into dinsicAndrew Morgan2020-08-031-0/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5cdca53aa': Merge different Resource implementation classes (#7732) Fix inconsistent handling of upper and lower cases of email addresses. (#7021) Allow YAML config file to contain None (#7779) Fix a typo. Move 1.15.2 after 1.16.0rc2. 1.16.0rc2 Remove an extraneous space. Add links to the fixes. Fix tense in the release notes. Hack to add push priority to push notifications (#7765) Add early returns to `_check_for_soft_fail` (#7769) Use symbolic names for replication stream names (#7768) Type checking for `FederationHandler` (#7770) Fix new metric where we used ms instead of seconds (#7771) Fix incorrect error message when database CTYPE was set incorrectly. (#7760) Pin link in CHANGES.md Fixes to CHANGES.md
| * Fix inconsistent handling of upper and lower cases of email addresses. (#7021)Dirk Klimpel2020-07-031-0/+23
| | | | | | fixes #7016
* | Merge commit '231252516' into dinsicAndrew Morgan2020-08-031-1/+1
|\| | | | | | | | | * commit '231252516': Fix "argument of type 'ObservableDeferred' is not iterable" error (#7708)
| * Fix "argument of type 'ObservableDeferred' is not iterable" error (#7708)Patrick Cloke2020-06-161-1/+1
| |
* | Merge commit 'a3f11567d' into dinsicAndrew Morgan2020-08-035-12/+4
|\| | | | | | | | | * commit 'a3f11567d': Replace all remaining six usage with native Python 3 equivalents (#7704)
| * Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-165-12/+4
| |
* | Merge commit '03619324f' into dinsicAndrew Morgan2020-08-033-10/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '03619324f': Create a ListenerConfig object (#7681) Fix changelog wording 1.15.1 Wrap register_device coroutine in an ensureDeferred (#7684) Ensure the body is a string before comparing push rules. (#7701) Ensure etag is a string for GET room_keys/version response (#7691) Update m.id.phone to use 'phone' instead of 'number' (#7687) Fix "There was no active span when trying to log." error (#7698) Enable 3PID add/bind/unbind endpoints on r0 routes Discard RDATA from already seen positions. (#7648) Replace iteritems/itervalues/iterkeys with native versions. (#7692) Fix warnings about losing log context during UI auth. (#7688) Fix a typo when comparing the URI & method during UI Auth. (#7689) Remove "user_id" from GET /presence. (#7606) Increase the default SAML session expirary time to 15 minutes. (#7664) fix typo in sample_config.yaml (#7652) Take out a lock before modifying _CACHES (#7663) Add option to enable encryption by default for new rooms (#7639) Clean-up the fallback login code. (#7657)
| * Replace iteritems/itervalues/iterkeys with native versions. (#7692)Patrick Cloke2020-06-153-10/+4
| |
* | Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-242-1/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.15.x * 'release-v1.15.0' of github.com:matrix-org/synapse: (55 commits) 1.15.0 Fix some attributions Update CHANGES.md 1.15.0rc1 Revert "1.15.0rc1" 1.15.0rc1 Fix bug in account data replication stream. (#7656) Convert the registration handler to async/await. (#7649) Accept device information at the login fallback endpoint. (#7629) Convert user directory handler and related classes to async/await. (#7640) Add an option to disable autojoin for guest accounts (#6637) Clarifications to the admin api documentation (#7647) Update to the stable SSO prefix for UI Auth. (#7630) Fix type information on `assert_*_is_admin` methods (#7645) Remove some unused constants. (#7644) Typo fixes. Allow new users to be registered via the admin API even if the monthly active user limit has been reached (#7263) Add device management to admin API (#7481) Attempt to fix PhoneHomeStatsTestCase.test_performance_100 being flaky. (#7634) Support CS API v0.6.0 (#6585) ...
| * Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both: * Rather undocumented, and * causing a *lot* of config checks This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation. Best to be reviewed commit-by-commit.
| * Speed up processing of federation stream RDATA rows.Erik Johnston2020-05-271-0/+12
| | | | | | | | | | | | Instead of storing and sending an ACK for every single row we send synchronously, we instead do it asynchronously while batching up updates.
* | Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-1010-175/+225
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.14.0' of github.com:matrix-org/synapse: (108 commits) Fix typo in PR link Update debian changelog 1.14.0 Improve changelog wording 1.14.0rc2 Fix sample config docs error (#7581) Fix up comments Fix specifying cache factors via env vars with * in name. (#7580) Don't apply cache factor to event cache. (#7578) Ensure ReplicationStreamer is always started when replication enabled. (#7579) Remove the changes to the debian changelog Not full release yet, this is rc1 Merge event persistence move changelog entries More changelog fix Changelog fixes 1.14.0 Replace device_27_unique_idx bg update with a fg one (#7562) Fix incorrect exception handling in KeyUploadServlet.on_POST (#7563) Fix recording of federation stream token (#7564) Simplify reap_monthly_active_users (#7558) ...
| * Don't apply cache factor to event cache. (#7578)Erik Johnston2020-05-271-0/+4
| | | | | | | | This is already correctly done when we instansiate the cache, but wasn't when it got reloaded (which always happens at least once on startup).
| * Fix stacktrace mangling in `patch_inline_callbacks` (#7554)Richard van der Hoff2020-05-221-2/+7
| | | | | | `Failure()` is more cunning than `Failure(e)`.
| * remove miscellaneous PY2 codeRichard van der Hoff2020-05-152-27/+8
| |
| * remove to_asciiRichard van der Hoff2020-05-151-19/+1
| | | | | | | | this is a no-op on python 3.
| * Remove `exception_to_unicode`Richard van der Hoff2020-05-151-36/+0
| | | | | | | | this is a no-op on python 3.
| * Strictly enforce canonicaljson requirements in a new room version (#7381)Patrick Cloke2020-05-141-1/+1
| |
| * Allow configuration of Synapse's cache without using synctl or environment ↵Amber Brown2020-05-117-92/+206
| | | | | | | | variables (#6391)
* | Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-104-64/+122
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.13.0' of github.com:matrix-org/synapse: (257 commits) Update changelog based on feedback. Move warnings in the changelog and re-iterate changes to branches. 1.13.0 update dh-virtualenv (#7526) 1.13.0rc3 Hash passwords earlier in the registration process (#7523) 1.13.0rc2 1.13.0rc2 Stop `get_joined_users` corruption from custom statuses (#7376) Do not validate that the client dict is stable during UI Auth. (#7483) Fix new flake8 errors (#7489) Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes ...
| * Speed up fetching device lists changes in sync.Erik Johnston2020-05-051-4/+15
| | | | | | | | | | Currently we copy `users_who_share_room` needlessly about three times, which is expensive when the set is large (which it can easily be).
| * Extend StreamChangeCache to support multiple entities per stream ID (#7303)Richard van der Hoff2020-04-221-46/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * On catchup, process each row with its own stream id (#7286)Richard van der Hoff2020-04-201-0/+3
| | | | | | | | | | | | 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.
| * Rewrite prune_old_outbound_device_pokes for efficiency (#7159)Richard van der Hoff2020-03-301-1/+20
| | | | | | | | make sure we clear out all but one update for the user
| * Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-242-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Andrew Morgan2020-03-241-1/+1
|\| | | | | | | | | | | | | * commit '509e381af': Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) changelog Increase MAX_EVENTS_BEHIND for replication clients
| * Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-1/+1
| | | | | | | | Ensure good comprehension hygiene using flake8-comprehensions.
* | Reduce amount of logging at INFO level. (#6862)Andrew Morgan2020-03-231-1/+1
|\| | | | | | | | | * commit 'ed630ea17': Reduce amount of logging at INFO level. (#6862)
| * Reduce amount of logging at INFO level. (#6862)Erik Johnston2020-02-061-1/+1
| | | | | | | | | | | | | | | | A lot of the things we log at INFO are now a bit superfluous, so lets make them DEBUG logs to reduce the amount we log by default. Co-Authored-By: Brendan Abolivier <babolivier@matrix.org> Co-authored-by: Brendan Abolivier <github@brendanabolivier.com>
* | Fix stacktraces when using ObservableDeferred and async/await (#6836)Andrew Morgan2020-03-231-0/+4
|\| | | | | | | | | * commit 'ae5b3104f': Fix stacktraces when using ObservableDeferred and async/await (#6836)
| * Fix stacktraces when using ObservableDeferred and async/await (#6836)Erik Johnston2020-02-031-0/+4
| |
* | Validate client_secret parameter (#6767)Andrew Morgan2020-03-231-2/+5
|\| | | | | | | | | * commit '9f7aaf90b': Validate client_secret parameter (#6767)
| * Validate client_secret parameter (#6767)Andrew Morgan2020-01-241-0/+17
| |
* | Merge pull request #6724 from matrix-org/rav/log_saml_attributesAndrew Morgan2020-03-232-17/+48
|\| | | | | | | | | | | | | * commit '59dc87c61': changelog Log saml assertions rather than the whole response move batch_iter to a separate module
| * Log saml assertions rather than the whole responseRichard van der Hoff2020-01-161-0/+13
| | | | | | | | | | | | ... since the whole response is huge. We even need to break up the assertions, since kibana otherwise truncates them.
| * move batch_iter to a separate moduleRichard van der Hoff2020-01-162-17/+35
| |
* | Merge pull request #6688 from matrix-org/rav/module_api_extensionsAndrew Morgan2020-03-231-1/+1
|\| | | | | | | | | | | | | * commit '608bf7d74': changelog Handle `config` not being set for synapse plugin modules Cleanups and additions to the module API
| * Handle `config` not being set for synapse plugin modulesRichard van der Hoff2020-01-121-1/+1
| | | | | | | | | | Some modules don't need any config, so having to define a `config` property just to keep the loader happy is a bit annoying.
* | Persist auth/state events at backwards extremities when we fetch them (#6526)Andrew Morgan2020-03-191-2/+2
|\| | | | | | | | | * commit 'bc7de8765': Persist auth/state events at backwards extremities when we fetch them (#6526)
| * Persist auth/state events at backwards extremities when we fetch them (#6526)Richard van der Hoff2019-12-161-2/+2
| | | | | | The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
* | look up cross-signing keys from the DB in bulk (#6486)Andrew Morgan2020-03-191-1/+1
|\| | | | | | | | | * commit 'cb2db1799': look up cross-signing keys from the DB in bulk (#6486)
| * look up cross-signing keys from the DB in bulk (#6486)Hubert Chathi2019-12-121-1/+1
| |
* | Merge pull request #6506 from matrix-org/erikj/remove_snapshot_cacheAndrew Morgan2020-03-191-94/+0
|\| | | | | | | | | | | * commit 'e3f528c54': Newsfile Remove SnapshotCache in favour of ResponseCache
| * Remove SnapshotCache in favour of ResponseCacheErik Johnston2019-12-091-94/+0
| |
* | Fix inaccurate per-block metrics (#6491)Andrew Morgan2020-03-191-42/+18
|\| | | | | | | | | * commit '18660a34d': Fix inaccurate per-block metrics (#6491)
| * Fix inaccurate per-block metrics (#6491)Richard van der Hoff2019-12-091-42/+18
| | | | | | | | | | `Measure` incorrectly assumed that it was the only thing being done by the parent `LoggingContext`. For instance, during a "renew group attestations" operation, hundreds of `outbound_request` calls could take place in parallel, all using the same `LoggingContext`. This would mean that any resources used during *any* of those calls would be reported against *all* of them, producing wildly inaccurate results. Instead, we now give each `Measure` block its own `LoggingContext` (using the parent `LoggingContext` mechanism to ensure that the log lines look correct and that the metrics are ultimately propogated to the top level for reporting against requests/backgrond tasks).
* | Merge pull request #6484 from matrix-org/erikj/port_sync_handlerAndrew Morgan2020-03-191-6/+17
|\| | | | | | | | | | | | | * commit 'a9b393340': Fixup functions to consistently return deferreds Newsfile Port SyncHandler to async/await
| * Port SyncHandler to async/awaitErik Johnston2019-12-051-6/+17
| |
* | Replace instance variations of homeserver with correct case/spacing (#6357)Andrew Morgan2020-03-181-1/+1
|\| | | | | | | | | | | | | | | * commit '6e1b40dc2': sample config Add changelog A couple more instances Replace instance variations of homeserver with correct case/spacing
| * Replace instance variations of homeserver with correct case/spacingAndrew Morgan2019-11-121-1/+1
| |
* | Fix LruCache callback deduplication (#6213)Andrew Morgan2020-03-181-11/+37
|\| | | | | | | | | * commit 'affcc2cc3': Fix LruCache callback deduplication (#6213)
| * Fix LruCache callback deduplication (#6213)V024602019-11-071-11/+37
| |
* | Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2020-03-164-6/+6
|\|
| * Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-314-6/+6
| | | | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* | Merge pull request #6291 from matrix-org/erikj/fix_cache_descriptorAndrew Morgan2020-03-161-4/+5
|\|
| * Clarify docstringErik Johnston2019-10-301-0/+4
| |
| * Make ObservableDeferred.observe() always return deferred.Erik Johnston2019-10-301-5/+2
| | | | | | | | | | | | | | This makes it easier to use in an async/await world. Also fixes a bug where cache descriptors would occaisonally return a raw value rather than a deferred.
* | Handle FileNotFound error in checking git repository version (#6284)Andrew Morgan2020-03-161-4/+6
|\| | | | | | | | | * commit 'b39ca49db': Handle FileNotFound error in checking git repository version (#6284)
| * Handle FileNotFound error in checking git repository version (#6284)Andrew Morgan2019-10-301-4/+6
| |
* | Merge pull request #6279 from matrix-org/erikj/federation_server_async_awaitAndrew Morgan2020-03-161-4/+3
|\| | | | | | | | | | | | | | | * commit 'b4465564c': Don't return coroutines Make concurrently_execute work with async/await Newsfile Port federation_server to async/await
| * Make concurrently_execute work with async/awaitErik Johnston2019-10-291-4/+3
| |
* | Merge pull request #6263 from matrix-org/erikj/caches_return_deferredsAndrew Morgan2020-03-161-5/+4
|\| | | | | | | | | | | | | * commit '561133c3c': Update docstring Newsfile Quick fix to ensure cache descriptors always return deferreds
| * Update docstringErik Johnston2019-10-291-3/+2
| |
| * Quick fix to ensure cache descriptors always return deferredsErik Johnston2019-10-281-2/+2
| |
* | Merge branch 'master' into developAndrew Morgan2020-02-261-0/+29
|\|
| * Add maybe_awaitable and fix __init__ bugsErik Johnston2019-10-111-0/+29
| |
* | Merge pull request #6127 from matrix-org/erikj/patch_innerAndrew Morgan2020-02-261-0/+219
|\|
| * Fixup commentsErik Johnston2019-10-101-3/+3
| | | | | | Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
| * Fix py3.5Erik Johnston2019-10-101-1/+1
| |
| * Fix py3.5Erik Johnston2019-10-101-1/+1
| |
| * sortErik Johnston2019-10-101-3/+1
| |
| * Appease mypyErik Johnston2019-10-101-13/+18
| |
| * Add comentsErik Johnston2019-10-101-5/+25
| |
| * Log correct contextErik Johnston2019-10-101-6/+6
| |
| * Test for sentinel commitErik Johnston2019-10-101-2/+19
| |
| * Move patch_inline_callbacks into synapse/Erik Johnston2019-10-101-0/+179
| |
* | add some metrics on the federation sender (#6160)Andrew Morgan2020-02-261-2/+4
|\|
| * add some metrics on the federation sender (#6160)Richard van der Hoff2019-10-031-2/+4
| |
* | Fix up some typechecking (#6150)Andrew Morgan2020-02-265-8/+33
|\|
| * Fix up some typechecking (#6150)Amber Brown2019-10-025-8/+33
| | | | | | | | | | | | * type checking fixes * changelog
* | Merge pull request #6146 from matrix-org/erikj/fix_destination_retry_timingsAndrew Morgan2020-02-261-1/+1
|\|
| * Fix errors storing large retry intervals.Erik Johnston2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | We have set the max retry interval to a value larger than a postgres or sqlite int can hold, which caused exceptions when updating the destinations table. To fix postgres we need to change the column to a bigint, and for sqlite we lower the max interval to 2**62 (which is still incredibly long).
* | Merge pull request #6069 from matrix-org/rav/fix_attribute_mappingAndrew Morgan2020-02-251-1/+19
|\|
| * Merge branch 'develop' into rav/fix_attribute_mappingRichard van der Hoff2019-09-193-21/+68
| |\
| * | Fix a bug with saml attribute maps.Richard van der Hoff2019-09-191-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug where the default attribute maps were prioritised over user-specified ones, resulting in incorrect mappings. The problem is that if you call SPConfig.load() multiple times, it adds new attribute mappers to a list. So by calling it with the default config first, and then the user-specified config, we would always get the default mappers before the user-specified mappers. To solve this, let's merge the config dicts first, and then pass them to SPConfig.
* | | Add 'failure_ts' column to 'destinations' table (#6016)Andrew Morgan2020-02-251-1/+15
|\ \ \ | | |/ | |/|
| * | Add 'failure_ts' column to 'destinations' table (#6016)Richard van der Hoff2019-09-171-1/+15
| | | | | | | | | | | | Track the time that a server started failing at, for general analysis purposes.
* | | Remove the cap on federation retry interval. (#6026)Andrew Morgan2020-02-251-2/+2
|\| |
| * | Remove the cap on federation retry interval. (#6026)Richard van der Hoff2019-09-121-2/+2
| | | | | | | | | | | | | | | | | | Essentially the intention here is to end up blacklisting servers which never respond to federation requests. Fixes https://github.com/matrix-org/synapse/issues/5113.
* | | Fix bug in calculating the federation retry backoff period (#6025)Andrew Morgan2020-02-251-2/+3
|\| |
| * | Fix bug in calculating the federation retry backoff period (#6025)Richard van der Hoff2019-09-121-2/+3
| | | | | | | | | | | | This was intended to introduce an element of jitter; instead it gave you a 30/60 chance of resetting to zero.
* | | Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) (#5976)Andrew Morgan2020-02-251-0/+33
|\| |
| * | Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) (#5976)Andrew Morgan2019-09-111-0/+33
| | | | | | | | | | | | | | | | | | | | | This is a redo of https://github.com/matrix-org/synapse/pull/5897 but with `id_access_token` accepted. Implements [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134) plus Identity Service v2 authentication ala [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140). Identity lookup-related functions were also moved from `RoomMemberHandler` to `IdentityHandler`.
* | | Clean up some code in the retry logic (#6017)Andrew Morgan2020-02-251-16/+13
|\| |
| * | Clean up some code in the retry logic (#6017)Richard van der Hoff2019-09-111-16/+13
| | | | | | | | | | | | * remove some unused code * make things which were constants into constants for efficiency and clarity
| * | Revert "Use the v2 lookup API for 3PID invites (#5897)" (#5937)Andrew Morgan2019-08-301-33/+0
| | | | | | | | | | | | | | | This reverts commit 71fc04069a5770a204c3514e0237d7374df257a8. This broke 3PID invites as #5892 was required for it to work correctly.
* | | Revert "Use the v2 lookup API for 3PID invites (#5897)"Andrew Morgan2020-02-241-33/+0
| | | | | | | | | | | | | | | This reverts commit 978f263e7c5d1eb440efaf07abc5009408ade25d, reversing changes made to 4f6ee99818d9c338944a10585d0aea4c7349d456.
* | | Use the v2 lookup API for 3PID invites (#5897)Andrew Morgan2020-02-241-0/+33
|\| |
| * | Use the v2 lookup API for 3PID invites (#5897)Andrew Morgan2019-08-281-0/+33
| | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/5861 Adds support for the v2 lookup API as defined in [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134). Currently this is only used for 3PID invites. Sytest PR: https://github.com/matrix-org/sytest/pull/679
* | | Merge pull request #5844 from matrix-org/erikj/retry_well_known_lookupAndrew Morgan2020-02-201-3/+5
|\| |
| * | Retry well-known lookup before expiry.Erik Johnston2019-08-131-3/+5
| |/ | | | | | | | | | | | | | | | | This gives a bit of a grace period where we can attempt to refetch a remote `well-known`, while still using the cached result if that fails. Hopefully this will make the well-known resolution a bit more torelant of failures, rather than it immediately treating failures as "no result" and caching that for an hour.
| * Add kwargs and docBrendan Abolivier2019-07-291-2/+4
| |
| * Add ability to pass arguments to looping callsBrendan Abolivier2019-07-291-2/+2
| |
* | Fix some error cases in the caching layer. (#5749)Andrew Morgan2020-02-191-32/+42
|\|
| * Fix some error cases in the caching layer. (#5749)Richard van der Hoff2019-07-251-32/+42
| | | | | | | | | | | | | | There was some inconsistent behaviour in the caching layer around how exceptions were handled - particularly synchronously-thrown ones. This seems to be most easily handled by pushing the creation of ObservableDeferreds down from CacheDescriptor to the Cache.
* | Add a prometheus metric for active cache lookups. (#5750)Andrew Morgan2020-02-192-2/+33
|\|
| * Add a prometheus metric for active cache lookups. (#5750)Richard van der Hoff2019-07-242-2/+33
| | | | | | | | | | | | * Add a prometheus metric for active cache lookups. * changelog
* | Replace returnValue with return (#5736)Andrew Morgan2020-02-196-15/+13
|\|
| * Replace returnValue with return (#5736)Amber Brown2019-07-236-15/+13
| |
* | Cache get_version_string.Andrew Morgan2020-02-191-2/+21
|\|
| * Cache get_version_string.Erik Johnston2019-07-221-2/+21
| | | | | | | | | | | | | | | | | | The version of a module isn't going to change over the lifetime of the process (assuming no funky hot reloading is going on, which it isn't), so let's just cache the result to avoid spawning lots of git subprocesses. Fixes #5672.
* | Fixes to the federation rate limiter (#5621)Andrew Morgan2020-02-171-8/+8
|\|
| * Fixes to the federation rate limiter (#5621)Richard van der Hoff2019-07-051-8/+8
| | | | | | | | | | | | | | - Put the default window_size back to 1000ms (broken by #5181) - Make the `rc_federation` config actually do something - fix an off-by-one error in the 'concurrent' limit - Avoid creating an unused `_PerHostRatelimiter` object for every single incoming request