Skip to content

Commit 92e62a9

Browse files
Merge tag 'v1.132.0' into ixo
- Improvements to generate config documentation from JSON Schema file. ([\element-hq#18522](element-hq#18522)) - Add support for [MSC4155](matrix-org/matrix-spec-proposals#4155) Invite Filtering. ([\element-hq#18288](element-hq#18288)) - Add experimental `user_may_send_state_event` module API callback. ([\element-hq#18455](element-hq#18455)) - Add experimental `get_media_config_for_user` and `is_user_allowed_to_upload_media_of_size` module API callbacks that allow overriding of media repository maximum upload size. ([\element-hq#18457](element-hq#18457)) - Add experimental `get_ratelimit_override_for_user` module API callback that allows overriding of per-user ratelimits. ([\element-hq#18458](element-hq#18458)) - Pass `room_config` argument to `user_may_create_room` spam checker module callback. ([\element-hq#18486](element-hq#18486)) - Support configuration of default and extra user types. ([\element-hq#18456](element-hq#18456)) - Successful requests to `/_matrix/app/v1/ping` will now force Synapse to reattempt delivering transactions to appservices. ([\element-hq#18521](element-hq#18521)) - Support the import of the `RatelimitOverride` type from `synapse.module_api` in modules and rename `messages_per_second` to `per_second`. ([\element-hq#18513](element-hq#18513)) - Remove destinations from sending if not whitelisted. ([\element-hq#18484](element-hq#18484)) - Fixed room summary API incorrectly returning that a room is private in the room summary response when the join rule is omitted by the remote server. Contributed by @nexy7574. ([\element-hq#18493](element-hq#18493)) - Prevent users from adding themselves to their own user ignore list. ([\element-hq#18508](element-hq#18508)) - Generate config documentation from JSON Schema file. ([\element-hq#17892](element-hq#17892)) - Mention `CAP_NET_BIND_SERVICE` as an alternative to running Synapse as root in order to bind to a privileged port. ([\element-hq#18408](element-hq#18408)) - Surface hidden Admin API documentation regarding fetching of scheduled tasks. ([\element-hq#18516](element-hq#18516)) - Mark the new module APIs in this release as experimental. ([\element-hq#18536](element-hq#18536)) - Mark dehydrated devices in the [List All User Devices Admin API](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#list-all-devices). ([\element-hq#18252](element-hq#18252)) - Reduce disk wastage by cleaning up `received_transactions` older than 1 day, rather than 30 days. ([\element-hq#18310](element-hq#18310)) - Distinguish all vs local events being persisted in the "Event Send Time Quantiles" graph (Grafana). ([\element-hq#18510](element-hq#18510))
2 parents ea0ab3d + d1139eb commit 92e62a9

File tree

567 files changed

+62922
-17464
lines changed

Some content is hidden

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

567 files changed

+62922
-17464
lines changed

.ci/before_build_wheel.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -xeu
3+
4+
# On 32-bit Linux platforms, we need libatomic1 to use rustup
5+
if command -v yum &> /dev/null; then
6+
yum install -y libatomic
7+
fi
8+
9+
# Install a Rust toolchain
10+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.82.0 -y --profile minimal

.ci/scripts/calculate_jobs.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def set_output(key: str, value: str):
3636
# First calculate the various trial jobs.
3737
#
3838
# For PRs, we only run each type of test with the oldest Python version supported (which
39-
# is Python 3.8 right now)
39+
# is Python 3.9 right now)
4040

4141
trial_sqlite_tests = [
4242
{
43-
"python-version": "3.8",
43+
"python-version": "3.9",
4444
"database": "sqlite",
4545
"extras": "all",
4646
}
@@ -53,31 +53,31 @@ def set_output(key: str, value: str):
5353
"database": "sqlite",
5454
"extras": "all",
5555
}
56-
for version in ("3.9", "3.10", "3.11", "3.12")
56+
for version in ("3.10", "3.11", "3.12", "3.13")
5757
)
5858

5959
trial_postgres_tests = [
6060
{
61-
"python-version": "3.8",
61+
"python-version": "3.9",
6262
"database": "postgres",
63-
"postgres-version": "11",
63+
"postgres-version": "13",
6464
"extras": "all",
6565
}
6666
]
6767

6868
if not IS_PR:
6969
trial_postgres_tests.append(
7070
{
71-
"python-version": "3.12",
71+
"python-version": "3.13",
7272
"database": "postgres",
73-
"postgres-version": "16",
73+
"postgres-version": "17",
7474
"extras": "all",
7575
}
7676
)
7777

7878
trial_no_extra_tests = [
7979
{
80-
"python-version": "3.8",
80+
"python-version": "3.9",
8181
"database": "sqlite",
8282
"extras": "",
8383
}
@@ -99,24 +99,24 @@ def set_output(key: str, value: str):
9999

100100
# First calculate the various sytest jobs.
101101
#
102-
# For each type of test we only run on focal on PRs
102+
# For each type of test we only run on bullseye on PRs
103103

104104

105105
sytest_tests = [
106106
{
107-
"sytest-tag": "focal",
107+
"sytest-tag": "bullseye",
108108
},
109109
{
110-
"sytest-tag": "focal",
110+
"sytest-tag": "bullseye",
111111
"postgres": "postgres",
112112
},
113113
{
114-
"sytest-tag": "focal",
114+
"sytest-tag": "bullseye",
115115
"postgres": "multi-postgres",
116116
"workers": "workers",
117117
},
118118
{
119-
"sytest-tag": "focal",
119+
"sytest-tag": "bullseye",
120120
"postgres": "multi-postgres",
121121
"workers": "workers",
122122
"reactor": "asyncio",
@@ -127,11 +127,11 @@ def set_output(key: str, value: str):
127127
sytest_tests.extend(
128128
[
129129
{
130-
"sytest-tag": "focal",
130+
"sytest-tag": "bullseye",
131131
"reactor": "asyncio",
132132
},
133133
{
134-
"sytest-tag": "focal",
134+
"sytest-tag": "bullseye",
135135
"postgres": "postgres",
136136
"reactor": "asyncio",
137137
},

.ci/scripts/check_lockfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
try:
1313
lock_version = lockfile["metadata"]["lock-version"]
14-
assert lock_version == "2.0"
14+
assert lock_version == "2.1"
1515
except Exception:
1616
print(
1717
"""\
18-
Lockfile is not version 2.0. You probably need to upgrade poetry on your local box
19-
and re-run `poetry lock --no-update`. See the Poetry cheat sheet at
18+
Lockfile is not version 2.1. You probably need to upgrade poetry on your local box
19+
and re-run `poetry lock`. See the Poetry cheat sheet at
2020
https://element-hq.github.io/synapse/develop/development/dependencies.html
2121
"""
2222
)

.ci/scripts/prepare_old_deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# this script is run by GitHub Actions in a plain `focal` container; it
2+
# this script is run by GitHub Actions in a plain `jammy` container; it
33
# - installs the minimal system requirements, and poetry;
44
# - patches the project definition file to refer to old versions only;
55
# - creates a venv with these old versions using poetry; and finally

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
- End with either a period (.) or an exclamation mark (!).
1010
- Start with a capital letter.
1111
- Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
12-
* [ ] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct
13-
(run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
12+
* [ ] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))

.github/workflows/docker.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ permissions:
1414
id-token: write # needed for signing the images with GitHub OIDC Token
1515
jobs:
1616
build:
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-22.04
1818
steps:
1919
- name: Set up QEMU
2020
id: qemu
21-
uses: docker/setup-qemu-action@v3
21+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
2222
with:
2323
platforms: arm64
2424

2525
- name: Set up Docker Buildx
2626
id: buildx
27-
uses: docker/setup-buildx-action@v3
27+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
2828

2929
- name: Inspect builder
3030
run: docker buildx inspect
3131

3232
- name: Install Cosign
33-
uses: sigstore/cosign-installer@v3.5.0
33+
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
3434

3535
- name: Checkout repository
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737

3838
- name: Extract version from pyproject.toml
3939
# Note: explicitly requesting bash will mean bash is invoked with `-eo pipefail`, see
@@ -43,21 +43,21 @@ jobs:
4343
echo "SYNAPSE_VERSION=$(grep "^version" pyproject.toml | sed -E 's/version\s*=\s*["]([^"]*)["]/\1/')" >> $GITHUB_ENV
4444
4545
- name: Log in to DockerHub
46-
uses: docker/login-action@v3
46+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
4747
with:
4848
username: ${{ secrets.DOCKERHUB_USERNAME }}
4949
password: ${{ secrets.DOCKERHUB_TOKEN }}
5050

5151
- name: Log in to GHCR
52-
uses: docker/login-action@v3
52+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
5353
with:
5454
registry: ghcr.io
5555
username: ${{ github.repository_owner }}
5656
password: ${{ secrets.GITHUB_TOKEN }}
5757

5858
- name: Calculate docker image tag
5959
id: set-tag
60-
uses: docker/metadata-action@master
60+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
6161
with:
6262
images: |
6363
docker.io/matrixdotorg/synapse
@@ -72,7 +72,7 @@ jobs:
7272
7373
- name: Build and push all platforms
7474
id: build-and-push
75-
uses: docker/build-push-action@v6
75+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
7676
with:
7777
push: true
7878
labels: |

.github/workflows/docs-pr-netlify.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
1515
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
1616
- name: 📥 Download artifact
17-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
17+
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295 # v9
1818
with:
1919
workflow: docs-pr.yaml
2020
run_id: ${{ github.event.workflow_run.id }}
2121
name: book
2222
path: book
2323

2424
- name: 📤 Deploy to Netlify
25-
uses: matrix-org/netlify-pr-preview@v3
25+
uses: matrix-org/netlify-pr-preview@9805cd123fc9a7e421e35340a05e1ebc5dee46b5 # v3
2626
with:
2727
path: book
2828
owner: ${{ github.event.workflow_run.head_repository.owner.login }}

.github/workflows/docs-pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: GitHub Pages
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
# Fetch all history so that the schema_versions script works.
1919
fetch-depth: 0
@@ -24,7 +24,7 @@ jobs:
2424
mdbook-version: '0.4.17'
2525

2626
- name: Setup python
27-
uses: actions/setup-python@v5
27+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2828
with:
2929
python-version: "3.x"
3030

@@ -39,7 +39,7 @@ jobs:
3939
cp book/welcome_and_overview.html book/index.html
4040
4141
- name: Upload Artifact
42-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4343
with:
4444
name: book
4545
path: book
@@ -50,7 +50,7 @@ jobs:
5050
name: Check links in documentation
5151
runs-on: ubuntu-latest
5252
steps:
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5454

5555
- name: Setup mdbook
5656
uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08 # v2.0.0

.github/workflows/docs.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
needs:
5151
- pre
5252
steps:
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5454
with:
5555
# Fetch all history so that the schema_versions script works.
5656
fetch-depth: 0
@@ -64,7 +64,7 @@ jobs:
6464
run: echo 'window.SYNAPSE_VERSION = "${{ needs.pre.outputs.branch-version }}";' > ./docs/website_files/version.js
6565

6666
- name: Setup python
67-
uses: actions/setup-python@v5
67+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
6868
with:
6969
python-version: "3.x"
7070

@@ -78,6 +78,18 @@ jobs:
7878
mdbook build
7979
cp book/welcome_and_overview.html book/index.html
8080
81+
- name: Prepare and publish schema files
82+
run: |
83+
sudo apt-get update && sudo apt-get install -y yq
84+
mkdir -p book/schema
85+
# Remove developer notice before publishing.
86+
rm schema/v*/Do\ not\ edit\ files\ in\ this\ folder
87+
# Copy schema files that are independent from current Synapse version.
88+
cp -r -t book/schema schema/v*/
89+
# Convert config schema from YAML source file to JSON.
90+
yq < schema/synapse-config.schema.yaml \
91+
> book/schema/synapse-config.schema.json
92+
8193
# Deploy to the target directory.
8294
- name: Deploy to gh pages
8395
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0

.github/workflows/fix_lint.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,37 @@ jobs:
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

1818
- name: Install Rust
19-
uses: dtolnay/rust-toolchain@master
19+
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # master (rust 1.85.1)
2020
with:
2121
# We use nightly so that `fmt` correctly groups together imports, and
2222
# clippy correctly fixes up the benchmarks.
2323
toolchain: nightly-2022-12-01
24-
components: rustfmt
25-
- uses: Swatinem/rust-cache@v2
24+
components: clippy, rustfmt
25+
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
2626

2727
- name: Setup Poetry
28-
uses: matrix-org/setup-python-poetry@v1
28+
uses: matrix-org/setup-python-poetry@5bbf6603c5c930615ec8a29f1b5d7d258d905aa4 # v2.0.0
2929
with:
3030
install-project: "false"
31+
poetry-version: "2.1.1"
3132

32-
- name: Import order (isort)
33+
- name: Run ruff check
3334
continue-on-error: true
34-
run: poetry run isort .
35+
run: poetry run ruff check --fix .
3536

36-
- name: Code style (black)
37+
- name: Run ruff format
3738
continue-on-error: true
38-
run: poetry run black .
39-
40-
- name: Semantic checks (ruff)
41-
continue-on-error: true
42-
run: poetry run ruff --fix .
39+
run: poetry run ruff format --quiet .
4340

4441
- run: cargo clippy --all-features --fix -- -D warnings
4542
continue-on-error: true
4643

4744
- run: cargo fmt
4845
continue-on-error: true
4946

50-
- uses: stefanzweifel/git-auto-commit-action@v5
47+
- uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
5148
with:
52-
commit_message: "Attempt to fix linting"
49+
commit_message: "Attempt to fix linting"

0 commit comments

Comments
 (0)