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

Commit 844c458

Browse files
committed
Merge tag 'v1.72.0' into merge-v1.72
Synapse 1.72.0 (2022-11-22) =========================== Please note that Synapse now only supports PostgreSQL 11+, because PostgreSQL 10 has reached end-of-life, c.f. our [Deprecation Policy](https://github.com/matrix-org/synapse/blob/develop/docs/deprecation_policy.md). Bugfixes -------- - Update forgotten references to legacy metrics in the included Grafana dashboard. ([\matrix-org#14477](matrix-org#14477)) Synapse 1.72.0rc1 (2022-11-16) ============================== Features -------- - Add experimental support for [MSC3912](matrix-org/matrix-spec-proposals#3912): Relation-based redactions. ([\matrix-org#14260](matrix-org#14260)) - Build Debian packages for Ubuntu 22.10 (Kinetic Kudu). ([\matrix-org#14396](matrix-org#14396)) - Add an [Admin API](https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/index.html) endpoint for user lookup based on third-party ID (3PID). Contributed by @ashfame. ([\matrix-org#14405](matrix-org#14405)) - Faster joins: include heroes' membership events in the partial join response, for rooms without a name or canonical alias. ([\matrix-org#14442](matrix-org#14442)) Bugfixes -------- - Faster joins: do not block creation of or queries for room aliases during the resync. ([\matrix-org#14292](matrix-org#14292)) - Fix a bug introduced in Synapse 1.64.0rc1 which could cause log spam when fetching events from other homeservers. ([\matrix-org#14347](matrix-org#14347)) - Fix a bug introduced in 1.66 which would not send certain pushrules to clients. Contributed by Nico. ([\matrix-org#14356](matrix-org#14356)) - Fix a bug introduced in v1.71.0rc1 where the power level event was incorrectly created during initial room creation. ([\matrix-org#14361](matrix-org#14361)) - Fix the refresh token endpoint to be under /r0 and /v3 instead of /v1. Contributed by Tulir @ Beeper. ([\matrix-org#14364](matrix-org#14364)) - Fix a long-standing bug where Synapse would raise an error when encountering an unrecognised field in a `/sync` filter, instead of ignoring it for forward compatibility. ([\matrix-org#14369](matrix-org#14369)) - Fix a background database update, introduced in Synapse 1.64.0, which could cause poor database performance. ([\matrix-org#14374](matrix-org#14374)) - Fix PostgreSQL sometimes using table scans for queries against the `event_search` table, taking a long time and a large amount of IO. ([\matrix-org#14409](matrix-org#14409)) - Fix rendering of some HTML templates (including emails). Introduced in v1.71.0. ([\matrix-org#14448](matrix-org#14448)) - Fix a bug introduced in Synapse 1.70.0 where the background updates to add non-thread unique indexes on receipts could fail when upgrading from 1.67.0 or earlier. ([\matrix-org#14453](matrix-org#14453)) Updates to the Docker image --------------------------- - Add all Stream Writer worker types to `configure_workers_and_start.py`. ([\matrix-org#14197](matrix-org#14197)) - Remove references to legacy worker types in the multi-worker Dockerfile. ([\matrix-org#14294](matrix-org#14294)) Improved Documentation ---------------------- - Upload documentation PRs to Netlify. ([\matrix-org#12947](matrix-org#12947), [\matrix-org#14370](matrix-org#14370)) - Add addtional TURN server configuration example based on [eturnal](https://github.com/processone/eturnal) and adjust general TURN server doc structure. ([\matrix-org#14293](matrix-org#14293)) - Add example on how to load balance /sync requests. Contributed by [aceArt](https://aceart.de). ([\matrix-org#14297](matrix-org#14297)) - Edit sample Nginx reverse proxy configuration to use HTTP/1.1. Contributed by Brad Jones. ([\matrix-org#14414](matrix-org#14414)) Deprecations and Removals ------------------------- - Remove support for PostgreSQL 10. ([\matrix-org#14392](matrix-org#14392), [\matrix-org#14397](matrix-org#14397)) Internal Changes ---------------- - Run unit tests against Python 3.11. ([\matrix-org#13812](matrix-org#13812)) - Add TLS support for generic worker endpoints. ([\matrix-org#14128](matrix-org#14128), [\matrix-org#14455](matrix-org#14455)) - Switch to a maintained action for installing Rust in CI. ([\matrix-org#14313](matrix-org#14313)) - Add override ability to `complement.sh` command line script to request certain types of workers. ([\matrix-org#14324](matrix-org#14324)) - Enabling testing of [MSC3874](matrix-org/matrix-spec-proposals#3874) (filtering of `/messages` by relation type) in complement. ([\matrix-org#14339](matrix-org#14339)) - Concisely log a failure to resolve state due to missing `prev_events`. ([\matrix-org#14346](matrix-org#14346)) - Use a maintained Github action to install Rust. ([\matrix-org#14351](matrix-org#14351)) - Cleanup old worker datastore classes. Contributed by Nick @ Beeper (@Fizzadar). ([\matrix-org#14375](matrix-org#14375)) - Test against PostgreSQL 15 in CI. ([\matrix-org#14394](matrix-org#14394)) - Remove unreachable code. ([\matrix-org#14410](matrix-org#14410)) - Clean-up event persistence code. ([\matrix-org#14411](matrix-org#14411)) - Update docstring to clarify that `get_partial_state_events_batch` does not just give you completely arbitrary partial-state events. ([\matrix-org#14417](matrix-org#14417)) - Fix mypy errors introduced by bumping the locked version of `attrs` and `gitpython`. ([\matrix-org#14433](matrix-org#14433)) - Make Dependabot only bump Rust deps in the lock file. ([\matrix-org#14434](matrix-org#14434)) - Fix an incorrect stub return type for `PushRuleEvaluator.run`. ([\matrix-org#14451](matrix-org#14451)) - Improve performance of `/context` in large rooms. ([\matrix-org#14461](matrix-org#14461))
2 parents abe8aef + ececb2d commit 844c458

File tree

112 files changed

+3747
-1530
lines changed

Some content is hidden

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

112 files changed

+3747
-1530
lines changed

.ci/scripts/calculate_jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def set_output(key: str, value: str):
5454
{
5555
"python-version": "3.7",
5656
"database": "postgres",
57-
"postgres-version": "10",
57+
"postgres-version": "11",
5858
"extras": "all",
5959
}
6060
]
@@ -64,7 +64,7 @@ def set_output(key: str, value: str):
6464
{
6565
"python-version": "3.11",
6666
"database": "postgres",
67-
"postgres-version": "14",
67+
"postgres-version": "15",
6868
"extras": "all",
6969
}
7070
)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy documentation PR preview
2+
3+
on:
4+
workflow_run:
5+
workflows: [ "Prepare documentation PR preview" ]
6+
types:
7+
- completed
8+
9+
jobs:
10+
netlify:
11+
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
12+
runs-on: ubuntu-latest
13+
steps:
14+
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
15+
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
16+
- name: 📥 Download artifact
17+
uses: dawidd6/action-download-artifact@e6e25ac3a2b93187502a8be1ef9e9603afc34925 # v2.24.2
18+
with:
19+
workflow: docs-pr.yaml
20+
run_id: ${{ github.event.workflow_run.id }}
21+
name: book
22+
path: book
23+
24+
- name: 📤 Deploy to Netlify
25+
uses: matrix-org/netlify-pr-preview@v1
26+
with:
27+
path: book
28+
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
29+
branch: ${{ github.event.workflow_run.head_branch }}
30+
revision: ${{ github.event.workflow_run.head_sha }}
31+
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
32+
site_id: ${{ secrets.NETLIFY_SITE_ID }}
33+
desc: Documentation preview
34+
deployment_env: PR Documentation Preview

