Andrew Morgan
6d1b93cf08
Merge commit '054a6b953' into anoa/dinsic_release_1_23_1
2020-12-31 11:58:10 +00:00
Andrew Morgan
7e1a0bf068
Merge commit 'b19b63e6b' into anoa/dinsic_release_1_23_1
2020-12-31 11:51:30 +00:00
Andrew Morgan
2af070196c
Merge commit 'ec0e9c469' into dinsic
2020-12-31 11:44:27 +00:00
Andrew Morgan
9e11250574
Merge commit '9146a8a69' into dinsic
2020-12-31 11:44:21 +00:00
Andrew Morgan
7df02e4431
Merge commit '70259d8c' into dinsic
2020-12-31 11:44:13 +00:00
Andrew Morgan
8f05de1d97
Merge commit 'de5cafe98' into dinsic
2020-12-31 11:43:55 +00:00
Andrew Morgan
4c7d889be7
Merge commit '97647b33c' into dinsic
2020-12-31 11:24:03 +00:00
Andrew Morgan
b30484ab34
Merge commit '3ee17585c' into dinsic
2020-12-31 11:23:56 +00:00
Andrew Morgan
247081274a
Merge commit '654e239b2' into dinsic
2020-12-31 11:23:48 +00:00
Andrew Morgan
5fc0dd8126
Merge commit '74976a8e4' into dinsic
2020-12-31 11:23:24 +00:00
Andrew Morgan
63e8ab5481
Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page ( #74 )
2020-12-30 17:43:08 +00:00
Patrick Cloke
0d86b11666
Support PyJWT v2.0.0. ( #8986 )
...
Tests were broken due to an API changing. The code used in Synapse
proper should be compatible with both versions already.
2020-12-29 18:41:36 +00:00
Mathieu Velten
e6797e004f
Allow per-room profile to be used for server notice user ( #8799 )
...
This applies even if the feature is disabled at the server level with `allow_per_room_profiles`.
The server notice not being a real user it doesn't have an user profile.
2020-12-14 10:31:27 +01:00
Andrew Morgan
903bb990b9
Remove the CI requirement for newsfiles ( #73 )
...
We don't use newsfiles for DINUM releases anyways, so a CI requirement for them
does not make sense.
2020-12-11 14:47:38 +00:00
Mathieu Velten
4d17afc255
Fix users info for remote users ( #71 )
2020-12-11 14:41:02 +00:00
Andrew Morgan
8a02d38ce2
Update mypy to 0.790 to resolve mypy CI errors ( #72 )
2020-12-11 12:32:49 +00:00
Andrew Morgan
0ebdde8739
Override any missing default power level keys with DINUM's defaults when creating a room ( #68 )
...
The createRoom flow in DINUM's Synapse (through the AccessRules module which has hooks for all of this) already rejects a power levels content dict if it doesn't have high enough power levels to satisfy DINUM's [requirements](ac50ed353b/synapse/third_party_rules/access_rules.py (L233-L252) ).
This PR ensures that any keys that aren't provided are replaced with the defaults, instead of just assuming the whole dict was correct (and thus those keys were set to mainline Synapse's default instead).
2020-10-29 10:48:29 +00:00
Erik Johnston
054a6b9538
Merge tag 'v1.22.0rc1' into develop
...
Synapse 1.22.0rc1 (2020-10-22)
==============================
Features
--------
- Add a configuration option for always using the "userinfo endpoint" for OpenID Connect. This fixes support for some identity providers, e.g. GitLab. Contributed by Benjamin Koch. ([\#7658](https://github.com/matrix-org/synapse/issues/7658 ))
- Add ability for `ThirdPartyEventRules` modules to query and manipulate whether a room is in the public rooms directory. ([\#8292](https://github.com/matrix-org/synapse/issues/8292 ), [\#8467](https://github.com/matrix-org/synapse/issues/8467 ))
- Add support for olm fallback keys ([MSC2732](https://github.com/matrix-org/matrix-doc/pull/2732 )). ([\#8312](https://github.com/matrix-org/synapse/issues/8312 ), [\#8501](https://github.com/matrix-org/synapse/issues/8501 ))
- Add support for running background tasks in a separate worker process. ([\#8369](https://github.com/matrix-org/synapse/issues/8369 ), [\#8458](https://github.com/matrix-org/synapse/issues/8458 ), [\#8489](https://github.com/matrix-org/synapse/issues/8489 ), [\#8513](https://github.com/matrix-org/synapse/issues/8513 ), [\#8544](https://github.com/matrix-org/synapse/issues/8544 ), [\#8599](https://github.com/matrix-org/synapse/issues/8599 ))
- Add support for device dehydration ([MSC2697](https://github.com/matrix-org/matrix-doc/pull/2697 )). ([\#8380](https://github.com/matrix-org/synapse/issues/8380 ))
- Add support for [MSC2409](https://github.com/matrix-org/matrix-doc/pull/2409 ), which allows sending typing, read receipts, and presence events to appservices. ([\#8437](https://github.com/matrix-org/synapse/issues/8437 ), [\#8590](https://github.com/matrix-org/synapse/issues/8590 ))
- Change default room version to "6", per [MSC2788](https://github.com/matrix-org/matrix-doc/pull/2788 ). ([\#8461](https://github.com/matrix-org/synapse/issues/8461 ))
- Add the ability to send non-membership events into a room via the `ModuleApi`. ([\#8479](https://github.com/matrix-org/synapse/issues/8479 ))
- Increase default upload size limit from 10M to 50M. Contributed by @Akkowicz. ([\#8502](https://github.com/matrix-org/synapse/issues/8502 ))
- Add support for modifying event content in `ThirdPartyRules` modules. ([\#8535](https://github.com/matrix-org/synapse/issues/8535 ), [\#8564](https://github.com/matrix-org/synapse/issues/8564 ))
Bugfixes
--------
- Fix a longstanding bug where invalid ignored users in account data could break clients. ([\#8454](https://github.com/matrix-org/synapse/issues/8454 ))
- Fix a bug where backfilling a room with an event that was missing the `redacts` field would break. ([\#8457](https://github.com/matrix-org/synapse/issues/8457 ))
- Don't attempt to respond to some requests if the client has already disconnected. ([\#8465](https://github.com/matrix-org/synapse/issues/8465 ))
- Fix message duplication if something goes wrong after persisting the event. ([\#8476](https://github.com/matrix-org/synapse/issues/8476 ))
- Fix incremental sync returning an incorrect `prev_batch` token in timeline section, which when used to paginate returned events that were included in the incremental sync. Broken since v0.16.0. ([\#8486](https://github.com/matrix-org/synapse/issues/8486 ))
- Expose the `uk.half-shot.msc2778.login.application_service` to clients from the login API. This feature was added in v1.21.0, but was not exposed as a potential login flow. ([\#8504](https://github.com/matrix-org/synapse/issues/8504 ))
- Fix error code for `/profile/{userId}/displayname` to be `M_BAD_JSON`. ([\#8517](https://github.com/matrix-org/synapse/issues/8517 ))
- Fix a bug introduced in v1.7.0 that could cause Synapse to insert values from non-state `m.room.retention` events into the `room_retention` database table. ([\#8527](https://github.com/matrix-org/synapse/issues/8527 ))
- Fix not sending events over federation when using sharded event writers. ([\#8536](https://github.com/matrix-org/synapse/issues/8536 ))
- Fix a long standing bug where email notifications for encrypted messages were blank. ([\#8545](https://github.com/matrix-org/synapse/issues/8545 ))
- Fix increase in the number of `There was no active span...` errors logged when using OpenTracing. ([\#8567](https://github.com/matrix-org/synapse/issues/8567 ))
- Fix a bug that prevented errors encountered during execution of the `synapse_port_db` from being correctly printed. ([\#8585](https://github.com/matrix-org/synapse/issues/8585 ))
- Fix appservice transactions to only include a maximum of 100 persistent and 100 ephemeral events. ([\#8606](https://github.com/matrix-org/synapse/issues/8606 ))
Updates to the Docker image
---------------------------
- Added multi-arch support (arm64,arm/v7) for the docker images. Contributed by @maquis196. ([\#7921](https://github.com/matrix-org/synapse/issues/7921 ))
- Add support for passing commandline args to the synapse process. Contributed by @samuel-p. ([\#8390](https://github.com/matrix-org/synapse/issues/8390 ))
Improved Documentation
----------------------
- Update the directions for using the manhole with coroutines. ([\#8462](https://github.com/matrix-org/synapse/issues/8462 ))
- Improve readme by adding new shield.io badges. ([\#8493](https://github.com/matrix-org/synapse/issues/8493 ))
- Added note about docker in manhole.md regarding which ip address to bind to. Contributed by @Maquis196. ([\#8526](https://github.com/matrix-org/synapse/issues/8526 ))
- Document the new behaviour of the `allowed_lifetime_min` and `allowed_lifetime_max` settings in the room retention configuration. ([\#8529](https://github.com/matrix-org/synapse/issues/8529 ))
Deprecations and Removals
-------------------------
- Drop unused `device_max_stream_id` table. ([\#8589](https://github.com/matrix-org/synapse/issues/8589 ))
Internal Changes
----------------
- Check for unreachable code with mypy. ([\#8432](https://github.com/matrix-org/synapse/issues/8432 ))
- Add unit test for event persister sharding. ([\#8433](https://github.com/matrix-org/synapse/issues/8433 ))
- Allow events to be sent to clients sooner when using sharded event persisters. ([\#8439](https://github.com/matrix-org/synapse/issues/8439 ), [\#8488](https://github.com/matrix-org/synapse/issues/8488 ), [\#8496](https://github.com/matrix-org/synapse/issues/8496 ), [\#8499](https://github.com/matrix-org/synapse/issues/8499 ))
- Configure `public_baseurl` when using demo scripts. ([\#8443](https://github.com/matrix-org/synapse/issues/8443 ))
- Add SQL logging on queries that happen during startup. ([\#8448](https://github.com/matrix-org/synapse/issues/8448 ))
- Speed up unit tests when using PostgreSQL. ([\#8450](https://github.com/matrix-org/synapse/issues/8450 ))
- Remove redundant database loads of stream_ordering for events we already have. ([\#8452](https://github.com/matrix-org/synapse/issues/8452 ))
- Reduce inconsistencies between codepaths for membership and non-membership events. ([\#8463](https://github.com/matrix-org/synapse/issues/8463 ))
- Combine `SpamCheckerApi` with the more generic `ModuleApi`. ([\#8464](https://github.com/matrix-org/synapse/issues/8464 ))
- Additional testing for `ThirdPartyEventRules`. ([\#8468](https://github.com/matrix-org/synapse/issues/8468 ))
- Add `-d` option to `./scripts-dev/lint.sh` to lint files that have changed since the last git commit. ([\#8472](https://github.com/matrix-org/synapse/issues/8472 ))
- Unblacklist some sytests. ([\#8474](https://github.com/matrix-org/synapse/issues/8474 ))
- Include the log level in the phone home stats. ([\#8477](https://github.com/matrix-org/synapse/issues/8477 ))
- Remove outdated sphinx documentation, scripts and configuration. ([\#8480](https://github.com/matrix-org/synapse/issues/8480 ))
- Clarify error message when plugin config parsers raise an error. ([\#8492](https://github.com/matrix-org/synapse/issues/8492 ))
- Remove the deprecated `Handlers` object. ([\#8494](https://github.com/matrix-org/synapse/issues/8494 ))
- Fix a threadsafety bug in unit tests. ([\#8497](https://github.com/matrix-org/synapse/issues/8497 ))
- Add user agent to user_daily_visits table. ([\#8503](https://github.com/matrix-org/synapse/issues/8503 ))
- Add type hints to various parts of the code base. ([\#8407](https://github.com/matrix-org/synapse/issues/8407 ), [\#8505](https://github.com/matrix-org/synapse/issues/8505 ), [\#8507](https://github.com/matrix-org/synapse/issues/8507 ), [\#8547](https://github.com/matrix-org/synapse/issues/8547 ), [\#8562](https://github.com/matrix-org/synapse/issues/8562 ), [\#8609](https://github.com/matrix-org/synapse/issues/8609 ))
- Remove unused code from the test framework. ([\#8514](https://github.com/matrix-org/synapse/issues/8514 ))
- Apply some internal fixes to the `HomeServer` class to make its code more idiomatic and statically-verifiable. ([\#8515](https://github.com/matrix-org/synapse/issues/8515 ))
- Factor out common code between `RoomMemberHandler._locally_reject_invite` and `EventCreationHandler.create_event`. ([\#8537](https://github.com/matrix-org/synapse/issues/8537 ))
- Improve database performance by executing more queries without starting transactions. ([\#8542](https://github.com/matrix-org/synapse/issues/8542 ))
- Rename `Cache` to `DeferredCache`, to better reflect its purpose. ([\#8548](https://github.com/matrix-org/synapse/issues/8548 ))
- Move metric registration code down into `LruCache`. ([\#8561](https://github.com/matrix-org/synapse/issues/8561 ), [\#8591](https://github.com/matrix-org/synapse/issues/8591 ))
- Replace `DeferredCache` with the lighter-weight `LruCache` where possible. ([\#8563](https://github.com/matrix-org/synapse/issues/8563 ))
- Add virtualenv-generated folders to `.gitignore`. ([\#8566](https://github.com/matrix-org/synapse/issues/8566 ))
- Add `get_immediate` method to `DeferredCache`. ([\#8568](https://github.com/matrix-org/synapse/issues/8568 ))
- Fix mypy not properly checking across the codebase, additionally, fix a typing assertion error in `handlers/auth.py`. ([\#8569](https://github.com/matrix-org/synapse/issues/8569 ))
- Fix `synmark` benchmark runner. ([\#8571](https://github.com/matrix-org/synapse/issues/8571 ))
- Modify `DeferredCache.get()` to return `Deferred`s instead of `ObservableDeferred`s. ([\#8572](https://github.com/matrix-org/synapse/issues/8572 ))
- Adjust a protocol-type definition to fit `sqlite3` assertions. ([\#8577](https://github.com/matrix-org/synapse/issues/8577 ))
- Support macOS on the `synmark` benchmark runner. ([\#8578](https://github.com/matrix-org/synapse/issues/8578 ))
- Update `mypy` static type checker to 0.790. ([\#8583](https://github.com/matrix-org/synapse/issues/8583 ), [\#8600](https://github.com/matrix-org/synapse/issues/8600 ))
- Re-organize the structured logging code to separate the TCP transport handling from the JSON formatting. ([\#8587](https://github.com/matrix-org/synapse/issues/8587 ))
- Remove extraneous unittest logging decorators from unit tests. ([\#8592](https://github.com/matrix-org/synapse/issues/8592 ))
- Minor optimisations in caching code. ([\#8593](https://github.com/matrix-org/synapse/issues/8593 ), [\#8594](https://github.com/matrix-org/synapse/issues/8594 ))
2020-10-22 13:37:08 +01:00
Patrick Cloke
514a240aed
Remove unused OPTIONS handlers. ( #8621 )
...
The handling of OPTIONS requests was consolidated in #7534 , but the endpoint
specific handlers were not removed.
2020-10-22 08:35:55 -04:00
Erik Johnston
5065048110
Fixup changelog even more
v1.22.0rc1
2020-10-22 13:25:22 +01:00
Erik Johnston
88b8b8403c
Fixup changelog some more
2020-10-22 13:19:37 +01:00
Erik Johnston
b19b63e6b4
Don't 500 for invalid group IDs ( #8628 )
2020-10-22 13:19:06 +01:00
Erik Johnston
a622e1ed9f
Fixup changelog
2020-10-22 13:12:22 +01:00
Erik Johnston
ec0e9c4695
1.22.0rc1
2020-10-22 13:08:42 +01:00
Erik Johnston
a9f90fa73a
Type hints for RegistrationStore ( #8615 )
2020-10-22 11:56:58 +01:00
Erik Johnston
2ac908f377
Don't instansiate Requester directly ( #8614 )
2020-10-22 10:11:06 +01:00
Richard van der Hoff
b28aaeb3a5
Optimise CacheDescriptor ( #8594 )
...
don't bother constricting a CacheContext unless we need one.
2020-10-21 22:57:45 +01:00
Richard van der Hoff
15d5553d9e
Merge pull request #8593 from matrix-org/rav/cache_hacking/3
...
Optimisation in DeferredCache.set
2020-10-21 22:57:23 +01:00
Richard van der Hoff
c13820bcee
fix failure case
2020-10-21 18:54:53 +01:00
Richard van der Hoff
2b3af01791
optimise DeferredCache.set
2020-10-21 17:55:53 +01:00
Richard van der Hoff
9146a8a691
Merge pull request #8572 from matrix-org/rav/cache_hacking/2
...
Push some deferred wrangling down into DeferredCache
2020-10-21 17:55:04 +01:00
Brendan Abolivier
e8dcadaccd
Make sure a retention policy is a state event ( #8527 )
...
* Make sure a retention policy is a state event
* Changelog
2020-10-21 16:50:07 +01:00
Andrew Morgan
4d5ed3daf4
Merge pull request #67 from matrix-org/anoa/dinsic_release_1_21_x
...
Merge Synapse release v1.21.2 into 'dinsic'
2020-10-21 16:42:09 +01:00
Andrew Morgan
4288fe6618
Changelog
2020-10-21 15:46:43 +01:00
Andrew Morgan
8e7c4143b2
Fix type error
2020-10-21 15:43:15 +01:00
Richard van der Hoff
6d3905c7c7
Add some more tests
2020-10-21 15:39:25 +01:00
Richard van der Hoff
1f4269700c
Push some deferred wrangling down into DeferredCache
2020-10-21 15:39:25 +01:00
Richard van der Hoff
7b71695388
Combine the two sets of tests for CacheDescriptor
2020-10-21 15:38:29 +01:00
Will Hunt
70259d8c8c
Limit AS transactions to 100 events ( #8606 )
...
* Limit AS transactions to 100 events
* Update changelog.d/8606.feature
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
* Add tests
* Update synapse/appservice/scheduler.py
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2020-10-21 15:36:53 +01:00
Andrew Morgan
91ce65f05d
Merge commit '9b8a53c7b' into anoa/dinsic_release_1_21_x
...
* commit '9b8a53c7b':
Additional tweaks.
Clarify authlib changes.
Fix typo.
Add additional release notes.
2020-10-21 15:13:07 +01:00
Andrew Morgan
cd50eba74b
Merge commit '9991aaa49' into anoa/dinsic_release_1_21_x
...
* commit '9991aaa49':
1.21.2
Remove racey assertion in MultiWriterIDGenerator (#8530 )
2020-10-21 15:12:57 +01:00
Andrew Morgan
e80d7c3982
Merge commit '58e583eac' into anoa/dinsic_release_1_21_x
...
* commit '58e583eac':
1.21.1
Explicitly install test dependencies when building deb packages (#8523 )
Reverse proxies are not the only thing to change;be explicit w/ new endpoint
Add deprecation warning for admin api under client api prefixes
2020-10-21 15:12:50 +01:00
Andrew Morgan
e15cca700b
Merge commit 'f76194a02' into anoa/dinsic_release_1_21_x
...
* commit 'f76194a02':
1.21.0
Update change log
1.21.0rc3
Reduce serialization errors in MultiWriterIdGen (#8456 )
Add Ubuntu 20.10 (Groovy Gorilla) to build scripts. (#8475 )
move #8444 to 'feature'
linkify changelog
2020-10-21 15:12:45 +01:00
Andrew Morgan
56e2477218
Merge commit '6a8fd03ac' into anoa/dinsic_release_1_21_x
...
* commit '6a8fd03ac':
1.21.0rc2
1.21.0rc2
Fix bug in remote thumbnail search (#8438 )
Fix DB query on startup for negative streams. (#8447 )
Convert additional templates to Jinja (#8444 )
Fix malformed log line in new federation "catch up" logic (#8442 )
Do not expose the experimental appservice login flow to clients. (#8440 )
update changelog
fix a logging error in thumbnailer (#8435 )
changelog fixes
fix version number
2020-10-21 15:12:31 +01:00
Andrew Morgan
854764073c
Merge commit 'cc40a59b4' into anoa/dinsic_release_1_21_x
...
* 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
2020-10-21 14:53:23 +01:00
Andrew Morgan
e8ed9a6016
Merge commit '8238b55e0' into anoa/dinsic_release_1_21_x
...
* commit '8238b55e0':
Update description of server_name config option (#8415 )
Discard an empty upload_name before persisting an uploaded file (#7905 )
Don't table scan events on worker startup (#8419 )
Mypy fixes for `synapse.handlers.federation` (#8422 )
2020-10-21 14:53:16 +01:00
Andrew Morgan
ab26b5894a
Merge commit 'f43c66d23' into anoa/dinsic_release_1_21_x
...
* 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
2020-10-21 14:53:14 +01:00
Andrew Morgan
5b0b103521
Merge commit '31acc5c30' into anoa/dinsic_release_1_21_x
...
* commit '31acc5c30':
Escape the error description on the sso_error template. (#8405 )
Fix occasional "Re-starting finished log context" from keyring (#8398 )
Allow existing users to login via OpenID Connect. (#8345 )
Fix schema delta for servers that have not backfilled (#8396 )
Fix MultiWriteIdGenerator's handling of restarts. (#8374 )
s/URLs/variables in changelog
s/accidentally/incorrectly in changelog
Update changelog wording
Add type annotations to SimpleHttpClient (#8372 )
Add new sequences to port DB script (#8387 )
Add EventStreamPosition type (#8388 )
Mark the shadow_banned column as boolean in synapse_port_db. (#8386 )
2020-10-21 14:51:58 +01:00
Andrew Morgan
d70f909e6c
Merge commit '920dd1083' into anoa/dinsic_release_1_21_x
...
* commit '920dd1083':
1.20.1
Mark the shadow_banned column as boolean in synapse_port_db. (#8386 )
Hotfix: disable autoescape by default when rendering Jinja2 templates (#8394 )
2020-10-21 14:24:11 +01:00
Andrew Morgan
3729b15a64
Merge commit '2983049a7' into anoa/dinsic_release_1_21_x
...
* commit '2983049a7':
Factor out `_send_dummy_event_for_room` (#8370 )
Improve logging of state resolution (#8371 )
Fix bug which caused failure on join with malformed membership events (#8385 )
Use `async with` for ID gens (#8383 )
Don't push if an user account has expired (#8353 )
Do not check lint/test dependencies at runtime. (#8377 )
Add note to reverse_proxy.md about disabling Apache's mod_security2 (#8375 )
Changelog
2020-10-21 14:15:38 +01:00