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

Commit 96fb058

Browse files
committed
Merge tag 'v1.62.0' into beeper-master
Synapse 1.62.0 (2022-07-05) =========================== No significant changes since 1.62.0rc3. Authors of spam-checker plugins should consult the [upgrade notes](https://github.com/matrix-org/synapse/blob/release-v1.62/docs/upgrade.md#upgrading-to-v1620) to learn about the enriched signatures for spam checker callbacks, which are supported with this release of Synapse. Synapse 1.62.0rc3 (2022-07-04) ============================== Bugfixes -------- - Update the version of the [ldap3 plugin](https://github.com/matrix-org/matrix-synapse-ldap3/) included in the `matrixdotorg/synapse` DockerHub images and the Debian packages hosted on `packages.matrix.org` to 0.2.1. This fixes [a bug](matrix-org/matrix-synapse-ldap3#163) with usernames containing uppercase characters. ([\matrix-org#13156](matrix-org#13156)) - Fix a bug introduced in Synapse 1.62.0rc1 affecting unread counts for users on small servers. ([\matrix-org#13168](matrix-org#13168)) Synapse 1.62.0rc2 (2022-07-01) ============================== Bugfixes -------- - Fix unread counts for users on large servers. Introduced in v1.62.0rc1. ([\matrix-org#13140](matrix-org#13140)) - Fix DB performance when deleting old push notifications. Introduced in v1.62.0rc1. ([\matrix-org#13141](matrix-org#13141)) Synapse 1.62.0rc1 (2022-06-28) ============================== Features -------- - Port the spam-checker API callbacks to a new, richer API. This is part of an ongoing change to let spam-checker modules inform users of the reason their event or operation is rejected. ([\matrix-org#12857](matrix-org#12857), [\matrix-org#13047](matrix-org#13047)) - Allow server admins to customise the response of the `/.well-known/matrix/client` endpoint. ([\matrix-org#13035](matrix-org#13035)) - Add metrics measuring the CPU and DB time spent in state resolution. ([\matrix-org#13036](matrix-org#13036)) - Speed up fetching of device list changes in `/sync` and `/keys/changes`. ([\matrix-org#13045](matrix-org#13045), [\matrix-org#13098](matrix-org#13098)) - Improve URL previews for sites which only provide Twitter Card metadata, e.g. LWN.net. ([\matrix-org#13056](matrix-org#13056)) Bugfixes -------- - Update [MSC3786](matrix-org/matrix-spec-proposals#3786) implementation to check `state_key`. ([\matrix-org#12939](matrix-org#12939)) - Fix a bug introduced in Synapse 1.58 where Synapse would not report full version information when installed from a git checkout. This is a best-effort affair and not guaranteed to be stable. ([\matrix-org#12973](matrix-org#12973)) - Fix a bug introduced in Synapse 1.60 where Synapse would fail to start if the `sqlite3` module was not available. ([\matrix-org#12979](matrix-org#12979)) - Fix a bug where non-standard information was required when requesting the `/hierarchy` API over federation. Introduced in Synapse v1.41.0. ([\matrix-org#12991](matrix-org#12991)) - Fix a long-standing bug which meant that rate limiting was not restrictive enough in some cases. ([\matrix-org#13018](matrix-org#13018)) - Fix a bug introduced in Synapse 1.58 where profile requests for a malformed user ID would ccause an internal error. Synapse now returns 400 Bad Request in this situation. ([\matrix-org#13041](matrix-org#13041)) - Fix some inconsistencies in the event authentication code. ([\matrix-org#13087](matrix-org#13087), [\matrix-org#13088](matrix-org#13088)) - Fix a long-standing bug where room directory requests would cause an internal server error if given a malformed room alias. ([\matrix-org#13106](matrix-org#13106)) Improved Documentation ---------------------- - Add documentation for how to configure Synapse with Workers using Docker Compose. Includes example worker config and docker-compose.yaml. Contributed by @Thumbscrew. ([\matrix-org#12737](matrix-org#12737)) - Ensure the [Poetry cheat sheet](https://matrix-org.github.io/synapse/develop/development/dependencies.html) is available in the online documentation. ([\matrix-org#13022](matrix-org#13022)) - Mention removed community/group worker endpoints in upgrade.md. Contributed by @olmari. ([\matrix-org#13023](matrix-org#13023)) - Add instructions for running Complement with `gotestfmt`-formatted output locally. ([\matrix-org#13073](matrix-org#13073)) - Update OpenTracing docs to reference the configuration manual rather than the configuration file. ([\matrix-org#13076](matrix-org#13076)) - Update information on downstream Debian packages. ([\matrix-org#13095](matrix-org#13095)) - Remove documentation for the Delete Group Admin API which no longer exists. ([\matrix-org#13112](matrix-org#13112)) Deprecations and Removals ------------------------- - Remove the unspecced `DELETE /directory/list/room/{roomId}` endpoint, which hid rooms from the [public room directory](https://spec.matrix.org/v1.3/client-server-api/#listing-rooms). Instead, `PUT` to the same URL with a visibility of `"private"`. ([\matrix-org#13123](matrix-org#13123)) Internal Changes ---------------- - Add tests for cancellation of `GET /rooms/$room_id/members` and `GET /rooms/$room_id/state` requests. ([\matrix-org#12674](matrix-org#12674)) - Report login failures due to unknown third party identifiers in the same way as failures due to invalid passwords. This prevents an attacker from using the error response to determine if the identifier exists. Contributed by Daniel Aloni. ([\matrix-org#12738](matrix-org#12738)) - Merge the Complement testing Docker images into a single, multi-purpose image. ([\matrix-org#12881](matrix-org#12881), [\matrix-org#13075](matrix-org#13075)) - Simplify the database schema for `event_edges`. ([\matrix-org#12893](matrix-org#12893)) - Clean up the test code for client disconnection. ([\matrix-org#12929](matrix-org#12929)) - Remove code generating comments in configuration. ([\matrix-org#12941](matrix-org#12941)) - Add `Cross-Origin-Resource-Policy: cross-origin` header to content repository's thumbnail and download endpoints. ([\matrix-org#12944](matrix-org#12944)) - Replace noop background updates with `DELETE` delta. ([\matrix-org#12954](matrix-org#12954), [\matrix-org#13050](matrix-org#13050)) - Use lower isolation level when inserting read receipts to avoid serialization errors. Contributed by Nick @ Beeper. ([\matrix-org#12957](matrix-org#12957)) - Reduce the amount of state we pull from the DB. ([\matrix-org#12963](matrix-org#12963)) - Enable testing against PostgreSQL databases in Complement CI. ([\matrix-org#12965](matrix-org#12965), [\matrix-org#13034](matrix-org#13034)) - Fix an inaccurate comment. ([\matrix-org#12969](matrix-org#12969)) - Remove the `delete_device` method and always call `delete_devices`. ([\matrix-org#12970](matrix-org#12970)) - Use a GitHub form for issues rather than a hard-to-read, easy-to-ignore template. ([\matrix-org#12982](matrix-org#12982)) - Move [MSC3715](matrix-org/matrix-spec-proposals#3715) behind an experimental config flag. ([\matrix-org#12984](matrix-org#12984)) - Add type hints to tests. ([\matrix-org#12985](matrix-org#12985), [\matrix-org#13099](matrix-org#13099)) - Refactor macaroon tokens generation and move the unsubscribe link in notification emails to `/_synapse/client/unsubscribe`. ([\matrix-org#12986](matrix-org#12986)) - Fix documentation for running complement tests. ([\matrix-org#12990](matrix-org#12990)) - Faster joins: add issue links to the TODO comments in the code. ([\matrix-org#13004](matrix-org#13004)) - Reduce DB usage of `/sync` when a large number of unread messages have recently been sent in a room. ([\matrix-org#13005](matrix-org#13005), [\matrix-org#13096](matrix-org#13096), [\matrix-org#13118](matrix-org#13118)) - Replaced usage of PyJWT with methods from Authlib in `org.matrix.login.jwt`. Contributed by Hannes Lerchl. ([\matrix-org#13011](matrix-org#13011)) - Modernize the `contrib/graph/` scripts. ([\matrix-org#13013](matrix-org#13013)) - Remove redundant `room_version` parameters from event auth functions. ([\matrix-org#13017](matrix-org#13017)) - Decouple `synapse.api.auth_blocking.AuthBlocking` from `synapse.api.auth.Auth`. ([\matrix-org#13021](matrix-org#13021)) - Add type annotations to `synapse.storage.databases.main.devices`. ([\matrix-org#13025](matrix-org#13025)) - Set default `sync_response_cache_duration` to two minutes. ([\matrix-org#13042](matrix-org#13042)) - Rename CI test runs. ([\matrix-org#13046](matrix-org#13046)) - Increase timeout of complement CI test runs. ([\matrix-org#13048](matrix-org#13048)) - Refactor entry points so that they all have a `main` function. ([\matrix-org#13052](matrix-org#13052)) - Refactor the Dockerfile-workers configuration script to use Jinja2 templates in Synapse workers' Supervisord blocks. ([\matrix-org#13054](matrix-org#13054)) - Add headers to individual options in config documentation to allow for linking. ([\matrix-org#13055](matrix-org#13055)) - Make Complement CI logs easier to read. ([\matrix-org#13057](matrix-org#13057), [\matrix-org#13058](matrix-org#13058), [\matrix-org#13069](matrix-org#13069)) - Don't instantiate modules with keyword arguments. ([\matrix-org#13060](matrix-org#13060)) - Fix type checking errors against Twisted trunk. ([\matrix-org#13061](matrix-org#13061)) - Allow MSC3030 `timestamp_to_event` calls from anyone on world-readable rooms. ([\matrix-org#13062](matrix-org#13062)) - Add a CI job to check that schema deltas are in the correct folder. ([\matrix-org#13063](matrix-org#13063)) - Avoid rechecking event auth rules which are independent of room state. ([\matrix-org#13065](matrix-org#13065)) - Reduce the duplication of code that invokes the rate limiter. ([\matrix-org#13070](matrix-org#13070)) - Add a Subject Alternative Name to the certificate generated for Complement tests. ([\matrix-org#13071](matrix-org#13071)) - Add more tests for room upgrades. ([\matrix-org#13074](matrix-org#13074)) - Pin dependencies maintained by matrix.org to [semantic version](https://semver.org/) bounds. ([\matrix-org#13082](matrix-org#13082)) - Correctly report prometheus DB stats for `get_earliest_token_for_stats`. ([\matrix-org#13085](matrix-org#13085)) - Fix a long-standing bug where a finished logging context would be re-started when Synapse failed to persist an event from federation. ([\matrix-org#13089](matrix-org#13089)) - Simplify the alias deletion logic as an application service. ([\matrix-org#13093](matrix-org#13093)) - Add type annotations to `tests.test_server`. ([\matrix-org#13124](matrix-org#13124))
2 parents 106eb78 + b51a0f4 commit 96fb058

File tree

225 files changed

+5982
-8396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+5982
-8396
lines changed

.ci/complement_package.gotpl

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{{- /*gotype: github.com/haveyoudebuggedit/gotestfmt/parser.Package*/ -}}
2+
{{- /*
3+
This template contains the format for an individual package. GitHub actions does not currently support nested groups so
4+
we are creating a stylized header for each package.
5+
6+
This template is based on https://github.com/haveyoudebuggedit/gotestfmt/blob/f179b0e462a9dcf7101515d87eec4e4d7e58b92a/.gotestfmt/github/package.gotpl
7+
which is under the Unlicense licence.
8+
*/ -}}
9+
{{- $settings := .Settings -}}
10+
{{- if and (or (not $settings.HideSuccessfulPackages) (ne .Result "PASS")) (or (not $settings.HideEmptyPackages) (ne .Result "SKIP") (ne (len .TestCases) 0)) -}}
11+
{{- if eq .Result "PASS" -}}
12+
{{ "\033" }}[0;32m
13+
{{- else if eq .Result "SKIP" -}}
14+
{{ "\033" }}[0;33m
15+
{{- else -}}
16+
{{ "\033" }}[0;31m
17+
{{- end -}}
18+
📦 {{ .Name }}{{- "\033" }}[0m
19+
{{- with .Coverage -}}
20+
{{- "\033" -}}[0;37m ({{ . }}% coverage){{- "\033" -}}[0m
21+
{{- end -}}
22+
{{- "\n" -}}
23+
{{- with .Reason -}}
24+
{{- " " -}}🛑 {{ . -}}{{- "\n" -}}
25+
{{- end -}}
26+
{{- with .Output -}}
27+
{{- . -}}{{- "\n" -}}
28+
{{- end -}}
29+
{{- with .TestCases -}}
30+
{{- /* Failing tests are first */ -}}
31+
{{- range . -}}
32+
{{- if and (ne .Result "PASS") (ne .Result "SKIP") -}}
33+
::group::{{ "\033" }}[0;31m❌{{ " " }}{{- .Name -}}
34+
{{- "\033" -}}[0;37m ({{if $settings.ShowTestStatus}}{{.Result}}; {{end}}{{ .Duration -}}
35+
{{- with .Coverage -}}
36+
, coverage: {{ . }}%
37+
{{- end -}})
38+
{{- "\033" -}}[0m
39+
{{- "\n" -}}
40+
41+
{{- with .Output -}}
42+
{{- formatTestOutput . $settings -}}
43+
{{- "\n" -}}
44+
{{- end -}}
45+
46+
::endgroup::{{- "\n" -}}
47+
{{- end -}}
48+
{{- end -}}
49+
50+
51+
{{- /* Then skipped tests are second */ -}}
52+
{{- range . -}}
53+
{{- if eq .Result "SKIP" -}}
54+
::group::{{ "\033" }}[0;33m🚧{{ " " }}{{- .Name -}}
55+
{{- "\033" -}}[0;37m ({{if $settings.ShowTestStatus}}{{.Result}}; {{end}}{{ .Duration -}}
56+
{{- with .Coverage -}}
57+
, coverage: {{ . }}%
58+
{{- end -}})
59+
{{- "\033" -}}[0m
60+
{{- "\n" -}}
61+
62+
{{- with .Output -}}
63+
{{- formatTestOutput . $settings -}}
64+
{{- "\n" -}}
65+
{{- end -}}
66+
67+
::endgroup::{{- "\n" -}}
68+
{{- end -}}
69+
{{- end -}}
70+
71+
72+
{{- /* Then passing tests are last */ -}}
73+
{{- range . -}}
74+
{{- if eq .Result "PASS" -}}
75+
::group::{{ "\033" }}[0;32m✅{{ " " }}{{- .Name -}}
76+
{{- "\033" -}}[0;37m ({{if $settings.ShowTestStatus}}{{.Result}}; {{end}}{{ .Duration -}}
77+
{{- with .Coverage -}}
78+
, coverage: {{ . }}%
79+
{{- end -}})
80+
{{- "\033" -}}[0m
81+
{{- "\n" -}}
82+
83+
{{- with .Output -}}
84+
{{- formatTestOutput . $settings -}}
85+
{{- "\n" -}}
86+
{{- end -}}
87+
88+
::endgroup::{{- "\n" -}}
89+
{{- end -}}
90+
{{- end -}}
91+
{{- end -}}
92+
{{- "\n" -}}
93+
{{- end -}}

.ci/scripts/test_old_deps.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ export VIRTUALENV_NO_DOWNLOAD=1
2727

2828
# Patch the project definitions in-place:
2929
# - Replace all lower and tilde bounds with exact bounds
30-
# - Make the pyopenssl 17.0, which is the oldest version that works with
31-
# a `cryptography` compiled against OpenSSL 1.1.
30+
# - Replace all caret bounds---but not the one that defines the supported Python version!
3231
# - Delete all lines referring to psycopg2 --- so no testing of postgres support.
32+
# - Use pyopenssl 17.0, which is the oldest version that works with
33+
# a `cryptography` compiled against OpenSSL 1.1.
3334
# - Omit systemd: we're not logging to journal here.
3435

3536
# TODO: also replace caret bounds, see https://python-poetry.org/docs/dependency-specification/#version-constraints
@@ -40,6 +41,7 @@ export VIRTUALENV_NO_DOWNLOAD=1
4041

4142
sed -i \
4243
-e "s/[~>]=/==/g" \
44+
-e '/^python = "^/!s/\^/==/g' \
4345
-e "/psycopg2/d" \
4446
-e 's/pyOpenSSL = "==16.0.0"/pyOpenSSL = "==17.0.0"/' \
4547
-e '/systemd/d' \

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
**THIS IS NOT A SUPPORT CHANNEL!**
8+
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**, please ask in **[#synapse:matrix.org](https://matrix.to/#/#synapse:matrix.org)** (using a matrix.org account if necessary).
9+
10+
If you want to report a security issue, please see https://matrix.org/security-disclosure-policy/
11+
12+
This is a bug report form. By following the instructions below and completing the sections with your information, you will help the us to get all the necessary data to fix your issue.
13+
14+
You can also preview your report before submitting it.
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Description
19+
description: Describe the problem that you are experiencing
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: reproduction_steps
24+
attributes:
25+
label: Steps to reproduce
26+
description: |
27+
Describe the series of steps that leads you to the problem.
28+
29+
Describe how what happens differs from what you expected.
30+
placeholder: Tell us what you see!
31+
value: |
32+
- list the steps
33+
- that reproduce the bug
34+
- using hyphens as bullet points
35+
validations:
36+
required: true
37+
- type: markdown
38+
attributes:
39+
value: |
40+
---
41+
42+
**IMPORTANT**: please answer the following questions, to help us narrow down the problem.
43+
- type: input
44+
id: homeserver
45+
attributes:
46+
label: Homeserver
47+
description: Which homeserver was this issue identified on? (matrix.org, another homeserver, etc)
48+
validations:
49+
required: true
50+
- type: input
51+
id: version
52+
attributes:
53+
label: Synapse Version
54+
description: |
55+
What version of Synapse is this homeserver running?
56+
57+
You can find the Synapse version by visiting https://yourserver.example.com/_matrix/federation/v1/version
58+
59+
or with this command:
60+
61+
```
62+
$ curl http://localhost:8008/_synapse/admin/v1/server_version
63+
```
64+
65+
(You may need to replace `localhost:8008` if Synapse is not configured to listen on that port.)
66+
validations:
67+
required: true
68+
- type: dropdown
69+
id: install_method
70+
attributes:
71+
label: Installation Method
72+
options:
73+
- Docker (matrixdotorg/synapse)
74+
- Debian packages from packages.matrix.org
75+
- pip (from PyPI)
76+
- Other (please mention below)
77+
- type: textarea
78+
id: platform
79+
attributes:
80+
label: Platform
81+
description: |
82+
Tell us about the environment in which your homeserver is operating...
83+
e.g. distro, hardware, if it's running in a vm/container, etc.
84+
validations:
85+
required: true
86+
- type: textarea
87+
id: logs
88+
attributes:
89+
label: Relevant log output
90+
description: |
91+
Please copy and paste any relevant log output, ideally at INFO or DEBUG log level.
92+
This will be automatically formatted into code, so there is no need for backticks.
93+
94+
Please be careful to remove any personal or private data.
95+
96+
**Bug reports are usually very difficult to diagnose without logging.**
97+
render: shell
98+
validations:
99+
required: true
100+
- type: textarea
101+
id: anything_else
102+
attributes:
103+
label: Anything else that would be useful to know?

.github/workflows/tests.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ jobs:
1919
- run: scripts-dev/generate_sample_config.sh --check
2020
- run: scripts-dev/config-lint.sh
2121

22+
check-schema-delta:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-python@v2
27+
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
28+
- run: scripts-dev/check_schema_delta.py --force-colors
29+
2230
lint:
2331
uses: "matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v1"
2432
with:
@@ -48,7 +56,7 @@ jobs:
4856
# Dummy step to gate other tests on without repeating the whole list
4957
linting-done:
5058
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
51-
needs: [lint, lint-crlf, lint-newsfile, check-sampleconfig]
59+
needs: [lint, lint-crlf, lint-newsfile, check-sampleconfig, check-schema-delta]
5260
runs-on: ubuntu-latest
5361
steps:
5462
- run: "true"
@@ -310,6 +318,16 @@ jobs:
310318
needs: linting-done
311319
runs-on: ubuntu-latest
312320

321+
strategy:
322+
fail-fast: false
323+
matrix:
324+
include:
325+
- arrangement: monolith
326+
database: SQLite
327+
328+
- arrangement: monolith
329+
database: Postgres
330+
313331
steps:
314332
# 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.
315333
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
@@ -330,14 +348,19 @@ jobs:
330348
with:
331349
path: synapse
332350

351+
- name: "Install custom gotestfmt template"
352+
run: |
353+
mkdir .gotestfmt/github -p
354+
cp synapse/.ci/complement_package.gotpl .gotestfmt/github/package.gotpl
355+
333356
# Attempt to check out the same branch of Complement as the PR. If it
334357
# doesn't exist, fallback to HEAD.
335358
- name: Checkout complement
336359
run: synapse/.ci/scripts/checkout_complement.sh
337360

338361
- run: |
339362
set -o pipefail
340-
COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | gotestfmt
363+
POSTGRES=${{ (matrix.database == 'Postgres') && 1 || '' }} COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | gotestfmt
341364
shell: bash
342365
name: Run Complement Tests
343366
@@ -348,6 +371,8 @@ jobs:
348371
if: "${{ !failure() && !cancelled() && (github.ref == 'refs/heads/develop') }}"
349372
needs: linting-done
350373
runs-on: ubuntu-latest
374+
375+
name: "Complement Workers (develop only)"
351376

352377
steps:
353378
# 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.
@@ -361,14 +386,19 @@ jobs:
361386
362387
- name: "Install Complement Dependencies"
363388
run: |
364-
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
389+
sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev
365390
go get -v github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest
366391
367392
- name: Run actions/checkout@v2 for synapse
368393
uses: actions/checkout@v2
369394
with:
370395
path: synapse
371396

397+
- name: "Install custom gotestfmt template"
398+
run: |
399+
mkdir .gotestfmt/github -p
400+
cp synapse/.ci/complement_package.gotpl .gotestfmt/github/package.gotpl
401+
372402
# Attempt to check out the same branch of Complement as the PR. If it
373403
# doesn't exist, fallback to HEAD.
374404
- name: Checkout complement

0 commit comments

Comments
 (0)