summary refs log tree commit diff
path: root/synapse/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Improve the backwards compatibility re-exports of synapse.logging.context ↵Andrew Morgan2020-02-173-5/+61
|\| | | | | | | (#5617)
| * Improve the backwards compatibility re-exports of synapse.logging.context ↵Amber Brown2019-07-053-5/+61
| | | | | | | | | | | | | | | | (#5617) * Improve the backwards compatibility re-exports of synapse.logging.context. * reexport logformatter too
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Andrew Morgan2020-02-1412-962/+26
|\|
| * Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-0412-962/+26
| |
* | Fix 'utime went backwards' errors on daemonization. (#5609)Andrew Morgan2020-02-141-4/+13
|\|
| * Fix 'utime went backwards' errors on daemonization. (#5609)Richard van der Hoff2019-07-031-4/+13
| | | | | | | | | | | | | | | | * Fix 'utime went backwards' errors on daemonization. Fixes #5608 * remove spurious debug
* | Fix a number of "Starting txn from sentinel context" warnings (#5605)Andrew Morgan2020-02-141-1/+7
|\|
| * Fix a number of "Starting txn from sentinel context" warnings (#5605)Richard van der Hoff2019-07-031-1/+7
| | | | | | | | Fixes #5602, #5603
* | Fix media repo breaking (#5593)Andrew Morgan2020-02-141-2/+7
|\|
| * Fix media repo breaking (#5593)Amber Brown2019-07-021-2/+7
| |
* | Prevent multiple upgrades on the same room at once (#5051)Andrew Morgan2020-02-141-1/+1
|\|
| * Prevent multiple upgrades on the same room at once (#5051)Andrew Morgan2019-06-251-1/+1
| | | | | | | | | | | | | | Closes #4583 Does slightly less than #5045, which prevented a room from being upgraded multiple times, one after another. This PR still allows that, but just prevents two from happening at the same time. Mostly just to mitigate the fact that servers are slow and it can take a moment for the room upgrade to actually complete. We don't want people sending another request to upgrade the room when really they just thought the first didn't go through.
* | Merge pull request #5499 from matrix-org/rav/cleanup_metricsAndrew Morgan2020-02-141-7/+39
|\|
| * Avoid raising exceptions in metricsRichard van der Hoff2019-06-241-8/+14
| | | | | | | | | | Sentry will catch the errors if they happen, so that should be good enough, and woun't make things explode if we hit the error condition.
| * Merge branch 'develop' into rav/cleanup_metricsRichard van der Hoff2019-06-2427-314/+317
| |\
| * | Sanity-checking for metrics updatesRichard van der Hoff2019-06-191-7/+33
| | | | | | | | | | | | Check that our clocks go forward.
* | | Run Black. (#5482)Andrew Morgan2020-02-133-4/+4
|\ \ \ | | |/ | |/|
| * | Run Black. (#5482)Amber Brown2019-06-2027-314/+317
| |/
* | Dinsic Blacking with black==18.6b2Andrew Morgan2020-02-1127-317/+321
| |
* | Validate client_secret parameter according to spec (#20)Andrew Morgan2020-01-221-0/+14
| |
* | Add kwargs and docBrendan Abolivier2019-07-291-2/+4
| |
* | Add ability to pass arguments to looping callsBrendan Abolivier2019-07-291-2/+2
| |
* | Merge branch 'master' into dinsicBrendan Abolivier2019-06-122-27/+50
|\|
| * Call RetryLimiter correctly (#5340)Richard van der Hoff2019-06-041-1/+6
| | | | | | Fixes a regression introduced in #5335.
| * Avoid rapidly backing-off a server if we ignore the retry intervalRichard van der Hoff2019-06-031-23/+37
| |
| * Improve logging for logcontext leaks. (#5288)Richard van der Hoff2019-05-291-9/+13
| |
* | Merge branch 'babolivier/per_room_profiles' into dinsic dinsic_2019-05-17Brendan Abolivier2019-05-173-32/+35
|\|
| * Make all the rate limiting options more consistent (#5181)Amber Brown2019-05-151-32/+15
| |
| * Merge pull request #5183 from matrix-org/erikj/async_serialize_eventErik Johnston2019-05-151-0/+19
| |\ | | | | | | Allow client event serialization to be async
| | * Update docstring with correct return typeErik Johnston2019-05-151-1/+1
| | | | | | | | | Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
| | * Allow client event serialization to be asyncErik Johnston2019-05-141-0/+19
| | |
| * | comment about user_joined_roomRichard van der Hoff2019-05-141-0/+1
| |/
* | Merge branch 'release-v0.99.4' into dinsic dinsic_2019-05-14Brendan Abolivier2019-05-141-2/+7
|\|
| * Merge branch 'master' into developRichard van der Hoff2019-05-031-2/+7
| |\
| | * Use SystemRandom for token generationRichard van der Hoff2019-05-031-2/+7
| | |
* | | Merge branch 'develop' into dinsicAndrew Morgan2019-04-152-3/+58
|\| |
| * | Remove periods from copyright headers (#5046)Andrew Morgan2019-04-111-1/+1
| | |
| * | Fix disappearing exceptions in manhole. (#5035)Richard van der Hoff2019-04-101-2/+57
| |/ | | | | Avoid sending syntax errors from the manhole to sentry.
* | Prevent exception when hs or shadow_hs missing (#5012) dinsic_2019-04-04_2Michael Kaye2019-04-041-2/+2
| | | | | | | | * Prevent exception when hs or shadow_hs missing
* | FixupsErik Johnston2019-03-151-1/+4
| |
* | Merge branch 'master' of github.com:matrix-org/synapse into ↵Erik Johnston2019-03-154-8/+211
|\| | | | | | | erikj/dinsic-merged-master
| * Add a caching layer to .well-known responses (#4516)Richard van der Hoff2019-01-301-0/+161
| |
| * Merge pull request #4486 from xperimental/workaround-4216Richard van der Hoff2019-01-301-1/+4
| |\ | | | | | | Implement workaround for login error.
| | * Implement workaround for login error.Robert Jacob2019-01-301-1/+4
| | | | | | | | | | | | Signed-off-by: Robert Jacob <xperimental@solidproject.de>
| * | Make linearizer more quiet (#4507)Amber Brown2019-01-291-5/+5
| |/
| * Fix incorrect logcontexts after a Deferred was cancelled (#4407)Richard van der Hoff2019-01-171-1/+3
| |
| * Fix UnicodeDecodeError when postgres is not configured in english (#4253)Richard van der Hoff2018-12-041-1/+38
| | | | | | | | This is a bit of a half-assed effort at fixing https://github.com/matrix-org/synapse/issues/4252. Fundamentally the right answer is to drop support for Python 2.
* | Merge branch 'dinsic_anoa/info_split' of github.com:matrix-org/synapse into ↵Andrew Morgan2019-02-271-1/+1
|\ \ | | | | | | | | | dinsic_anoa/info_split
| * | Update synapse/util/threepids.pyRichard van der Hoff2019-02-251-1/+1
| | | | | | | | | Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com>
* | | Check shadow_hs as well as hs during 3pid regAndrew Morgan2019-02-271-6/+8
|/ /
* | Use internal-info for identity server. Block reg on fields dinsic_2019-02-19-beta11Andrew Morgan2019-02-191-2/+10
| |
* | merge master into dinsic, again...Matthew Hodgson2018-11-039-120/+306
|\|
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-253-54/+76
| |\ | | | | | | | | | erikj/alias_disallow_list