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

Commit 120c50b

Browse files
committed
Merge tag 'v1.77.0' into beeper
Synapse 1.77.0 (2023-02-14) =========================== No significant changes since 1.77.0rc2. Synapse 1.77.0rc2 (2023-02-10) ============================== Bugfixes -------- - Fix bug where retried replication requests would return a failure. Introduced in v1.76.0. ([\matrix-org#15024](matrix-org#15024)) Internal Changes ---------------- - Prepare for future database schema changes. ([\matrix-org#15036](matrix-org#15036)) Synapse 1.77.0rc1 (2023-02-07) ============================== Features -------- - Experimental support for [MSC3952](matrix-org/matrix-spec-proposals#3952): intentional mentions. ([\matrix-org#14823](matrix-org#14823), [\matrix-org#14943](matrix-org#14943), [\matrix-org#14957](matrix-org#14957), [\matrix-org#14958](matrix-org#14958)) - Experimental support to suppress notifications from message edits ([MSC3958](matrix-org/matrix-spec-proposals#3958)). ([\matrix-org#14960](matrix-org#14960), [\matrix-org#15016](matrix-org#15016)) - Add profile information, devices and connections to the command line [user data export tool](https://matrix-org.github.io/synapse/v1.77/usage/administration/admin_faq.html#how-can-i-export-user-data). ([\matrix-org#14894](matrix-org#14894)) - Improve performance when joining or sending an event in large rooms. ([\matrix-org#14962](matrix-org#14962)) - Improve performance of joining and leaving large rooms with many local users. ([\matrix-org#14971](matrix-org#14971)) Bugfixes -------- - Fix a bug introduced in Synapse 1.53.0 where `next_batch` tokens from `/sync` could not be used with the `/relations` endpoint. ([\matrix-org#14866](matrix-org#14866)) - Fix a bug introduced in Synapse 1.35.0 where the module API's `send_local_online_presence_to` would fail to send presence updates over federation. ([\matrix-org#14880](matrix-org#14880)) - 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#14915](matrix-org#14915)) - Fix a regression introduced in Synapse 1.69.0 which can result in database corruption when database migrations are interrupted on sqlite. ([\matrix-org#14926](matrix-org#14926)) - Fix a bug introduced in Synapse 1.68.0 where we were unable to service remote joins in rooms with `@room` notification levels set to `null` in their (malformed) power levels. ([\matrix-org#14942](matrix-org#14942)) - Fix a bug introduced in Synapse 1.64.0 where boolean power levels were erroneously permitted in [v10 rooms](https://spec.matrix.org/v1.5/rooms/v10/). ([\matrix-org#14944](matrix-org#14944)) - Fix a long-standing bug where sending messages on servers with presence enabled would spam "Re-starting finished log context" log lines. ([\matrix-org#14947](matrix-org#14947)) - Fix a bug introduced in Synapse 1.68.0 where logging from the Rust module was not properly logged. ([\matrix-org#14976](matrix-org#14976)) - Fix various long-standing bugs in Synapse's config, event and request handling where booleans were unintentionally accepted where an integer was expected. ([\matrix-org#14945](matrix-org#14945)) Internal Changes ---------------- - Add missing type hints. ([\matrix-org#14879](matrix-org#14879), [\matrix-org#14886](matrix-org#14886), [\matrix-org#14887](matrix-org#14887), [\matrix-org#14904](matrix-org#14904), [\matrix-org#14927](matrix-org#14927), [\matrix-org#14956](matrix-org#14956), [\matrix-org#14983](matrix-org#14983), [\matrix-org#14984](matrix-org#14984), [\matrix-org#14985](matrix-org#14985), [\matrix-org#14987](matrix-org#14987), [\matrix-org#14988](matrix-org#14988), [\matrix-org#14990](matrix-org#14990), [\matrix-org#14991](matrix-org#14991), [\matrix-org#14992](matrix-org#14992), [\matrix-org#15007](matrix-org#15007)) - Use `StrCollection` to avoid potential bugs with `Collection[str]`. ([\matrix-org#14922](matrix-org#14922)) - Allow running the complement tests suites with the asyncio reactor enabled. ([\matrix-org#14858](matrix-org#14858)) - Improve performance of `/sync` in a few situations. ([\matrix-org#14908](matrix-org#14908), [\matrix-org#14970](matrix-org#14970)) - Document how to handle Dependabot pull requests. ([\matrix-org#14916](matrix-org#14916)) - Fix typo in release script. ([\matrix-org#14920](matrix-org#14920)) - Update build system requirements to allow building with poetry-core 1.5.0. ([\matrix-org#14949](matrix-org#14949), [\matrix-org#15019](matrix-org#15019)) - Add an [lnav](https://lnav.org) config file for Synapse logs to `/contrib/lnav`. ([\matrix-org#14953](matrix-org#14953)) - Faster joins: Refactor internal handling of servers in room to never store an empty list. ([\matrix-org#14954](matrix-org#14954)) - Faster joins: tag `v2/send_join/` requests to indicate if they served a partial join response. ([\matrix-org#14950](matrix-org#14950)) - Allow running `cargo` without the `extension-module` option. ([\matrix-org#14965](matrix-org#14965)) - Preparatory work for adding a denormalised event stream ordering column in the future. Contributed by Nick @ Beeper (@Fizzadar). ([\matrix-org#14979](matrix-org#14979), [9cd7610](matrix-org@9cd7610), [f10caa7](matrix-org@f10caa7); see [\matrix-org#15014](matrix-org#15014)) - Add tests for `_flatten_dict`. ([\matrix-org#14981](matrix-org#14981), [\matrix-org#15002](matrix-org#15002)) <details><summary>Dependabot updates</summary> - Bump dtolnay/rust-toolchain from e645b0cf01249a964ec099494d38d2da0f0b349f to 9cd00a88a73addc8617065438eff914dd08d0955. ([\matrix-org#14968](matrix-org#14968)) - Bump docker/build-push-action from 3 to 4. ([\matrix-org#14952](matrix-org#14952)) - Bump ijson from 3.1.4 to 3.2.0.post0. ([\matrix-org#14935](matrix-org#14935)) - Bump types-pyyaml from 6.0.12.2 to 6.0.12.3. ([\matrix-org#14936](matrix-org#14936)) - Bump types-jsonschema from 4.17.0.2 to 4.17.0.3. ([\matrix-org#14937](matrix-org#14937)) - Bump types-pillow from 9.4.0.3 to 9.4.0.5. ([\matrix-org#14938](matrix-org#14938)) - Bump hiredis from 2.0.0 to 2.1.1. ([\matrix-org#14939](matrix-org#14939)) - Bump hiredis from 2.1.1 to 2.2.1. ([\matrix-org#14993](matrix-org#14993)) - Bump types-setuptools from 65.6.0.3 to 67.1.0.0. ([\matrix-org#14994](matrix-org#14994)) - Bump prometheus-client from 0.15.0 to 0.16.0. ([\matrix-org#14995](matrix-org#14995)) - Bump anyhow from 1.0.68 to 1.0.69. ([\matrix-org#14996](matrix-org#14996)) - Bump serde_json from 1.0.91 to 1.0.92. ([\matrix-org#14997](matrix-org#14997)) - Bump isort from 5.11.4 to 5.11.5. ([\matrix-org#14998](matrix-org#14998)) - Bump phonenumbers from 8.13.4 to 8.13.5. ([\matrix-org#14999](matrix-org#14999)) </details> # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQSTI7xPaHQ1yo0PA8uSL1esuTqr+QUCY+ubcgAKCRCSL1esuTqr # +foKAP9K8HQeGlOns6GRRiyY1EPILRvptAXeMit2eQ19J+ROKAD+JZM5WqlpWAdW # ikmC4GV8hps01IAWFwKtK3+pLqg79gc= # =yBT7 # -----END PGP SIGNATURE----- # gpg: Signature made Tue Feb 14 14:32:18 2023 GMT # gpg: using EDDSA key 9323BC4F687435CA8D0F03CB922F57ACB93AABF9 # gpg: Can't check signature: No public key # Conflicts: # docker/Dockerfile # poetry.lock # rust/src/push/base_rules.rs # rust/src/push/evaluator.rs # rust/src/push/mod.rs # synapse/config/experimental.py # synapse/event_auth.py # synapse/handlers/message.py # synapse/handlers/pagination.py # synapse/push/bulk_push_rule_evaluator.py # synapse/rest/admin/rooms.py # synapse/storage/databases/main/devices.py # synapse/storage/databases/main/roommember.py # tests/push/test_push_rule_evaluator.py
1 parent 431eed9 commit 120c50b

File tree

262 files changed

+6314
-2291
lines changed

Some content is hidden

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

262 files changed

+6314
-2291
lines changed

.ci/scripts/auditwheel_wrapper.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ def cpython(wheel_file: str, name: str, version: Version, tag: Tag) -> str:
5050

5151
check_is_abi3_compatible(wheel_file)
5252

53-
abi3_tag = Tag(tag.interpreter, "abi3", tag.platform)
53+
# HACK: it seems that some older versions of pip will consider a wheel marked
54+
# as macosx_11_0 as incompatible with Big Sur. I haven't done the full archaeology
55+
# here; there are some clues in
56+
# https://github.com/pantsbuild/pants/pull/12857
57+
# https://github.com/pypa/pip/issues/9138
58+
# https://github.com/pypa/packaging/pull/319
59+
# Empirically this seems to work, note that macOS 11 and 10.16 are the same,
60+
# both versions are valid for backwards compatibility.
61+
platform = tag.platform.replace("macosx_11_0", "macosx_10_16")
62+
abi3_tag = Tag(tag.interpreter, "abi3", platform)
5463

5564
dirname = os.path.dirname(wheel_file)
5665
new_wheel_file = os.path.join(

.ci/scripts/check_lockfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#! /usr/bin/env python
2+
import sys
3+
4+
if sys.version_info < (3, 11):
5+
raise RuntimeError("Requires at least Python 3.11, to import tomllib")
6+
7+
import tomllib
8+
9+
with open("poetry.lock", "rb") as f:
10+
lockfile = tomllib.load(f)
11+
12+
try:
13+
lock_version = lockfile["metadata"]["lock-version"]
14+
assert lock_version == "2.0"
15+
except Exception:
16+
print(
17+
"""\
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
20+
https://matrix-org.github.io/synapse/develop/development/dependencies.html
21+
"""
22+
)
23+
raise

.ci/scripts/prepare_old_deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ with open('pyproject.toml', 'w') as f:
5353
"
5454
python3 -c "$REMOVE_DEV_DEPENDENCIES"
5555

56-
pip install poetry==1.2.0
56+
pip install poetry==1.3.2
5757
poetry lock
5858

5959
echo "::group::Patched pyproject.toml"

.ci/scripts/test_export_data_command.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ poetry run python -m synapse.app.admin_cmd -c .ci/sqlite-config.yaml export-dat
2323
--output-directory /tmp/export_data
2424

2525
# Test that the output directory exists and contains the rooms directory
26-
dir="/tmp/export_data/rooms"
27-
if [ -d "$dir" ]; then
26+
dir_r="/tmp/export_data/rooms"
27+
dir_u="/tmp/export_data/user_data"
28+
if [ -d "$dir_r" ] && [ -d "$dir_u" ]; then
2829
echo "Command successful, this test passes"
2930
else
3031
echo "No output directories found, the command fails against a sqlite database."
@@ -43,8 +44,9 @@ poetry run python -m synapse.app.admin_cmd -c .ci/postgres-config.yaml export-d
4344
--output-directory /tmp/export_data2
4445

4546
# Test that the output directory exists and contains the rooms directory
46-
dir2="/tmp/export_data2/rooms"
47-
if [ -d "$dir2" ]; then
47+
dir_r2="/tmp/export_data2/rooms"
48+
dir_u2="/tmp/export_data2/user_data"
49+
if [ -d "$dir_r2" ] && [ -d "$dir_u2" ]; then
4850
echo "Command successful, this test passes"
4951
else
5052
echo "No output directories found, the command fails against a postgres database."

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
type=pep440,pattern={{raw}}
4949
5050
- name: Build and push all platforms
51-
uses: docker/build-push-action@v3
51+
uses: docker/build-push-action@v4
5252
with:
5353
push: true
5454
labels: "gitsha1=${{ github.sha }}"

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
5959
# Deploy to the target directory.
6060
- name: Deploy to gh pages
61-
uses: peaceiris/actions-gh-pages@64b46b4226a4a12da2239ba3ea5aa73e3163c75b # v3.9.1
61+
uses: peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2
6262
with:
6363
github_token: ${{ secrets.GITHUB_TOKEN }}
6464
publish_dir: ./book

.github/workflows/latest_deps.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v3
2929
- name: Install Rust
30-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
30+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
3131
with:
3232
toolchain: stable
3333
- uses: Swatinem/rust-cache@v2
@@ -37,7 +37,7 @@ jobs:
3737
- uses: matrix-org/setup-python-poetry@v1
3838
with:
3939
python-version: "3.x"
40-
poetry-version: "1.2.0"
40+
poetry-version: "1.3.2"
4141
extras: "all"
4242
# Dump installed versions for debugging.
4343
- run: poetry run pip list > before.txt
@@ -61,7 +61,7 @@ jobs:
6161
- uses: actions/checkout@v3
6262

6363
- name: Install Rust
64-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
64+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
6565
with:
6666
toolchain: stable
6767
- uses: Swatinem/rust-cache@v2
@@ -134,7 +134,7 @@ jobs:
134134
- uses: actions/checkout@v3
135135

136136
- name: Install Rust
137-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
137+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
138138
with:
139139
toolchain: stable
140140
- uses: Swatinem/rust-cache@v2

.github/workflows/release-artifacts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
python-version: "3.x"
128128

129129
- name: Install cibuildwheel
130-
run: python -m pip install cibuildwheel==2.9.0 poetry==1.2.0
130+
run: python -m pip install cibuildwheel==2.9.0
131131

132132
- name: Set up QEMU to emulate aarch64
133133
if: matrix.arch == 'aarch64'
@@ -148,7 +148,7 @@ jobs:
148148
env:
149149
# Skip testing for platforms which various libraries don't have wheels
150150
# for, and so need extra build deps.
151-
CIBW_TEST_SKIP: pp3{7,9}-* *i686* *musl*
151+
CIBW_TEST_SKIP: pp3*-* *i686* *musl*
152152
# Fix Rust OOM errors on emulated aarch64: https://github.com/rust-lang/cargo/issues/10583
153153
CARGO_NET_GIT_FETCH_WITH_CLI: true
154154
CIBW_ENVIRONMENT_PASS_LINUX: CARGO_NET_GIT_FETCH_WITH_CLI

.github/workflows/tests.yml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v3
36-
- uses: actions/setup-python@v4
37-
with:
38-
python-version: "3.x"
3936
- uses: matrix-org/setup-python-poetry@v1
4037
with:
38+
python-version: "3.x"
39+
poetry-version: "1.3.2"
4140
extras: "all"
4241
- run: poetry run scripts-dev/generate_sample_config.sh --check
4342
- run: poetry run scripts-dev/config-lint.sh
@@ -52,6 +51,15 @@ jobs:
5251
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
5352
- run: scripts-dev/check_schema_delta.py --force-colors
5453

54+
check-lockfile:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v3
58+
- uses: actions/setup-python@v4
59+
with:
60+
python-version: "3.x"
61+
- run: .ci/scripts/check_lockfile.py
62+
5563
lint:
5664
uses: "matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v2"
5765
with:
@@ -88,6 +96,7 @@ jobs:
8896
ref: ${{ github.event.pull_request.head.sha }}
8997
- uses: matrix-org/setup-python-poetry@v1
9098
with:
99+
poetry-version: "1.3.2"
91100
extras: "all"
92101
- run: poetry run scripts-dev/check_pydantic_models.py
93102

@@ -103,7 +112,7 @@ jobs:
103112
# There don't seem to be versioned releases of this action per se: for each rust
104113
# version there is a branch which gets constantly rebased on top of master.
105114
# We pin to a specific commit for paranoia's sake.
106-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
115+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
107116
with:
108117
toolchain: 1.58.1
109118
components: clippy
@@ -125,7 +134,7 @@ jobs:
125134
# There don't seem to be versioned releases of this action per se: for each rust
126135
# version there is a branch which gets constantly rebased on top of master.
127136
# We pin to a specific commit for paranoia's sake.
128-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
137+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
129138
with:
130139
toolchain: nightly-2022-12-01
131140
components: clippy
@@ -145,7 +154,7 @@ jobs:
145154
# There don't seem to be versioned releases of this action per se: for each rust
146155
# version there is a branch which gets constantly rebased on top of master.
147156
# We pin to a specific commit for paranoia's sake.
148-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
157+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
149158
with:
150159
toolchain: 1.58.1
151160
components: rustfmt
@@ -163,6 +172,7 @@ jobs:
163172
- lint-pydantic
164173
- check-sampleconfig
165174
- check-schema-delta
175+
- check-lockfile
166176
- lint-clippy
167177
- lint-rustfmt
168178
runs-on: ubuntu-latest
@@ -211,14 +221,15 @@ jobs:
211221
# There don't seem to be versioned releases of this action per se: for each rust
212222
# version there is a branch which gets constantly rebased on top of master.
213223
# We pin to a specific commit for paranoia's sake.
214-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
224+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
215225
with:
216226
toolchain: 1.58.1
217227
- uses: Swatinem/rust-cache@v2
218228

219229
- uses: matrix-org/setup-python-poetry@v1
220230
with:
221231
python-version: ${{ matrix.job.python-version }}
232+
poetry-version: "1.3.2"
222233
extras: ${{ matrix.job.extras }}
223234
- name: Await PostgreSQL
224235
if: ${{ matrix.job.postgres-version }}
@@ -255,7 +266,7 @@ jobs:
255266
# There don't seem to be versioned releases of this action per se: for each rust
256267
# version there is a branch which gets constantly rebased on top of master.
257268
# We pin to a specific commit for paranoia's sake.
258-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
269+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
259270
with:
260271
toolchain: 1.58.1
261272
- uses: Swatinem/rust-cache@v2
@@ -294,6 +305,7 @@ jobs:
294305
- uses: matrix-org/setup-python-poetry@v1
295306
with:
296307
python-version: '3.7'
308+
poetry-version: "1.3.2"
297309
extras: "all test"
298310

299311
- run: poetry run trial -j6 tests
@@ -328,6 +340,7 @@ jobs:
328340
- uses: matrix-org/setup-python-poetry@v1
329341
with:
330342
python-version: ${{ matrix.python-version }}
343+
poetry-version: "1.3.2"
331344
extras: ${{ matrix.extras }}
332345
- run: poetry run trial --jobs=2 tests
333346
- name: Dump logs
@@ -373,7 +386,7 @@ jobs:
373386
# There don't seem to be versioned releases of this action per se: for each rust
374387
# version there is a branch which gets constantly rebased on top of master.
375388
# We pin to a specific commit for paranoia's sake.
376-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
389+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
377390
with:
378391
toolchain: 1.58.1
379392
- uses: Swatinem/rust-cache@v2
@@ -419,6 +432,7 @@ jobs:
419432
- run: sudo apt-get -qq install xmlsec1 postgresql-client
420433
- uses: matrix-org/setup-python-poetry@v1
421434
with:
435+
poetry-version: "1.3.2"
422436
extras: "postgres"
423437
- run: .ci/scripts/test_export_data_command.sh
424438
env:
@@ -470,6 +484,7 @@ jobs:
470484
- uses: matrix-org/setup-python-poetry@v1
471485
with:
472486
python-version: ${{ matrix.python-version }}
487+
poetry-version: "1.3.2"
473488
extras: "postgres"
474489
- run: .ci/scripts/test_synapse_port_db.sh
475490
id: run_tester_script
@@ -516,7 +531,7 @@ jobs:
516531
# There don't seem to be versioned releases of this action per se: for each rust
517532
# version there is a branch which gets constantly rebased on top of master.
518533
# We pin to a specific commit for paranoia's sake.
519-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
534+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
520535
with:
521536
toolchain: 1.58.1
522537
- uses: Swatinem/rust-cache@v2
@@ -526,8 +541,11 @@ jobs:
526541

527542
- run: |
528543
set -o pipefail
529-
POSTGRES=${{ (matrix.database == 'Postgres') && 1 || '' }} WORKERS=${{ (matrix.arrangement == 'workers') && 1 || '' }} COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
544+
COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
530545
shell: bash
546+
env:
547+
POSTGRES: ${{ (matrix.database == 'Postgres') && 1 || '' }}
548+
WORKERS: ${{ (matrix.arrangement == 'workers') && 1 || '' }}
531549
name: Run Complement Tests
532550
533551
cargo-test:
@@ -544,13 +562,36 @@ jobs:
544562
# There don't seem to be versioned releases of this action per se: for each rust
545563
# version there is a branch which gets constantly rebased on top of master.
546564
# We pin to a specific commit for paranoia's sake.
547-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
565+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
548566
with:
549567
toolchain: 1.58.1
550568
- uses: Swatinem/rust-cache@v2
551569

552570
- run: cargo test
553571

572+
# We want to ensure that the cargo benchmarks still compile, which requires a
573+
# nightly compiler.
574+
cargo-bench:
575+
if: ${{ needs.changes.outputs.rust == 'true' }}
576+
runs-on: ubuntu-latest
577+
needs:
578+
- linting-done
579+
- changes
580+
581+
steps:
582+
- uses: actions/checkout@v3
583+
584+
- name: Install Rust
585+
# There don't seem to be versioned releases of this action per se: for each rust
586+
# version there is a branch which gets constantly rebased on top of master.
587+
# We pin to a specific commit for paranoia's sake.
588+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
589+
with:
590+
toolchain: nightly-2022-12-01
591+
- uses: Swatinem/rust-cache@v2
592+
593+
- run: cargo bench --no-run
594+
554595
# a job which marks all the other jobs as complete, thus allowing PRs to be merged.
555596
tests-done:
556597
if: ${{ always() }}
@@ -562,6 +603,7 @@ jobs:
562603
- portdb
563604
- complement
564605
- cargo-test
606+
- cargo-bench
565607
runs-on: ubuntu-latest
566608
steps:
567609
- uses: matrix-org/done-action@v2
@@ -573,3 +615,4 @@ jobs:
573615
skippable: |
574616
lint-newsfile
575617
cargo-test
618+
cargo-bench

.github/workflows/twisted_trunk.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v3
1919

2020
- name: Install Rust
21-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
21+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
2222
with:
2323
toolchain: stable
2424
- uses: Swatinem/rust-cache@v2
@@ -43,7 +43,7 @@ jobs:
4343
- run: sudo apt-get -qq install xmlsec1
4444

4545
- name: Install Rust
46-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
46+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
4747
with:
4848
toolchain: stable
4949
- uses: Swatinem/rust-cache@v2
@@ -82,7 +82,7 @@ jobs:
8282
- uses: actions/checkout@v3
8383

8484
- name: Install Rust
85-
uses: dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
85+
uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
8686
with:
8787
toolchain: stable
8888
- uses: Swatinem/rust-cache@v2
@@ -148,7 +148,7 @@ jobs:
148148
run: |
149149
set -x
150150
DEBIAN_FRONTEND=noninteractive sudo apt-get install -yqq python3 pipx
151-
pipx install poetry==1.2.0
151+
pipx install poetry==1.3.2
152152
153153
poetry remove -n twisted
154154
poetry add -n --extras tls git+https://github.com/twisted/twisted.git#trunk

0 commit comments

Comments
 (0)