Skip to content

Commit

Permalink
Merge tag 'v1.52.0'
Browse files Browse the repository at this point in the history
Synapse 1.52.0 (2022-02-08)
===========================

No significant changes since 1.52.0rc1.

During the making of this release, the developers of Twisted have released
[Twisted 22.1.0](https://github.com/twisted/twisted/releases/tag/twisted-22.1.0), which
fixes [a security issue](GHSA-92x2-jw7w-xvvx)
within Twisted. We do not believe Synapse to be vulnerable to any security problem caused
by this issue, though we advise server administrators to update their local version of
Twisted if they can.

Synapse 1.52.0rc1 (2022-02-01)
==============================

Features
--------

- Remove account data (including client config, push rules and ignored users) upon user deactivation. ([\matrix-org#11621](matrix-org#11621), [\matrix-org#11788](matrix-org#11788), [\matrix-org#11789](matrix-org#11789))
- Add an admin API to reset connection timeouts for remote server. ([\matrix-org#11639](matrix-org#11639))
- Add an admin API to get a list of rooms that federate with a given remote homeserver. ([\matrix-org#11658](matrix-org#11658))
- Add a config flag to inhibit `M_USER_IN_USE` during registration. ([\matrix-org#11743](matrix-org#11743))
- Add a module callback to set username at registration. ([\matrix-org#11790](matrix-org#11790))
- Allow configuring a maximum file size as well as a list of allowed content types for avatars. ([\matrix-org#11846](matrix-org#11846))

Bugfixes
--------

- Include the bundled aggregations in the `/sync` response, per [MSC2675](matrix-org/matrix-spec-proposals#2675). ([\matrix-org#11612](matrix-org#11612))
- Fix a long-standing bug when previewing Reddit URLs which do not contain an image. ([\matrix-org#11767](matrix-org#11767))
- Fix a long-standing bug that media streams could cause long-lived connections when generating URL previews. ([\matrix-org#11784](matrix-org#11784))
- Include a `prev_content` field in state events sent to Application Services. Contributed by @totallynotvaishnav. ([\matrix-org#11798](matrix-org#11798))
- Fix a bug introduced in Synapse 0.33.3 causing requests to sometimes log strings such as `HTTPStatus.OK` instead of integer status codes. ([\matrix-org#11827](matrix-org#11827))

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

- Update pypi installation docs to indicate that we now support Python 3.10. ([\matrix-org#11820](matrix-org#11820))
- Add missing steps to the contribution submission process in the documentation.  Contributed by @sequentialread. ([\matrix-org#11821](matrix-org#11821))
- Remove not needed old table of contents in documentation. ([\matrix-org#11860](matrix-org#11860))
- Consolidate the `access_token` information at the top of each relevant page in the Admin API documentation. ([\matrix-org#11861](matrix-org#11861))

Deprecations and Removals
-------------------------

- Drop support for Python 3.6, which is EOL. ([\matrix-org#11683](matrix-org#11683))
- Remove the `experimental_msc1849_support_enabled` flag as the features are now stable. ([\matrix-org#11843](matrix-org#11843))

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

- Preparation for database schema simplifications: add `state_key` and `rejection_reason` columns to `events` table. ([\matrix-org#11792](matrix-org#11792))
- Add `FrozenEvent.get_state_key` and use it in a couple of places. ([\matrix-org#11793](matrix-org#11793))
- Preparation for database schema simplifications: stop reading from `event_reference_hashes`. ([\matrix-org#11794](matrix-org#11794))
- Drop unused table `public_room_list_stream`. ([\matrix-org#11795](matrix-org#11795))
- Preparation for reducing Postgres serialization errors: allow setting transaction isolation level. Contributed by Nick @ Beeper. ([\matrix-org#11799](matrix-org#11799), [\matrix-org#11847](matrix-org#11847))
- Docker: skip the initial amd64-only build and go straight to multiarch. ([\matrix-org#11810](matrix-org#11810))
- Run Complement on the Github Actions VM and not inside a Docker container. ([\matrix-org#11811](matrix-org#11811))
- Log module names at startup. ([\matrix-org#11813](matrix-org#11813))
- Improve type safety of bundled aggregations code. ([\matrix-org#11815](matrix-org#11815))
- Correct a type annotation in the event validation logic. ([\matrix-org#11817](matrix-org#11817), [\matrix-org#11830](matrix-org#11830))
- Minor updates and documentation for database schema delta files. ([\matrix-org#11823](matrix-org#11823))
- Workaround a type annotation problem in `prometheus_client` 0.13.0. ([\matrix-org#11834](matrix-org#11834))
- Minor performance improvement in room state lookup. ([\matrix-org#11836](matrix-org#11836))
- Fix some indentation inconsistencies in the sample config. ([\matrix-org#11838](matrix-org#11838))
- Add type hints to `tests/rest/admin`. ([\matrix-org#11851](matrix-org#11851))
  • Loading branch information
bradtgmurray committed Feb 8, 2022
2 parents 2b6542e + 5cdd491 commit b888ead
Show file tree
Hide file tree
Showing 102 changed files with 2,759 additions and 815 deletions.
8 changes: 5 additions & 3 deletions .ci/scripts/test_old_deps.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash

# this script is run by GitHub Actions in a plain `bionic` container; it installs the
# this script is run by GitHub Actions in a plain `focal` container; it installs the
# minimal requirements for tox and hands over to the py3-old tox environment.

# Prevent tzdata from asking for user input
export DEBIAN_FRONTEND=noninteractive

set -ex

apt-get update
apt-get install -y python3 python3-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
apt-get install -y python3 python3-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox libjpeg-dev libwebp-dev

export LANG="C.UTF-8"

Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# TODO: consider using https://github.com/docker/metadata-action instead of this
# custom magic
- name: Calculate docker image tag
id: set-tag
run: |
Expand All @@ -53,18 +55,6 @@ jobs:
esac
echo "::set-output name=tag::$tag"
# for release builds, we want to get the amd64 image out asap, so first
# we do an amd64-only build, before following up with a multiarch build.
- name: Build and push amd64
uses: docker/build-push-action@v2
if: "${{ startsWith(github.ref, 'refs/tags/v') }}"
with:
push: true
labels: "gitsha1=${{ github.sha }}"
tags: "matrixdotorg/synapse:${{ steps.set-tag.outputs.tag }}"
file: "docker/Dockerfile"
platforms: linux/amd64

- name: Build and push all platforms
uses: docker/build-push-action@v2
with:
Expand Down
36 changes: 22 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Test with old deps
uses: docker://ubuntu:bionic # For old python and sqlite
uses: docker://ubuntu:focal # For old python and sqlite
with:
workdir: /github/workspace
entrypoint: .ci/scripts/test_old_deps.sh
Expand Down Expand Up @@ -213,15 +213,15 @@ jobs:
fail-fast: false
matrix:
include:
- sytest-tag: bionic
- sytest-tag: focal

- sytest-tag: bionic
- sytest-tag: focal
postgres: postgres

- sytest-tag: testing
postgres: postgres

- sytest-tag: bionic
- sytest-tag: focal
postgres: multi-postgres
workers: workers

Expand Down Expand Up @@ -323,17 +323,22 @@ jobs:
if: ${{ !failure() && !cancelled() }}
needs: linting-done
runs-on: ubuntu-latest
container:
# https://github.com/matrix-org/complement/blob/master/dockerfiles/ComplementCIBuildkite.Dockerfile
image: matrixdotorg/complement:latest
env:
CI: true
ports:
- 8448:8448
volumes:
- /var/run/docker.sock:/var/run/docker.sock

steps:
# The path is set via a file given by $GITHUB_PATH. We need both Go 1.17 and GOPATH on the path to run Complement.
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
- name: "Set Go Version"
run: |
# Add Go 1.17 to the PATH: see https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-2
echo "$GOROOT_1_17_X64/bin" >> $GITHUB_PATH
# Add the Go path to the PATH: We need this so we can call gotestfmt
echo "~/go/bin" >> $GITHUB_PATH
- name: "Install Complement Dependencies"
run: |
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
go get -v github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest
- name: Run actions/checkout@v2 for synapse
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -376,8 +381,11 @@ jobs:
working-directory: complement/dockerfiles

# Run Complement
- run: set -o pipefail && go test -v -json -tags synapse_blacklist,msc2403 ./tests/... 2>&1 | gotestfmt
- run: |
set -o pipefail
go test -v -json -tags synapse_blacklist,msc2403 ./tests/... 2>&1 | gotestfmt
shell: bash
name: Run Complement Tests
env:
COMPLEMENT_BASE_IMAGE: complement-synapse:latest
working-directory: complement
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/twisted_trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- run: sudo apt-get -qq install xmlsec1
- uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7
- run: .ci/patch_for_twisted_trunk.sh
- run: pip install tox
- run: tox -e py
Expand Down
86 changes: 85 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,82 @@
Synapse 1.52.0 (2022-02-08)
===========================

No significant changes since 1.52.0rc1.

During the making of this release, the developers of Twisted have released
[Twisted 22.1.0](https://github.com/twisted/twisted/releases/tag/twisted-22.1.0), which
fixes [a security issue](https://github.com/twisted/twisted/security/advisories/GHSA-92x2-jw7w-xvvx)
within Twisted. We do not believe Synapse to be vulnerable to any security problem caused
by this issue, though we advise server administrators to update their local version of
Twisted if they can.


Synapse 1.52.0rc1 (2022-02-01)
==============================

Features
--------

- Remove account data (including client config, push rules and ignored users) upon user deactivation. ([\#11621](https://github.com/matrix-org/synapse/issues/11621), [\#11788](https://github.com/matrix-org/synapse/issues/11788), [\#11789](https://github.com/matrix-org/synapse/issues/11789))
- Add an admin API to reset connection timeouts for remote server. ([\#11639](https://github.com/matrix-org/synapse/issues/11639))
- Add an admin API to get a list of rooms that federate with a given remote homeserver. ([\#11658](https://github.com/matrix-org/synapse/issues/11658))
- Add a config flag to inhibit `M_USER_IN_USE` during registration. ([\#11743](https://github.com/matrix-org/synapse/issues/11743))
- Add a module callback to set username at registration. ([\#11790](https://github.com/matrix-org/synapse/issues/11790))
- Allow configuring a maximum file size as well as a list of allowed content types for avatars. ([\#11846](https://github.com/matrix-org/synapse/issues/11846))


Bugfixes
--------

- Include the bundled aggregations in the `/sync` response, per [MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675). ([\#11612](https://github.com/matrix-org/synapse/issues/11612))
- Fix a long-standing bug when previewing Reddit URLs which do not contain an image. ([\#11767](https://github.com/matrix-org/synapse/issues/11767))
- Fix a long-standing bug that media streams could cause long-lived connections when generating URL previews. ([\#11784](https://github.com/matrix-org/synapse/issues/11784))
- Include a `prev_content` field in state events sent to Application Services. Contributed by @totallynotvaishnav. ([\#11798](https://github.com/matrix-org/synapse/issues/11798))
- Fix a bug introduced in Synapse 0.33.3 causing requests to sometimes log strings such as `HTTPStatus.OK` instead of integer status codes. ([\#11827](https://github.com/matrix-org/synapse/issues/11827))


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

- Update pypi installation docs to indicate that we now support Python 3.10. ([\#11820](https://github.com/matrix-org/synapse/issues/11820))
- Add missing steps to the contribution submission process in the documentation. Contributed by @sequentialread. ([\#11821](https://github.com/matrix-org/synapse/issues/11821))
- Remove not needed old table of contents in documentation. ([\#11860](https://github.com/matrix-org/synapse/issues/11860))
- Consolidate the `access_token` information at the top of each relevant page in the Admin API documentation. ([\#11861](https://github.com/matrix-org/synapse/issues/11861))


Deprecations and Removals
-------------------------

- Drop support for Python 3.6, which is EOL. ([\#11683](https://github.com/matrix-org/synapse/issues/11683))
- Remove the `experimental_msc1849_support_enabled` flag as the features are now stable. ([\#11843](https://github.com/matrix-org/synapse/issues/11843))


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

- Preparation for database schema simplifications: add `state_key` and `rejection_reason` columns to `events` table. ([\#11792](https://github.com/matrix-org/synapse/issues/11792))
- Add `FrozenEvent.get_state_key` and use it in a couple of places. ([\#11793](https://github.com/matrix-org/synapse/issues/11793))
- Preparation for database schema simplifications: stop reading from `event_reference_hashes`. ([\#11794](https://github.com/matrix-org/synapse/issues/11794))
- Drop unused table `public_room_list_stream`. ([\#11795](https://github.com/matrix-org/synapse/issues/11795))
- Preparation for reducing Postgres serialization errors: allow setting transaction isolation level. Contributed by Nick @ Beeper. ([\#11799](https://github.com/matrix-org/synapse/issues/11799), [\#11847](https://github.com/matrix-org/synapse/issues/11847))
- Docker: skip the initial amd64-only build and go straight to multiarch. ([\#11810](https://github.com/matrix-org/synapse/issues/11810))
- Run Complement on the Github Actions VM and not inside a Docker container. ([\#11811](https://github.com/matrix-org/synapse/issues/11811))
- Log module names at startup. ([\#11813](https://github.com/matrix-org/synapse/issues/11813))
- Improve type safety of bundled aggregations code. ([\#11815](https://github.com/matrix-org/synapse/issues/11815))
- Correct a type annotation in the event validation logic. ([\#11817](https://github.com/matrix-org/synapse/issues/11817), [\#11830](https://github.com/matrix-org/synapse/issues/11830))
- Minor updates and documentation for database schema delta files. ([\#11823](https://github.com/matrix-org/synapse/issues/11823))
- Workaround a type annotation problem in `prometheus_client` 0.13.0. ([\#11834](https://github.com/matrix-org/synapse/issues/11834))
- Minor performance improvement in room state lookup. ([\#11836](https://github.com/matrix-org/synapse/issues/11836))
- Fix some indentation inconsistencies in the sample config. ([\#11838](https://github.com/matrix-org/synapse/issues/11838))
- Add type hints to `tests/rest/admin`. ([\#11851](https://github.com/matrix-org/synapse/issues/11851))


Synapse 1.51.0 (2022-01-25)
===========================

No significant changes since 1.51.0rc2.

Synapse 1.51.0 deprecates `webclient` listeners and non-HTTP(S) `web_client_location`s. Support for these will be removed in Synapse 1.53.0, at which point Synapse will not be capable of directly serving a web client for Matrix.
Synapse 1.51.0 deprecates `webclient` listeners and non-HTTP(S) `web_client_location`s. Support for these will be removed in Synapse 1.53.0, at which point Synapse will not be capable of directly serving a web client for Matrix. See the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1510).

Synapse 1.51.0rc2 (2022-01-24)
==============================
Expand All @@ -14,6 +87,17 @@ Bugfixes
- Fix a bug introduced in Synapse 1.40.0 that caused Synapse to fail to process incoming federation traffic after handling a large amount of events in a v1 room. ([\#11806](https://github.com/matrix-org/synapse/issues/11806))


Synapse 1.50.2 (2022-01-24)
===========================

This release includes the same bugfix as Synapse 1.51.0rc2.

Bugfixes
--------

- Fix a bug introduced in Synapse 1.40.0 that caused Synapse to fail to process incoming federation traffic after handling a large amount of events in a v1 room. ([\#11806](https://github.com/matrix-org/synapse/issues/11806))


Synapse 1.51.0rc1 (2022-01-21)
==============================

Expand Down
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
matrix-synapse-py3 (1.52.0) stable; urgency=medium

* New synapse release 1.52.0.

-- Synapse Packaging team <[email protected]> Tue, 08 Feb 2022 11:34:54 +0000

matrix-synapse-py3 (1.52.0~rc1) stable; urgency=medium

* New synapse release 1.52.0~rc1.

-- Synapse Packaging team <[email protected]> Tue, 01 Feb 2022 11:04:09 +0000

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

* New synapse release 1.51.0.
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-pgtests
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use the Sytest image that comes with a lot of the build dependencies
# pre-installed
FROM matrixdotorg/sytest:bionic
FROM matrixdotorg/sytest:focal

# The Sytest image doesn't come with python, so install that
RUN apt-get update && apt-get -qq install -y python3 python3-dev python3-pip
Expand Down
2 changes: 1 addition & 1 deletion docker/run_pg_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ sudo -u postgres /usr/lib/postgresql/10/bin/pg_ctl -w -D /var/lib/postgresql/dat
# Run the tests
cd /src
export TRIAL_FLAGS="-j 4"
tox --workdir=./.tox-pg-container -e py36-postgres "$@"
tox --workdir=./.tox-pg-container -e py37-postgres "$@"
21 changes: 0 additions & 21 deletions docs/MSC1711_certificates_FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,6 @@ For more details and context on the release of the r0.1 Server/Server API and
imminent Matrix 1.0 release, you can also see our
[main talk from FOSDEM 2019](https://matrix.org/blog/2019/02/04/matrix-at-fosdem-2019/).

## Contents
* Timeline
* Configuring certificates for compatibility with Synapse 1.0
* FAQ
* Synapse 0.99.0 has just been released, what do I need to do right now?
* How do I upgrade?
* What will happen if I do not set up a valid federation certificate
immediately?
* What will happen if I do nothing at all?
* When do I need a SRV record or .well-known URI?
* Can I still use an SRV record?
* I have created a .well-known URI. Do I still need an SRV record?
* It used to work just fine, why are you breaking everything?
* Can I manage my own certificates rather than having Synapse renew
certificates itself?
* Do you still recommend against using a reverse proxy on the federation port?
* Do I still need to give my TLS certificates to Synapse if I am using a
reverse proxy?
* Do I need the same certificate for the client and federation port?
* How do I tell Synapse to reload my keys/certificates after I replace them?

## Timeline

**5th Feb 2019 - Synapse 0.99.0 is released.**
Expand Down
3 changes: 3 additions & 0 deletions docs/admin_api/account_validity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ This API allows a server administrator to manage the validity of an account. To
use it, you must enable the account validity feature (under
`account_validity`) in Synapse's configuration.

To use it, you will need to authenticate by providing an `access_token`
for a server admin: see [Admin API](../usage/administration/admin_api).

## Renew account

This API extends the validity of an account by as much time as configured in the
Expand Down
6 changes: 3 additions & 3 deletions docs/admin_api/delete_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This API lets a server admin delete a local group. Doing so will kick all
users out of the group so that their clients will correctly handle the group
being deleted.

To use it, you will need to authenticate by providing an `access_token`
for a server admin: see [Admin API](../usage/administration/admin_api).

The API is:

```
POST /_synapse/admin/v1/delete_group/<group_id>
```

To use it, you will need to authenticate by providing an `access_token` for a
server admin: see [Admin API](../usage/administration/admin_api).
7 changes: 3 additions & 4 deletions docs/admin_api/event_reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

This API returns information about reported events.

To use it, you will need to authenticate by providing an `access_token`
for a server admin: see [Admin API](../usage/administration/admin_api).

The api is:
```
GET /_synapse/admin/v1/event_reports?from=0&limit=10
```
To use it, you will need to authenticate by providing an `access_token` for a
server admin: see [Admin API](../usage/administration/admin_api).

It returns a JSON body like the following:

Expand Down Expand Up @@ -94,8 +95,6 @@ The api is:
```
GET /_synapse/admin/v1/event_reports/<report_id>
```
To use it, you will need to authenticate by providing an `access_token` for a
server admin: see [Admin API](../usage/administration/admin_api).

It returns a JSON body like the following:

Expand Down
25 changes: 3 additions & 22 deletions docs/admin_api/media_admin_api.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
# Contents
- [Querying media](#querying-media)
* [List all media in a room](#list-all-media-in-a-room)
* [List all media uploaded by a user](#list-all-media-uploaded-by-a-user)
- [Quarantine media](#quarantine-media)
* [Quarantining media by ID](#quarantining-media-by-id)
* [Remove media from quarantine by ID](#remove-media-from-quarantine-by-id)
* [Quarantining media in a room](#quarantining-media-in-a-room)
* [Quarantining all media of a user](#quarantining-all-media-of-a-user)
* [Protecting media from being quarantined](#protecting-media-from-being-quarantined)
* [Unprotecting media from being quarantined](#unprotecting-media-from-being-quarantined)
- [Delete local media](#delete-local-media)
* [Delete a specific local media](#delete-a-specific-local-media)
* [Delete local media by date or size](#delete-local-media-by-date-or-size)
* [Delete media uploaded by a user](#delete-media-uploaded-by-a-user)
- [Purge Remote Media API](#purge-remote-media-api)

# Querying media

These APIs allow extracting media information from the homeserver.

To use it, you will need to authenticate by providing an `access_token`
for a server admin: see [Admin API](../usage/administration/admin_api).

## List all media in a room

This API gets a list of known media in a room.
Expand All @@ -28,8 +14,6 @@ The API is:
```
GET /_synapse/admin/v1/room/<room_id>/media
```
To use it, you will need to authenticate by providing an `access_token` for a
server admin: see [Admin API](../usage/administration/admin_api).

The API returns a JSON body like the following:
```json
Expand Down Expand Up @@ -317,8 +301,5 @@ The following fields are returned in the JSON response body:

* `deleted`: integer - The number of media items successfully deleted

To use it, you will need to authenticate by providing an `access_token` for a
server admin: see [Admin API](../usage/administration/admin_api).

If the user re-requests purged remote media, synapse will re-request the media
from the originating server.
Loading

0 comments on commit b888ead

Please sign in to comment.