.github/workflows/docs-pr.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Prepare documentation PR preview
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- docs/**
7+
8+
jobs:
9+
pages:
10+
name: GitHub Pages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Setup mdbook
16+
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
17+
with:
18+
mdbook-version: '0.4.17'
19+
20+
- name: Build the documentation
21+
# mdbook will only create an index.html if we're including docs/README.md in SUMMARY.md.
22+
# However, we're using docs/README.md for other purposes and need to pick a new page
23+
# as the default. Let's opt for the welcome page instead.
24+
run: |
25+
mdbook build
26+
cp book/welcome_and_overview.html book/index.html
27+
28+
- name: Upload Artifact
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: book
32+
path: book
33+
# We'll only use this in a workflow_run, then we're done with it
34+
retention-days: 1

.github/workflows/latest_deps.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v3
2929
- name: Install Rust
30-
uses: actions-rs/toolchain@v1
30+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
3131
with:
32-
toolchain: stable
33-
override: true
32+
toolchain: stable
3433
- uses: Swatinem/rust-cache@v2
3534

3635
# The dev dependencies aren't exposed in the wheel metadata (at least with current
@@ -62,10 +61,9 @@ jobs:
6261
- uses: actions/checkout@v3
6362

6463
- name: Install Rust
65-
uses: actions-rs/toolchain@v1
64+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
6665
with:
67-
toolchain: stable
68-
override: true
66+
toolchain: stable
6967
- uses: Swatinem/rust-cache@v2
7068

7169
- run: sudo apt-get -qq install xmlsec1
@@ -136,10 +134,9 @@ jobs:
136134
- uses: actions/checkout@v3
137135

138136
- name: Install Rust
139-
uses: actions-rs/toolchain@v1
137+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
140138
with:
141-
toolchain: stable
142-
override: true
139+
toolchain: stable
143140
- uses: Swatinem/rust-cache@v2
144141

145142
- name: Ensure sytest runs `pip install`

.github/workflows/tests.yml

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
steps:
3434
- uses: actions/checkout@v3
3535
- uses: actions/setup-python@v4
36+
with:
37+
python-version: "3.x"
3638
- uses: matrix-org/setup-python-poetry@v1
3739
with:
3840
extras: "all"
@@ -44,6 +46,8 @@ jobs:
4446
steps:
4547
- uses: actions/checkout@v3
4648
- uses: actions/setup-python@v4
49+
with:
50+
python-version: "3.x"
4751
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
4852
- run: scripts-dev/check_schema_delta.py --force-colors
4953

@@ -68,6 +72,8 @@ jobs:
6872
ref: ${{ github.event.pull_request.head.sha }}
6973
fetch-depth: 0
7074
- uses: actions/setup-python@v4
75+
with:
76+
python-version: "3.x"
7177
- run: "pip install 'towncrier>=18.6.0rc1'"
7278
- run: scripts-dev/check-newsfragment.sh
7379
env:
@@ -93,10 +99,12 @@ jobs:
9399
- uses: actions/checkout@v3
94100

95101
- name: Install Rust
96-
uses: actions-rs/toolchain@v1
102+
# There don't seem to be versioned releases of this action per se: for each rust
103+
# version there is a branch which gets constantly rebased on top of master.
104+
# We pin to a specific commit for paranoia's sake.
105+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
97106
with:
98107
toolchain: 1.58.1
99-
override: true
100108
components: clippy
101109
- uses: Swatinem/rust-cache@v2
102110

@@ -111,11 +119,13 @@ jobs:
111119
- uses: actions/checkout@v3
112120

113121
- name: Install Rust
114-
uses: actions-rs/toolchain@v1
122+
# There don't seem to be versioned releases of this action per se: for each rust
123+
# version there is a branch which gets constantly rebased on top of master.
124+
# We pin to a specific commit for paranoia's sake.
125+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
115126
with:
116-
toolchain: 1.58.1
117-
override: true
118-
components: rustfmt
127+
toolchain: 1.58.1
128+
components: rustfmt
119129
- uses: Swatinem/rust-cache@v2
120130

121131
- run: cargo fmt --check
@@ -143,6 +153,8 @@ jobs:
143153
steps:
144154
- uses: actions/checkout@v3
145155
- uses: actions/setup-python@v4
156+
with:
157+
python-version: "3.x"
146158
- id: get-matrix
147159
run: .ci/scripts/calculate_jobs.py
148160
outputs:
@@ -169,10 +181,12 @@ jobs:
169181
postgres:${{ matrix.job.postgres-version }}
170182
171183
- name: Install Rust
172-
uses: actions-rs/toolchain@v1
184+
# There don't seem to be versioned releases of this action per se: for each rust
185+
# version there is a branch which gets constantly rebased on top of master.
186+
# We pin to a specific commit for paranoia's sake.
187+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
173188
with:
174189
toolchain: 1.58.1
175-
override: true
176190
- uses: Swatinem/rust-cache@v2
177191

178192
- uses: matrix-org/setup-python-poetry@v1
@@ -211,10 +225,12 @@ jobs:
211225
- uses: actions/checkout@v3
212226

213227
- name: Install Rust
214-
uses: actions-rs/toolchain@v1
228+
# There don't seem to be versioned releases of this action per se: for each rust
229+
# version there is a branch which gets constantly rebased on top of master.
230+
# We pin to a specific commit for paranoia's sake.
231+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
215232
with:
216233
toolchain: 1.58.1
217-
override: true
218234
- uses: Swatinem/rust-cache@v2
219235

220236
# There aren't wheels for some of the older deps, so we need to install
@@ -327,10 +343,12 @@ jobs:
327343
run: cat sytest-blacklist .ci/worker-blacklist > synapse-blacklist-with-workers
328344

329345
- name: Install Rust
330-
uses: actions-rs/toolchain@v1
346+
# There don't seem to be versioned releases of this action per se: for each rust
347+
# version there is a branch which gets constantly rebased on top of master.
348+
# We pin to a specific commit for paranoia's sake.
349+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
331350
with:
332351
toolchain: 1.58.1
333-
override: true
334352
- uses: Swatinem/rust-cache@v2
335353

336354
- name: Run SyTest
@@ -391,10 +409,10 @@ jobs:
391409
matrix:
392410
include:
393411
- python-version: "3.7"
394-
postgres-version: "10"
412+
postgres-version: "11"
395413

396414
- python-version: "3.11"
397-
postgres-version: "14"
415+
postgres-version: "15"
398416

399417
services:
400418
postgres:
@@ -412,6 +430,15 @@ jobs:
412430
413431
steps:
414432
- uses: actions/checkout@v3
433+
- name: Add PostgreSQL apt repository
434+
# We need a version of pg_dump that can handle the version of
435+
# PostgreSQL being tested against. The Ubuntu package repository lags
436+
# behind new releases, so we have to use the PostreSQL apt repository.
437+
# Steps taken from https://www.postgresql.org/download/linux/ubuntu/
438+
run: |
439+
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
440+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
441+
sudo apt-get update
415442
- run: sudo apt-get -qq install xmlsec1 postgresql-client
416443
- uses: matrix-org/setup-python-poetry@v1
417444
with:
@@ -459,10 +486,12 @@ jobs:
459486
path: synapse
460487

461488
- name: Install Rust
462-
uses: actions-rs/toolchain@v1
489+
# There don't seem to be versioned releases of this action per se: for each rust
490+
# version there is a branch which gets constantly rebased on top of master.
491+
# We pin to a specific commit for paranoia's sake.
492+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
463493
with:
464494
toolchain: 1.58.1
465-
override: true
466495
- uses: Swatinem/rust-cache@v2
467496

468497
- name: Prepare Complement's Prerequisites
@@ -485,10 +514,12 @@ jobs:
485514
- uses: actions/checkout@v3
486515

487516
- name: Install Rust
488-
uses: actions-rs/toolchain@v1
517+
# There don't seem to be versioned releases of this action per se: for each rust
518+
# version there is a branch which gets constantly rebased on top of master.
519+
# We pin to a specific commit for paranoia's sake.
520+
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
489521
with:
490522
toolchain: 1.58.1
491-
override: true
492523
- uses: Swatinem/rust-cache@v2
493524

494525
- run: cargo test

.github/workflows/triage_labelled.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@ jobs:
1111
if: >
1212
contains(github.event.issue.labels.*.name, 'X-Needs-Info')
1313
steps:
14-
- uses: octokit/[email protected]
15-
id: add_to_project
14+
- uses: actions/add-to-project@main
15+
id: add_project
1616
with:
17-
headers: '{"GraphQL-Features": "projects_next_graphql"}'
18-
query: |
19-
mutation {
20-
updateProjectV2ItemFieldValue(
21-
input: {
22-
projectId: $projectid
23-
itemId: $contentid
24-
fieldId: $fieldid
25-
value: {
26-
singleSelectOptionId: "Todo"
17+
project-url: "https://github.com/orgs/matrix-org/projects/67"
18+
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
19+
- name: Set status
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
22+
run: |
23+
gh api graphql -f query='
24+
mutation(
25+
$project: ID!
26+
$item: ID!
27+
$fieldid: ID!
28+
$columnid: String!
29+
) {
30+
updateProjectV2ItemFieldValue(
31+
input: {
32+
projectId: $project
33+
itemId: $item
34+
fieldId: $fieldid
35+
value: {
36+
singleSelectOptionId: $columnid
2737
}
28-
}
29-
) {
30-
projectV2Item {
31-
id
32-
}
38+
}
39+
) {
40+
projectV2Item {
41+
id
3342
}
3443
}
35-
36-
projectid: ${{ env.PROJECT_ID }}
37-
contentid: ${{ github.event.issue.node_id }}
38-
fieldid: ${{ env.FIELD_ID }}
39-
optionid: ${{ env.OPTION_ID }}
40-
env:
41-
PROJECT_ID: "PVT_kwDOAIB0Bs4AFDdZ"
42-
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
43-
FIELD_ID: "PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4"
44-
OPTION_ID: "ba22e43c"
44+
}' -f project="PVT_kwDOAIB0Bs4AFDdZ" -f item=${{ steps.add_project.outputs.itemId }} -f fieldid="PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4" -f columnid=ba22e43c --silent

0 commit comments

Comments
 (0)