Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into erikj/simplify_caches
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Apr 23, 2021
2 parents b2686a5 + c1ddbbd commit f520971
Show file tree
Hide file tree
Showing 104 changed files with 1,462 additions and 518 deletions.
61 changes: 58 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,66 @@
Synapse 1.32.0rc1 (2021-04-13)
==============================
Synapse 1.32.2 (2021-04-22)
===========================

This release includes a fix for a regression introduced in 1.32.0.

Bugfixes
--------

- Fix a regression in Synapse 1.32.0 and 1.32.1 which caused `LoggingContext` errors in plugins. ([\#9857](https://github.com/matrix-org/synapse/issues/9857))


Synapse 1.32.1 (2021-04-21)
===========================

This release fixes [a regression](https://github.com/matrix-org/synapse/issues/9853)
in Synapse 1.32.0 that caused connected Prometheus instances to become unstable.

However, as this release is still subject to the `LoggingContext` change in 1.32.0,
it is recommended to remain on or downgrade to 1.31.0.

Bugfixes
--------

- Fix a regression in Synapse 1.32.0 which caused Synapse to report large numbers of Prometheus time series, potentially overwhelming Prometheus instances. ([\#9854](https://github.com/matrix-org/synapse/issues/9854))


Synapse 1.32.0 (2021-04-20)
===========================

**Note:** This release introduces [a regression](https://github.com/matrix-org/synapse/issues/9853)
that can overwhelm connected Prometheus instances. This issue was not present in
1.32.0rc1. If affected, it is recommended to downgrade to 1.31.0 in the meantime, and
follow [these instructions](https://github.com/matrix-org/synapse/pull/9854#issuecomment-823472183)
to clean up any excess writeahead logs.

**Note:** This release also mistakenly included a change that may affected Synapse
modules that import `synapse.logging.context.LoggingContext`, such as
[synapse-s3-storage-provider](https://github.com/matrix-org/synapse-s3-storage-provider).
This will be fixed in a later Synapse version.

**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_services` when registering users via the `/_matrix/client/r0/register` endpoint to comply with the spec. Please ensure your Application Services are up to date.
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.

If you are using the `packages.matrix.org` Debian repository for Synapse packages,
note that we have recently updated the expiry date on the gpg signing key. If you see an
error similar to `The following signatures were invalid: EXPKEYSIG F473DD4473365DE1`, you
will need to get a fresh copy of the keys. You can do so with:

```sh
sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
```

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
--------
Expand Down
53 changes: 53 additions & 0 deletions UPGRADE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,52 @@ for example:
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
Upgrading to v1.33.0
====================

Account Validity HTML templates can now display a user's expiration date
------------------------------------------------------------------------

This may affect you if you have enabled the account validity feature, and have made use of a
custom HTML template specified by the ``account_validity.template_dir`` or ``account_validity.account_renewed_html_path``
Synapse config options.

The template can now accept an ``expiration_ts`` variable, which represents the unix timestamp in milliseconds for the
future date of which their account has been renewed until. See the
`default template <https://github.com/matrix-org/synapse/blob/release-v1.33.0/synapse/res/templates/account_renewed.html>`_
for an example of usage.

ALso note that a new HTML template, ``account_previously_renewed.html``, has been added. This is is shown to users
when they attempt to renew their account with a valid renewal token that has already been used before. The default
template contents can been found
`here <https://github.com/matrix-org/synapse/blob/release-v1.33.0/synapse/res/templates/account_previously_renewed.html>`_,
and can also accept an ``expiration_ts`` variable. This template replaces the error message users would previously see
upon attempting to use a valid renewal token more than once.


Upgrading to v1.32.0
====================

Regression causing connected Prometheus instances to become overwhelmed
-----------------------------------------------------------------------

This release introduces `a regression <https://github.com/matrix-org/synapse/issues/9853>`_
that can overwhelm connected Prometheus instances. This issue is not present in
Synapse v1.32.0rc1.

If you have been affected, please downgrade to 1.31.0. You then may need to
remove excess writeahead logs in order for Prometheus to recover. Instructions
for doing so are provided
`here <https://github.com/matrix-org/synapse/pull/9854#issuecomment-823472183>`_.

Dropping support for old Python, Postgres and SQLite versions
-------------------------------------------------------------

In line with our `deprecation policy <https://github.com/matrix-org/synapse/blob/release-v1.32.0/docs/deprecation_policy.md>`_,
we've dropped support for Python 3.5 and PostgreSQL 9.5, as they are no longer supported upstream.

This release of Synapse requires Python 3.6+ and PostgresSQL 9.6+ or SQLite 3.22+.

Removal of old List Accounts Admin API
--------------------------------------

Expand All @@ -98,6 +141,16 @@ has been available since Synapse 1.7.0 (2019-12-13), and is accessible under ``G

The deprecation of the old endpoint was announced with Synapse 1.28.0 (released on 2021-02-25).

Application Services must use type ``m.login.application_service`` when registering users
-----------------------------------------------------------------------------------------

In compliance with the
`Application Service spec <https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions>`_,
Application Services are now required to use the ``m.login.application_service`` type when registering users via the
``/_matrix/client/r0/register`` endpoint. This behaviour was deprecated in Synapse v1.30.0.

Please ensure your Application Services are up to date.

Upgrading to v1.29.0
====================

Expand Down
1 change: 1 addition & 0 deletions changelog.d/9802.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add some sanity checks to identity server passed to 3PID bind/unbind endpoints.
1 change: 1 addition & 0 deletions changelog.d/9816.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename some handlers and config modules to not duplicate the top-level module.
1 change: 1 addition & 0 deletions changelog.d/9819.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add experimental support for handling presence on a worker.
1 change: 1 addition & 0 deletions changelog.d/9832.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't return an error when a user attempts to renew their account multiple times with the same token. Instead, state when their account is set to expire. This change concerns the optional account validity feature.
1 change: 1 addition & 0 deletions changelog.d/9838.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Introduce flake8-bugbear to the test suite and fix some of its lint violations.
1 change: 1 addition & 0 deletions changelog.d/9850.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add experimental support for handling presence on a worker.
1 change: 1 addition & 0 deletions changelog.d/9855.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Limit length of accepted email addresses.
1 change: 1 addition & 0 deletions changelog.d/9856.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove redundant `synapse.types.Collection` type definition.
1 change: 1 addition & 0 deletions changelog.d/9858.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Handle recently added rate limits correctly when using `--no-rate-limit` with the demo scripts.
1 change: 1 addition & 0 deletions changelog.d/9867.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists.
20 changes: 18 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
matrix-synapse-py3 (1.31.0+nmu1) UNRELEASED; urgency=medium
matrix-synapse-py3 (1.32.2) stable; urgency=medium

* New synapse release 1.32.2.

-- Synapse Packaging team <packages@matrix.org> Wed, 22 Apr 2021 12:43:52 +0100

matrix-synapse-py3 (1.32.1) stable; urgency=medium

* New synapse release 1.32.1.

-- Synapse Packaging team <packages@matrix.org> Wed, 21 Apr 2021 14:00:55 +0100

matrix-synapse-py3 (1.32.0) stable; urgency=medium

[ Dan Callahan ]
* Skip tests when DEB_BUILD_OPTIONS contains "nocheck".

-- Dan Callahan <danc@element.io> Mon, 12 Apr 2021 13:07:36 +0000
[ Synapse Packaging team ]
* New synapse release 1.32.0.

-- Synapse Packaging team <packages@matrix.org> Tue, 20 Apr 2021 14:28:39 +0100

matrix-synapse-py3 (1.31.0) stable; urgency=medium

Expand Down
54 changes: 42 additions & 12 deletions demo/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,48 @@ for port in 8080 8081 8082; do
# Check script parameters
if [ $# -eq 1 ]; then
if [ $1 = "--no-rate-limit" ]; then
# messages rate limit
echo 'rc_messages_per_second: 1000' >> $DIR/etc/$port.config
echo 'rc_message_burst_count: 1000' >> $DIR/etc/$port.config

# registration rate limit
printf 'rc_registration:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config

# login rate limit
echo 'rc_login:' >> $DIR/etc/$port.config
printf ' address:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
printf ' account:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
printf ' failed_attempts:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config

# Disable any rate limiting
ratelimiting=$(cat <<-RC
rc_message:
per_second: 1000
burst_count: 1000
rc_registration:
per_second: 1000
burst_count: 1000
rc_login:
address:
per_second: 1000
burst_count: 1000
account:
per_second: 1000
burst_count: 1000
failed_attempts:
per_second: 1000
burst_count: 1000
rc_admin_redaction:
per_second: 1000
burst_count: 1000
rc_joins:
local:
per_second: 1000
burst_count: 1000
remote:
per_second: 1000
burst_count: 1000
rc_3pid_validation:
per_second: 1000
burst_count: 1000
rc_invites:
per_room:
per_second: 1000
burst_count: 1000
per_user:
per_second: 1000
burst_count: 1000
RC
)
echo "${ratelimiting}" >> $DIR/etc/$port.config
fi
fi

Expand Down
Loading

0 comments on commit f520971

Please sign in to comment.