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 callahad/actions
Browse files Browse the repository at this point in the history
  • Loading branch information
callahad committed Apr 6, 2021
2 parents 49686c4 + 0d87c6b commit 30f5708
Show file tree
Hide file tree
Showing 234 changed files with 4,513 additions and 1,618 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/test_old_deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# this script is run by buildkite in a plain `xenial` container; it installs the
# minimal requirements for tox and hands over to the py35-old tox environment.
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/test_synapse_port_db.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test script for 'synapse_port_db', which creates a virtualenv, installs Synapse along
# with additional dependencies needed for the test (such as coverage or the PostgreSQL
Expand Down
126 changes: 124 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,135 @@
Synapse 1.30.0rc1 (2021-03-16)
Synapse 1.31.0 (2021-04-06)
===========================

**Note:** As announced in v1.25.0, and in line with the deprecation policy for platform dependencies, this is the last release to support Python 3.5 and PostgreSQL 9.5. Future versions of Synapse will require Python 3.6+ and PostgreSQL 9.6+, as per our [deprecation policy](docs/deprecation_policy.md).

This is also the last release that the Synapse team will be publishing packages for Debian Stretch and Ubuntu Xenial.


Improved Documentation
----------------------

- Add a document describing the deprecation policy for platform dependencies. ([\#9723](https://github.com/matrix-org/synapse/issues/9723))


Internal Changes
----------------

- Revert using `dmypy run` in lint script. ([\#9720](https://github.com/matrix-org/synapse/issues/9720))
- Pin flake8-bugbear's version. ([\#9734](https://github.com/matrix-org/synapse/issues/9734))


Synapse 1.31.0rc1 (2021-03-30)
==============================

Features
--------

- Add support to OpenID Connect login for requiring attributes on the `userinfo` response. Contributed by Hubbe King. ([\#9609](https://github.com/matrix-org/synapse/issues/9609))
- Add initial experimental support for a "space summary" API. ([\#9643](https://github.com/matrix-org/synapse/issues/9643), [\#9652](https://github.com/matrix-org/synapse/issues/9652), [\#9653](https://github.com/matrix-org/synapse/issues/9653))
- Add support for the busy presence state as described in [MSC3026](https://github.com/matrix-org/matrix-doc/pull/3026). ([\#9644](https://github.com/matrix-org/synapse/issues/9644))
- Add support for credentials for proxy authentication in the `HTTPS_PROXY` environment variable. ([\#9657](https://github.com/matrix-org/synapse/issues/9657))


Bugfixes
--------

- Fix a longstanding bug that could cause issues when editing a reply to a message. ([\#9585](https://github.com/matrix-org/synapse/issues/9585))
- Fix the `/capabilities` endpoint to return `m.change_password` as disabled if the local password database is not used for authentication. Contributed by @dklimpel. ([\#9588](https://github.com/matrix-org/synapse/issues/9588))
- Check if local passwords are enabled before setting them for the user. ([\#9636](https://github.com/matrix-org/synapse/issues/9636))
- Fix a bug where federation sending can stall due to `concurrent access` database exceptions when it falls behind. ([\#9639](https://github.com/matrix-org/synapse/issues/9639))
- Fix a bug introduced in Synapse 1.30.1 which meant the suggested `pip` incantation to install an updated `cryptography` was incorrect. ([\#9699](https://github.com/matrix-org/synapse/issues/9699))


Updates to the Docker image
---------------------------

- Speed up Docker builds and make it nicer to test against Complement while developing (install all dependencies before copying the project). ([\#9610](https://github.com/matrix-org/synapse/issues/9610))
- Include [opencontainers labels](https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys) in the Docker image. ([\#9612](https://github.com/matrix-org/synapse/issues/9612))


Improved Documentation
----------------------

- Clarify that `register_new_matrix_user` is present also when installed via non-pip package. ([\#9074](https://github.com/matrix-org/synapse/issues/9074))
- Update source install documentation to mention platform prerequisites before the source install steps. ([\#9667](https://github.com/matrix-org/synapse/issues/9667))
- Improve worker documentation for fallback/web auth endpoints. ([\#9679](https://github.com/matrix-org/synapse/issues/9679))
- Update the sample configuration for OIDC authentication. ([\#9695](https://github.com/matrix-org/synapse/issues/9695))


Internal Changes
----------------

- Preparatory steps for removing redundant `outlier` data from `event_json.internal_metadata` column. ([\#9411](https://github.com/matrix-org/synapse/issues/9411))
- Add type hints to the caching module. ([\#9442](https://github.com/matrix-org/synapse/issues/9442))
- Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9499](https://github.com/matrix-org/synapse/issues/9499), [\#9659](https://github.com/matrix-org/synapse/issues/9659))
- Add additional type hints to the Homeserver object. ([\#9631](https://github.com/matrix-org/synapse/issues/9631), [\#9638](https://github.com/matrix-org/synapse/issues/9638), [\#9675](https://github.com/matrix-org/synapse/issues/9675), [\#9681](https://github.com/matrix-org/synapse/issues/9681))
- Only save remote cross-signing and device keys if they're different from the current ones. ([\#9634](https://github.com/matrix-org/synapse/issues/9634))
- Rename storage function to fix spelling and not conflict with another function's name. ([\#9637](https://github.com/matrix-org/synapse/issues/9637))
- Improve performance of federation catch up by sending the latest events in the room to the remote, rather than just the last event sent by the local server. ([\#9640](https://github.com/matrix-org/synapse/issues/9640), [\#9664](https://github.com/matrix-org/synapse/issues/9664))
- In the `federation_client` commandline client, stop automatically adding the URL prefix, so that servlets on other prefixes can be tested. ([\#9645](https://github.com/matrix-org/synapse/issues/9645))
- In the `federation_client` commandline client, handle inline `signing_key`s in `homeserver.yaml`. ([\#9647](https://github.com/matrix-org/synapse/issues/9647))
- Fixed some antipattern issues to improve code quality. ([\#9649](https://github.com/matrix-org/synapse/issues/9649))
- Add a storage method for pulling all current user presence state from the database. ([\#9650](https://github.com/matrix-org/synapse/issues/9650))
- Import `HomeServer` from the proper module. ([\#9665](https://github.com/matrix-org/synapse/issues/9665))
- Increase default join ratelimiting burst rate. ([\#9674](https://github.com/matrix-org/synapse/issues/9674))
- Add type hints to third party event rules and visibility modules. ([\#9676](https://github.com/matrix-org/synapse/issues/9676))
- Bump mypy-zope to 0.2.13 to fix "Cannot determine consistent method resolution order (MRO)" errors when running mypy a second time. ([\#9678](https://github.com/matrix-org/synapse/issues/9678))
- Use interpreter from `$PATH` via `/usr/bin/env` instead of absolute paths in various scripts. ([\#9689](https://github.com/matrix-org/synapse/issues/9689))
- Make it possible to use `dmypy`. ([\#9692](https://github.com/matrix-org/synapse/issues/9692))
- Suppress "CryptographyDeprecationWarning: int_from_bytes is deprecated". ([\#9698](https://github.com/matrix-org/synapse/issues/9698))
- Use `dmypy run` in lint script for improved performance in type-checking while developing. ([\#9701](https://github.com/matrix-org/synapse/issues/9701))
- Fix undetected mypy error when using Python 3.6. ([\#9703](https://github.com/matrix-org/synapse/issues/9703))
- Fix type-checking CI on develop. ([\#9709](https://github.com/matrix-org/synapse/issues/9709))


Synapse 1.30.1 (2021-03-26)
===========================

This release is identical to Synapse 1.30.0, with the exception of explicitly
setting a minimum version of Python's Cryptography library to ensure that users
of Synapse are protected from the recent [OpenSSL security advisories](https://mta.openssl.org/pipermail/openssl-announce/2021-March/000198.html),
especially CVE-2021-3449.

Note that Cryptography defaults to bundling its own statically linked copy of
OpenSSL, which means that you may not be protected by your operating system's
security updates.

It's also worth noting that Cryptography no longer supports Python 3.5, so
admins deploying to older environments may not be protected against this or
future vulnerabilities. Synapse will be dropping support for Python 3.5 at the
end of March.


Updates to the Docker image
---------------------------

- Ensure that the docker container has up to date versions of openssl. ([\#9697](https://github.com/matrix-org/synapse/issues/9697))


Internal Changes
----------------

- Enforce that `cryptography` dependency is up to date to ensure it has the most recent openssl patches. ([\#9697](https://github.com/matrix-org/synapse/issues/9697))


Synapse 1.30.0 (2021-03-22)
===========================

Note that this release deprecates the ability for appservices to
call `POST /_matrix/client/r0/register` without the body parameter `type`. Appservice
developers should use a `type` value of `m.login.application_service` as
per [the spec](https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions).
In future releases, calling this endpoint with an access token - but without a `m.login.application_service`
type - will fail.


No significant changes.


Synapse 1.30.0rc1 (2021-03-16)
==============================

Features
--------

Expand All @@ -34,7 +156,7 @@ Bugfixes
Updates to the Docker image
---------------------------

- Use jemalloc if available in docker. ([\#8553](https://github.com/matrix-org/synapse/issues/8553))
- Make use of an improved malloc implementation (`jemalloc`) in the docker image. ([\#8553](https://github.com/matrix-org/synapse/issues/8553))


Improved Documentation
Expand Down
42 changes: 27 additions & 15 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ There are 3 steps to follow under **Installation Instructions**.
- [Choosing your server name](#choosing-your-server-name)
- [Installing Synapse](#installing-synapse)
- [Installing from source](#installing-from-source)
- [Platform-Specific Instructions](#platform-specific-instructions)
- [Platform-specific prerequisites](#platform-specific-prerequisites)
- [Debian/Ubuntu/Raspbian](#debianubunturaspbian)
- [ArchLinux](#archlinux)
- [CentOS/Fedora](#centosfedora)
Expand Down Expand Up @@ -38,6 +38,7 @@ There are 3 steps to follow under **Installation Instructions**.
- [URL previews](#url-previews)
- [Troubleshooting Installation](#troubleshooting-installation)


## Choosing your server name

It is important to choose the name for your server before you install Synapse,
Expand All @@ -60,17 +61,14 @@ that your email address is probably `user@example.com` rather than

(Prebuilt packages are available for some platforms - see [Prebuilt packages](#prebuilt-packages).)

When installing from source please make sure that the [Platform-specific prerequisites](#platform-specific-prerequisites) are already installed.

System requirements:

- POSIX-compliant system (tested on Linux & OS X)
- Python 3.5.2 or later, up to Python 3.9.
- At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org

Synapse is written in Python but some of the libraries it uses are written in
C. So before we can install Synapse itself we need a working C compiler and the
header files for Python C extensions. See [Platform-Specific
Instructions](#platform-specific-instructions) for information on installing
these on various platforms.

To install the Synapse homeserver run:

Expand Down Expand Up @@ -128,7 +126,11 @@ source env/bin/activate
synctl start
```

#### Platform-Specific Instructions
#### Platform-specific prerequisites

Synapse is written in Python but some of the libraries it uses are written in
C. So before we can install Synapse itself we need a working C compiler and the
header files for Python C extensions.

##### Debian/Ubuntu/Raspbian

Expand Down Expand Up @@ -526,14 +528,24 @@ email will be disabled.

The easiest way to create a new user is to do so from a client like [Element](https://element.io/).

Alternatively you can do so from the command line if you have installed via pip.

This can be done as follows:

```sh
$ source ~/synapse/env/bin/activate
$ synctl start # if not already running
$ register_new_matrix_user -c homeserver.yaml http://localhost:8008
Alternatively, you can do so from the command line. This can be done as follows:

1. If synapse was installed via pip, activate the virtualenv as follows (if Synapse was
installed via a prebuilt package, `register_new_matrix_user` should already be
on the search path):
```sh
cd ~/synapse
source env/bin/activate
synctl start # if not already running
```
2. Run the following command:
```sh
register_new_matrix_user -c homeserver.yaml http://localhost:8008
```

This will prompt you to add details for the new user, and will then connect to
the running Synapse to create the new user. For example:
```
New user localpart: erikj
Password:
Confirm password:
Expand Down
18 changes: 16 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,15 @@ Testing with SyTest is recommended for verifying that changes related to the
Client-Server API are functioning correctly. See the `installation instructions
<https://github.com/matrix-org/sytest#installing>`_ for details.


Platform dependencies
=====================

Synapse uses a number of platform dependencies such as Python and PostgreSQL,
and aims to follow supported upstream versions. See the
`<docs/deprecation_policy.md>`_ document for more details.


Troubleshooting
===============

Expand Down Expand Up @@ -384,12 +393,17 @@ massive excess of outgoing federation requests (see `discussion
indicate that your server is also issuing far more outgoing federation
requests than can be accounted for by your users' activity, this is a
likely cause. The misbehavior can be worked around by setting
``use_presence: false`` in the Synapse config file.
the following in the Synapse config file:

.. code-block:: yaml
presence:
enabled: false
People can't accept room invitations from me
--------------------------------------------

The typical failure mode here is that you send an invitation to someone
The typical failure mode here is that you send an invitation to someone
to join a room or direct chat, but when they go to accept it, they get an
error (typically along the lines of "Invalid signature"). They might see
something like the following in their logs::
Expand Down
9 changes: 6 additions & 3 deletions UPGRADE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ will log a warning on each received request.

To avoid the warning, administrators using a reverse proxy should ensure that
the reverse proxy sets `X-Forwarded-Proto` header to `https` or `http` to
indicate the protocol used by the client. See the `reverse proxy documentation
<docs/reverse_proxy.md>`_, where the example configurations have been updated to
show how to set this header.
indicate the protocol used by the client.

Synapse also requires the `Host` header to be preserved.

See the `reverse proxy documentation <docs/reverse_proxy.md>`_, where the
example configurations have been updated to show how to set these headers.

(Users of `Caddy <https://caddyserver.com/>`_ are unaffected, since we believe it
sets `X-Forwarded-Proto` by default.)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/8926.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent `synapse_forward_extremities` and `synapse_excess_extremity_events` Prometheus metrics from initially reporting zero-values after startup.
1 change: 0 additions & 1 deletion changelog.d/9411.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9491.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a Synapse module for routing presence updates between users.
1 change: 0 additions & 1 deletion changelog.d/9499.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9585.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9588.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9609.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9631.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9634.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9636.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9637.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9638.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9640.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9643.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9645.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9647.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9685.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
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.
1 change: 1 addition & 0 deletions changelog.d/9686.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve Jaeger tracing for `to_device` messages.
1 change: 1 addition & 0 deletions changelog.d/9691.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `order_by` to the admin API `GET /_synapse/admin/v2/users`. Contributed by @dklimpel.
1 change: 1 addition & 0 deletions changelog.d/9700.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace the `room_invite_state_types` configuration setting with `room_prejoin_state`.
1 change: 1 addition & 0 deletions changelog.d/9710.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Experimental Spaces support: include `m.room.create` in the room state sent with room-invites.
1 change: 1 addition & 0 deletions changelog.d/9711.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix recently added ratelimits to correctly honour the application service `rate_limited` flag.
1 change: 1 addition & 0 deletions changelog.d/9717.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083): restricting room access via group membership.
1 change: 1 addition & 0 deletions changelog.d/9718.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace deprecated `imp` module with successor `importlib`. Contributed by Cristina Muñoz.
1 change: 1 addition & 0 deletions changelog.d/9719.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make the allowed_local_3pids regex example in the sample config stricter.
1 change: 1 addition & 0 deletions changelog.d/9725.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix longstanding bug which caused `duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key"` errors.
1 change: 1 addition & 0 deletions changelog.d/9730.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add type hints to expiring cache.
1 change: 1 addition & 0 deletions changelog.d/9736.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert various testcases to `HomeserverTestCase`.
1 change: 1 addition & 0 deletions changelog.d/9742.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Start linting mypy with `no_implicit_optional`.
1 change: 1 addition & 0 deletions changelog.d/9743.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing type hints to federation handler and server.
1 change: 1 addition & 0 deletions changelog.d/9753.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check that a `ConfigError` is raised, rather than simply `Exception`, when appropriate in homeserver config file generation tests.
2 changes: 1 addition & 1 deletion contrib/purge_api/purge_history.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# this script will use the api:
# https://github.com/matrix-org/synapse/blob/master/docs/admin_api/purge_history_api.rst
Expand Down
2 changes: 1 addition & 1 deletion contrib/purge_api/purge_remote_media.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

DOMAIN=yourserver.tld
# add this user as admin in your home server:
Expand Down
18 changes: 18 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
matrix-synapse-py3 (1.31.0) stable; urgency=medium

* New synapse release 1.31.0.

-- Synapse Packaging team <packages@matrix.org> Tue, 06 Apr 2021 13:08:29 +0100

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

* New synapse release 1.30.1.

-- Synapse Packaging team <packages@matrix.org> Fri, 26 Mar 2021 12:01:28 +0000

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

* New synapse release 1.30.0.

-- Synapse Packaging team <packages@matrix.org> Mon, 22 Mar 2021 13:15:34 +0000

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

[ Jonathan de Jong ]
Expand Down
Loading

0 comments on commit 30f5708

Please sign in to comment.