Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4906771
Faster redis replication handling (#19138)
erikjohnston Nov 5, 2025
d3ffd04
Fix spelling (#19145)
erikjohnston Nov 5, 2025
6790312
Fixup logcontexts after replication PR. (#19146)
erikjohnston Nov 5, 2025
fcac7e0
Write union types as `X | Y` where possible (#19111)
AndrewFerr Nov 6, 2025
077a6f7
Merge branch 'release-v1.142' into develop
anoadragon453 Nov 7, 2025
8580ab6
Add `delayed_events` table to boolean column port (#19155)
AndrewFerr Nov 10, 2025
378c5c8
Document Nginx Proxy Manager configuration steps (#19136)
Sharakea Nov 10, 2025
a50923b
Improve documentation around streams, particularly ID generators and …
reivilibre Nov 10, 2025
dc7f01f
register_new_matrix_user: Support multiple config files (#18784)
V02460 Nov 10, 2025
674b932
Bump sentry-sdk from 2.34.1 to 2.43.0 (#19157)
dependabot[bot] Nov 10, 2025
a10e238
Bump docker/metadata-action from 5.8.0 to 5.9.0 (#19161)
dependabot[bot] Nov 10, 2025
8fa7d4a
Ignore Python language refactors (`.git-blame-ignore-revs`) (#19150)
MadLittleMods Nov 10, 2025
91c2845
Bump pydantic from 2.12.3 to 2.12.4 (#19158)
dependabot[bot] Nov 10, 2025
70e6cc0
Bump pyo3-log from 0.13.1 to 0.13.2 (#19156)
dependabot[bot] Nov 10, 2025
2e66cf1
Bump types-netaddr from 1.3.0.20240530 to 1.3.0.20251108 (#19160)
dependabot[bot] Nov 10, 2025
03e873e
Bump cryptography from 43.0.3 to 45.0.7 (#19159)
dependabot[bot] Nov 11, 2025
9c67666
Merge branch 'master' of github.com:element-hq/synapse into develop
anoadragon453 Nov 11, 2025
2c91896
Run trial tests on Python 3.14 in PRs (#19135)
anoadragon453 Nov 12, 2025
9722e05
Update `pyproject.toml` to be compatible with other standard Python p…
anoadragon453 Nov 12, 2025
3ba3c7f
Reduce cardinality of metrics on event persister (#19133)
erikjohnston Nov 12, 2025
97cc05d
Bump lower bounds of unit test exclusive dependencies for Python 3.10…
AndrewFerr Nov 12, 2025
df80288
Further reduce cardinality of metrics on event persister (#19168)
erikjohnston Nov 12, 2025
e67ba69
Provide same `servers` list in s2s alias results as c2s. (#18970)
jevolk Nov 13, 2025
938c974
Add a shortcut return when there are no events to purge. (#19093)
reivilibre Nov 13, 2025
b9dda0f
Restore printing `sentinel` for `log_record.request` (#19172)
MadLittleMods Nov 13, 2025
47d24bd
Add debug logs to track `Clock` callbacks (#19173)
MadLittleMods Nov 13, 2025
4494cc0
Point out which event caused the exception when checking MSC4293 reda…
MadLittleMods Nov 13, 2025
9e23cde
MSC4140: Remove auth from delayed event management endpoints (#19152)
AndrewFerr Nov 13, 2025
5d545d1
Remove support for PostgreSQL 13 (#19170)
devonh Nov 13, 2025
408a05e
Fix potential lost logcontext when `PerDestinationQueue.shutdown(...)…
MadLittleMods Nov 13, 2025
8da8d4b
Remove explicit python 3.8/9 skips (#19177)
anoadragon453 Nov 14, 2025
edc0de9
Fix bad deferred logcontext handling (#19180)
MadLittleMods Nov 14, 2025
19251fc
Bump bytes from 1.10.1 to 1.11.0 (#19193)
dependabot[bot] Nov 17, 2025
fca80e2
Bump tomli from 2.2.1 to 2.3.0 (#19194)
dependabot[bot] Nov 17, 2025
26ddedb
Bump ruff from 0.14.3 to 0.14.5 (#19196)
dependabot[bot] Nov 17, 2025
ce65b5c
Bump sentry-sdk from 2.43.0 to 2.44.0 (#19197)
dependabot[bot] Nov 17, 2025
34d93c9
Bump click from 8.1.8 to 8.3.1 (#19195)
dependabot[bot] Nov 17, 2025
322481c
Run background updates on all databases (#19181)
devonh Nov 17, 2025
bc42899
Allow subpaths in MAS endpoints (#19186)
devonh Nov 18, 2025
1b24a14
Merge branch 'master' into develop
devonh Nov 18, 2025
f5bf02e
1.143.0rc1
devonh Nov 18, 2025
2cffd75
Fix duplicate poetry version from merging patch release
devonh Nov 19, 2025
b631bf7
1.143.0rc2
devonh Nov 19, 2025
3779c59
move postgres 13 deprecation note to top of changelog
anoadragon453 Nov 19, 2025
2eb76b4
1.143.0
devonh Nov 25, 2025
87d6e27
Capitalize Synapse in changelog
devonh Nov 25, 2025
90c2c97
Merge remote-tracking branch 'upstream/release-v1.143' into famedly-r…
jason-famedly Dec 16, 2025
aedcd97
Update Changlog
jason-famedly Dec 16, 2025
1158faf
bump: codecov-action to v5
jason-famedly Dec 17, 2025
cced457
ci: generate xml coverage file
jason-famedly Dec 17, 2025
e08f4f2
ci: use oidc for codecov access
jason-famedly Dec 17, 2025
9748e97
Don't include debug logs in `Clock` unless explicitly enabled (#19278)
devonh Dec 4, 2025
1994509
ci: Stop forcing debug level logging for this one test
jason-famedly Jan 2, 2026
26426ca
ci: Allow a test to selectively not run if coverage is being collected
jason-famedly Jan 6, 2026
b601d6f
bump: Synapse Invite Checker to version v0.4.13
jason-famedly Jan 7, 2026
82d865a
bump: coverage to v7.13.1
jason-famedly Jan 7, 2026
a5103bf
tests: run the invite-checker and token-authenticator tests in the CI
FrenchGithubUser Jan 6, 2026
f836368
Update Changelog
jason-famedly Jan 8, 2026
6916797
chore: Adjust unit test job runners to be hardcoded to 6 instead of 8…
jason-famedly Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .ci/scripts/auditwheel_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import argparse
import os
import subprocess
from typing import Optional
from zipfile import ZipFile

from packaging.tags import Tag
Expand Down Expand Up @@ -80,7 +79,7 @@ def cpython(wheel_file: str, name: str, version: Version, tag: Tag) -> str:
return new_wheel_file


def main(wheel_file: str, dest_dir: str, archs: Optional[str]) -> None:
def main(wheel_file: str, dest_dir: str, archs: str | None) -> None:
"""Entry point"""

# Parse the wheel file name into its parts. Note that `parse_wheel_filename`
Expand Down
3 changes: 2 additions & 1 deletion .ci/scripts/calculate_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ def set_output(key: str, value: str) -> None:
"mod016": {"sic-version": "0.4.10", "sta-version": "0.12.0"},
"mod017": {"sic-version": "0.2.2", "sta-version": "0.12.0"},
"mod018": {"sic-version": "0.4.11", "sta-version": "0.12.0"},
"mod019": {"sic-version": "0.4.13", "sta-version": "0.12.0"},
}

# Adjust this section to decide what gets built and layered on top
# THIS IS THE SECTION TO EDIT, after you have added the new versions above
current_mod_packs_to_build = ["mod017", "mod018"]
current_mod_packs_to_build = ["mod017", "mod019"]

generated_jobs: list[dict[str, Any]] = []
for mod_pack_job in current_mod_packs_to_build:
Expand Down
41 changes: 25 additions & 16 deletions .ci/scripts/calculate_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,55 @@ def set_output(key: str, value: str):

# First calculate the various trial jobs.
#
# For PRs, we only run each type of test with the oldest Python version supported (which
# is Python 3.10 right now)
# For PRs, we only run each type of test with the oldest and newest Python
# version that's supported. The oldest version ensures we don't accidentally
# introduce syntax or code that's too new, and the newest ensures we don't use
# code that's been dropped in the latest supported Python version.

trial_sqlite_tests = [
{
"python-version": "3.10",
"database": "sqlite",
"extras": "all",
}
},
{
"python-version": "3.14",
"database": "sqlite",
"extras": "all",
},
]

if not IS_PR:
# Otherwise, check all supported Python versions.
#
# Avoiding running all of these versions on every PR saves on CI time.
trial_sqlite_tests.extend(
{
"python-version": version,
"database": "sqlite",
"extras": "all",
}
for version in ("3.11", "3.12", "3.13", "3.14")
for version in ("3.11", "3.12", "3.13")
)

# Only test postgres against the earliest and latest Python versions that we
# support in order to save on CI time.
trial_postgres_tests = [
{
"python-version": "3.10",
"database": "postgres",
"postgres-version": "13",
"postgres-version": "14",
"extras": "all",
}
},
{
"python-version": "3.14",
"database": "postgres",
"postgres-version": "17",
"extras": "all",
},
]

if not IS_PR:
trial_postgres_tests.append(
{
"python-version": "3.14",
"database": "postgres",
"postgres-version": "17",
"extras": "all",
}
)

# Ensure that Synapse passes unit tests even with no extra dependencies installed.
trial_no_extra_tests = [
{
"python-version": "3.10",
Expand Down
23 changes: 13 additions & 10 deletions .ci/scripts/prepare_old_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ export VIRTUALENV_NO_DOWNLOAD=1
# to select the lowest possible versions, rather than resorting to this sed script.

# Patch the project definitions in-place:
# - Replace all lower and tilde bounds with exact bounds
# - Replace all caret bounds---but not the one that defines the supported Python version!
# - Delete all lines referring to psycopg2 --- so no testing of postgres support.
# - `-E` use extended regex syntax.
# - Don't modify the line that defines required Python versions.
# - Replace all lower and tilde bounds with exact bounds.
# - Replace all caret bounds with exact bounds.
# - Delete all lines referring to psycopg2 - so no testing of postgres support.
# - Use pyopenssl 17.0, which is the oldest version that works with
# a `cryptography` compiled against OpenSSL 1.1.
# - Omit systemd: we're not logging to journal here.

sed -i \
-e "s/[~>]=/==/g" \
-e '/^python = "^/!s/\^/==/g' \
-e "/psycopg2/d" \
-e 's/pyOpenSSL = "==16.0.0"/pyOpenSSL = "==17.0.0"/' \
-e '/systemd/d' \
pyproject.toml
sed -i -E '
/^\s*requires-python\s*=/b
s/[~>]=/==/g
s/\^/==/g
/psycopg2/d
s/pyOpenSSL\s*==\s*16\.0\.0"/pyOpenSSL==17.0.0"/
/systemd/d
' pyproject.toml

echo "::group::Patched pyproject.toml"
cat pyproject.toml
Expand Down
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ c4268e3da64f1abb5b31deaeb5769adb6510c0a7
# Update black to 23.1.0 (https://github.com/matrix-org/synapse/pull/15103)
9bb2eac71962970d02842bca441f4bcdbbf93a11

# Use type hinting generics in standard collections (https://github.com/element-hq/synapse/pull/19046)
fc244bb592aa481faf28214a2e2ce3bb4e95d990

# Write union types as X | Y where possible (https://github.com/element-hq/synapse/pull/19111)
fcac7e0282b074d4bd3414d1c9c181e9701875d9
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0

- name: Calculate docker image tag
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0
with:
images: ${{ matrix.repository }}
flavor: |
Expand Down
121 changes: 112 additions & 9 deletions .github/workflows/famedly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Tests
# so a change to a pull request was triggering both. Also run tests when a tag is pushed.
on:
push:
branches: ["master", "release-*"]
branches: [ "master", "release-*" ]
tags:
- '**'
- "**"
pull_request:
merge_group:
workflow_dispatch:
Expand Down Expand Up @@ -191,6 +191,8 @@ jobs:
needs:
- calculate-test-jobs
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
matrix:
job: ${{ fromJson(needs.calculate-test-jobs.outputs.trial_test_matrix) }}
Expand Down Expand Up @@ -229,11 +231,11 @@ jobs:
run: until pg_isready -h localhost; do sleep 1; done
# coverage is already installed from the pyproject.toml file
- run: poetry run pip install coverage-enable-subprocess
# Normally, this Github runner has 2 cores(actually threads) available to it.
# Using only one trial test runner does not saturate the cpu. Rough experimentation in the past led to having 3
# of these runners per core as optimal, but now coverage is required and there may be the need
# to scale back a little. This should be 6 trial test runners/jobs
- run: poetry run coverage run -m twisted.trial -j$((`nproc` * 2 )) tests
# Normally, this Github runner has 4 cores(vCPUs) available to it.
# Just use that number to define the number of runners. Adding in
# --debug=core will display which measurement core is in use. For python 3.14+
# this is educational.
- run: poetry run coverage run --debug=core -m twisted.trial -j$((`nproc`)) tests
env:
SYNAPSE_POSTGRES: ${{ matrix.job.database == 'postgres' || '' }}
SYNAPSE_POSTGRES_HOST: /var/run/postgresql
Expand All @@ -252,10 +254,11 @@ jobs:
-exec echo "::endgroup::" \;
|| true
- run: poetry run coverage combine
- run: poetry run coverage xml
- name: Codecov - Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}
use_oidc: true

sytest:
if: ${{ !failure() && !cancelled() }}
Expand Down Expand Up @@ -362,6 +365,104 @@ jobs:

- run: cargo test

invite-checker:
if: ${{ !failure() && !cancelled() }}
needs:
- linting-done
runs-on: ubuntu-latest

steps:
- name: Checkout synapse
uses: actions/checkout@v4

- name: Checkout synapse-invite-checker
uses: actions/checkout@v4
with:
repository: famedly/synapse-invite-checker
path: synapse-invite-checker

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install hatch
run: pip install hatch

- name: Determine synapse git ref
id: synapse-ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "ref=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT"
echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> "$GITHUB_OUTPUT"
else
echo "ref=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT"
fi

- name: Update dependency to the current branch
working-directory: synapse-invite-checker
run: |
sed -i 's|"matrix-synapse[^"]*"|"matrix-synapse @ git+https://github.com/${{ steps.synapse-ref.outputs.repo }}.git@${{ steps.synapse-ref.outputs.ref }}"|' pyproject.toml
# Check if the file was actually modified
if git diff --exit-code pyproject.toml > /dev/null; then
echo "::error::The sed command did not modify pyproject.toml. Check if the 'matrix-synapse' dependency exists in the file."
exit 1
fi

- name: Run invite-checker tests
working-directory: synapse-invite-checker
run: hatch run cov

token-authenticator:
if: ${{ !failure() && !cancelled() }}
needs:
- linting-done
runs-on: ubuntu-latest

steps:
- name: Checkout synapse
uses: actions/checkout@v4

- name: Checkout synapse-token-authenticator
uses: actions/checkout@v4
with:
repository: famedly/synapse-token-authenticator
path: synapse-token-authenticator

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install hatch
run: pip install hatch

- name: Determine synapse git ref
id: synapse-ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "ref=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT"
echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> "$GITHUB_OUTPUT"
else
echo "ref=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT"
fi

- name: Update dependency to the current branch
working-directory: synapse-token-authenticator
run: |
sed -i 's|"matrix-synapse[^"]*"|"matrix-synapse @ git+https://github.com/${{ steps.synapse-ref.outputs.repo }}.git@${{ steps.synapse-ref.outputs.ref }}"|' pyproject.toml
# Check if the file was actually modified
if git diff --exit-code pyproject.toml > /dev/null; then
echo "::error::The sed command did not modify pyproject.toml. Check if the 'matrix-synapse' dependency exists in the file."
exit 1
fi

- name: Run token-authenticator tests
working-directory: synapse-token-authenticator
run: hatch run cov

otlp:
if: ${{ !failure() && !cancelled() }}
runs-on: ubuntu-latest
Expand All @@ -388,6 +489,8 @@ jobs:
- sytest
- complement
- cargo-test
- invite-checker
- token-authenticator
- linting-done
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_complement_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Work out labels for complement image
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0
with:
images: ghcr.io/${{ github.repository }}/complement-synapse
tags: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ jobs:
matrix:
include:
- python-version: "3.10"
postgres-version: "13"
postgres-version: "14"

- python-version: "3.14"
postgres-version: "17"
Expand Down
Loading
Loading