Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f235231492 |
@@ -1,141 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# Wraps `auditwheel repair` to first check if we're repairing a potentially abi3
|
|
||||||
# compatible wheel, if so rename the wheel before repairing it.
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
from typing import Optional
|
|
||||||
from zipfile import ZipFile
|
|
||||||
|
|
||||||
from packaging.tags import Tag
|
|
||||||
from packaging.utils import parse_wheel_filename
|
|
||||||
from packaging.version import Version
|
|
||||||
|
|
||||||
|
|
||||||
def check_is_abi3_compatible(wheel_file: str) -> None:
|
|
||||||
"""Check the contents of the built wheel for any `.so` files that are *not*
|
|
||||||
abi3 compatible.
|
|
||||||
"""
|
|
||||||
|
|
||||||
with ZipFile(wheel_file, "r") as wheel:
|
|
||||||
for file in wheel.namelist():
|
|
||||||
if not file.endswith(".so"):
|
|
||||||
continue
|
|
||||||
|
|
||||||
if not file.endswith(".abi3.so"):
|
|
||||||
raise Exception(f"Found non-abi3 lib: {file}")
|
|
||||||
|
|
||||||
|
|
||||||
def cpython(wheel_file: str, name: str, version: Version, tag: Tag) -> str:
|
|
||||||
"""Replaces the cpython wheel file with a ABI3 compatible wheel"""
|
|
||||||
|
|
||||||
if tag.abi == "abi3":
|
|
||||||
# Nothing to do.
|
|
||||||
return wheel_file
|
|
||||||
|
|
||||||
check_is_abi3_compatible(wheel_file)
|
|
||||||
|
|
||||||
# HACK: it seems that some older versions of pip will consider a wheel marked
|
|
||||||
# as macosx_11_0 as incompatible with Big Sur. I haven't done the full archaeology
|
|
||||||
# here; there are some clues in
|
|
||||||
# https://github.com/pantsbuild/pants/pull/12857
|
|
||||||
# https://github.com/pypa/pip/issues/9138
|
|
||||||
# https://github.com/pypa/packaging/pull/319
|
|
||||||
# Empirically this seems to work, note that macOS 11 and 10.16 are the same,
|
|
||||||
# both versions are valid for backwards compatibility.
|
|
||||||
platform = tag.platform.replace("macosx_11_0", "macosx_10_16")
|
|
||||||
abi3_tag = Tag(tag.interpreter, "abi3", platform)
|
|
||||||
|
|
||||||
dirname = os.path.dirname(wheel_file)
|
|
||||||
new_wheel_file = os.path.join(
|
|
||||||
dirname,
|
|
||||||
f"{name}-{version}-{abi3_tag}.whl",
|
|
||||||
)
|
|
||||||
|
|
||||||
os.rename(wheel_file, new_wheel_file)
|
|
||||||
|
|
||||||
print("Renamed wheel to", new_wheel_file)
|
|
||||||
|
|
||||||
return new_wheel_file
|
|
||||||
|
|
||||||
|
|
||||||
def main(wheel_file: str, dest_dir: str, archs: Optional[str]) -> None:
|
|
||||||
"""Entry point"""
|
|
||||||
|
|
||||||
# Parse the wheel file name into its parts. Note that `parse_wheel_filename`
|
|
||||||
# normalizes the package name (i.e. it converts matrix_synapse ->
|
|
||||||
# matrix-synapse), which is not what we want.
|
|
||||||
_, version, build, tags = parse_wheel_filename(os.path.basename(wheel_file))
|
|
||||||
name = os.path.basename(wheel_file).split("-")[0]
|
|
||||||
|
|
||||||
if len(tags) != 1:
|
|
||||||
# We expect only a wheel file with only a single tag
|
|
||||||
raise Exception(f"Unexpectedly found multiple tags: {tags}")
|
|
||||||
|
|
||||||
tag = next(iter(tags))
|
|
||||||
|
|
||||||
if build:
|
|
||||||
# We don't use build tags in Synapse
|
|
||||||
raise Exception(f"Unexpected build tag: {build}")
|
|
||||||
|
|
||||||
# If the wheel is for cpython then convert it into an abi3 wheel.
|
|
||||||
if tag.interpreter.startswith("cp"):
|
|
||||||
wheel_file = cpython(wheel_file, name, version, tag)
|
|
||||||
|
|
||||||
# Finally, repair the wheel.
|
|
||||||
if archs is not None:
|
|
||||||
# If we are given archs then we are on macos and need to use
|
|
||||||
# `delocate-listdeps`.
|
|
||||||
subprocess.run(["delocate-listdeps", wheel_file], check=True)
|
|
||||||
subprocess.run(
|
|
||||||
["delocate-wheel", "--require-archs", archs, "-w", dest_dir, wheel_file],
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
subprocess.run(["auditwheel", "repair", "-w", dest_dir, wheel_file], check=True)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser(description="Tag wheel as abi3 and repair it.")
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"--wheel-dir",
|
|
||||||
"-w",
|
|
||||||
metavar="WHEEL_DIR",
|
|
||||||
help="Directory to store delocated wheels",
|
|
||||||
required=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"--require-archs",
|
|
||||||
metavar="archs",
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"wheel_file",
|
|
||||||
metavar="WHEEL_FILE",
|
|
||||||
)
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
wheel_file = args.wheel_file
|
|
||||||
wheel_dir = args.wheel_dir
|
|
||||||
archs = args.require_archs
|
|
||||||
|
|
||||||
main(wheel_file, wheel_dir, archs)
|
|
||||||
@@ -18,13 +18,6 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def set_output(key: str, value: str):
|
|
||||||
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
|
|
||||||
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
|
|
||||||
print(f"{key}={value}", file=f)
|
|
||||||
|
|
||||||
|
|
||||||
IS_PR = os.environ["GITHUB_REF"].startswith("refs/pull/")
|
IS_PR = os.environ["GITHUB_REF"].startswith("refs/pull/")
|
||||||
|
|
||||||
# First calculate the various trial jobs.
|
# First calculate the various trial jobs.
|
||||||
@@ -46,7 +39,7 @@ if not IS_PR:
|
|||||||
"database": "sqlite",
|
"database": "sqlite",
|
||||||
"extras": "all",
|
"extras": "all",
|
||||||
}
|
}
|
||||||
for version in ("3.8", "3.9", "3.10", "3.11")
|
for version in ("3.8", "3.9", "3.10")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -54,7 +47,7 @@ trial_postgres_tests = [
|
|||||||
{
|
{
|
||||||
"python-version": "3.7",
|
"python-version": "3.7",
|
||||||
"database": "postgres",
|
"database": "postgres",
|
||||||
"postgres-version": "11",
|
"postgres-version": "10",
|
||||||
"extras": "all",
|
"extras": "all",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -62,9 +55,9 @@ trial_postgres_tests = [
|
|||||||
if not IS_PR:
|
if not IS_PR:
|
||||||
trial_postgres_tests.append(
|
trial_postgres_tests.append(
|
||||||
{
|
{
|
||||||
"python-version": "3.11",
|
"python-version": "3.10",
|
||||||
"database": "postgres",
|
"database": "postgres",
|
||||||
"postgres-version": "15",
|
"postgres-version": "14",
|
||||||
"extras": "all",
|
"extras": "all",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -88,7 +81,7 @@ print("::endgroup::")
|
|||||||
test_matrix = json.dumps(
|
test_matrix = json.dumps(
|
||||||
trial_sqlite_tests + trial_postgres_tests + trial_no_extra_tests
|
trial_sqlite_tests + trial_postgres_tests + trial_no_extra_tests
|
||||||
)
|
)
|
||||||
set_output("trial_test_matrix", test_matrix)
|
print(f"::set-output name=trial_test_matrix::{test_matrix}")
|
||||||
|
|
||||||
|
|
||||||
# First calculate the various sytest jobs.
|
# First calculate the various sytest jobs.
|
||||||
@@ -109,26 +102,11 @@ sytest_tests = [
|
|||||||
"postgres": "multi-postgres",
|
"postgres": "multi-postgres",
|
||||||
"workers": "workers",
|
"workers": "workers",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"sytest-tag": "focal",
|
|
||||||
"postgres": "multi-postgres",
|
|
||||||
"workers": "workers",
|
|
||||||
"reactor": "asyncio",
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if not IS_PR:
|
if not IS_PR:
|
||||||
sytest_tests.extend(
|
sytest_tests.extend(
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"sytest-tag": "focal",
|
|
||||||
"reactor": "asyncio",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sytest-tag": "focal",
|
|
||||||
"postgres": "postgres",
|
|
||||||
"reactor": "asyncio",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"sytest-tag": "testing",
|
"sytest-tag": "testing",
|
||||||
"postgres": "postgres",
|
"postgres": "postgres",
|
||||||
@@ -147,4 +125,4 @@ print(json.dumps(sytest_tests, indent=4))
|
|||||||
print("::endgroup::")
|
print("::endgroup::")
|
||||||
|
|
||||||
test_matrix = json.dumps(sytest_tests)
|
test_matrix = json.dumps(sytest_tests)
|
||||||
set_output("sytest_test_matrix", test_matrix)
|
print(f"::set-output name=sytest_test_matrix::{test_matrix}")
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
#! /usr/bin/env python
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if sys.version_info < (3, 11):
|
|
||||||
raise RuntimeError("Requires at least Python 3.11, to import tomllib")
|
|
||||||
|
|
||||||
import tomllib
|
|
||||||
|
|
||||||
with open("poetry.lock", "rb") as f:
|
|
||||||
lockfile = tomllib.load(f)
|
|
||||||
|
|
||||||
try:
|
|
||||||
lock_version = lockfile["metadata"]["lock-version"]
|
|
||||||
assert lock_version == "2.0"
|
|
||||||
except Exception:
|
|
||||||
print(
|
|
||||||
"""\
|
|
||||||
Lockfile is not version 2.0. You probably need to upgrade poetry on your local box
|
|
||||||
and re-run `poetry lock --no-update`. See the Poetry cheat sheet at
|
|
||||||
https://matrix-org.github.io/synapse/develop/development/dependencies.html
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
raise
|
|
||||||
Executable
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import psycopg2
|
||||||
|
|
||||||
|
# a very simple replacment for `psql`, to make up for the lack of the postgres client
|
||||||
|
# libraries in the synapse docker image.
|
||||||
|
|
||||||
|
# We use "postgres" as a database because it's bound to exist and the "synapse" one
|
||||||
|
# doesn't exist yet.
|
||||||
|
db_conn = psycopg2.connect(
|
||||||
|
user="postgres", host="localhost", password="postgres", dbname="postgres"
|
||||||
|
)
|
||||||
|
db_conn.autocommit = True
|
||||||
|
cur = db_conn.cursor()
|
||||||
|
for c in sys.argv[1:]:
|
||||||
|
cur.execute(c)
|
||||||
@@ -31,6 +31,34 @@ sed -i \
|
|||||||
-e '/systemd/d' \
|
-e '/systemd/d' \
|
||||||
pyproject.toml
|
pyproject.toml
|
||||||
|
|
||||||
|
# Use poetry to do the installation. This ensures that the versions are all mutually
|
||||||
|
# compatible (as far the package metadata declares, anyway); pip's package resolver
|
||||||
|
# is more lax.
|
||||||
|
#
|
||||||
|
# Rather than `poetry install --no-dev`, we drop all dev dependencies from the
|
||||||
|
# toml file. This means we don't have to ensure compatibility between old deps and
|
||||||
|
# dev tools.
|
||||||
|
|
||||||
|
pip install toml wheel
|
||||||
|
|
||||||
|
REMOVE_DEV_DEPENDENCIES="
|
||||||
|
import toml
|
||||||
|
with open('pyproject.toml', 'r') as f:
|
||||||
|
data = toml.loads(f.read())
|
||||||
|
|
||||||
|
del data['tool']['poetry']['dev-dependencies']
|
||||||
|
|
||||||
|
with open('pyproject.toml', 'w') as f:
|
||||||
|
toml.dump(data, f)
|
||||||
|
"
|
||||||
|
python3 -c "$REMOVE_DEV_DEPENDENCIES"
|
||||||
|
|
||||||
|
pip install poetry==1.2.0
|
||||||
|
poetry lock
|
||||||
|
|
||||||
echo "::group::Patched pyproject.toml"
|
echo "::group::Patched pyproject.toml"
|
||||||
cat pyproject.toml
|
cat pyproject.toml
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
echo "::group::Lockfile after patch"
|
||||||
|
cat poetry.lock
|
||||||
|
echo "::endgroup::"
|
||||||
|
|||||||
@@ -9,9 +9,19 @@ set -eu
|
|||||||
alias block='{ set +x; } 2>/dev/null; func() { echo "::group::$*"; set -x; }; func'
|
alias block='{ set +x; } 2>/dev/null; func() { echo "::group::$*"; set -x; }; func'
|
||||||
alias endblock='{ set +x; } 2>/dev/null; func() { echo "::endgroup::"; set -x; }; func'
|
alias endblock='{ set +x; } 2>/dev/null; func() { echo "::endgroup::"; set -x; }; func'
|
||||||
|
|
||||||
|
block Set Go Version
|
||||||
|
# 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.
|
||||||
|
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
|
||||||
|
|
||||||
|
# Add Go 1.17 to the PATH: see https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-2
|
||||||
|
echo "$GOROOT_1_17_X64/bin" >> $GITHUB_PATH
|
||||||
|
# Add the Go path to the PATH: We need this so we can call gotestfmt
|
||||||
|
echo "~/go/bin" >> $GITHUB_PATH
|
||||||
|
endblock
|
||||||
|
|
||||||
block Install Complement Dependencies
|
block Install Complement Dependencies
|
||||||
sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev
|
sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev
|
||||||
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
|
go get -v github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest
|
||||||
endblock
|
endblock
|
||||||
|
|
||||||
block Install custom gotestfmt template
|
block Install custom gotestfmt template
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ poetry run python -m synapse.app.admin_cmd -c .ci/sqlite-config.yaml export-dat
|
|||||||
--output-directory /tmp/export_data
|
--output-directory /tmp/export_data
|
||||||
|
|
||||||
# Test that the output directory exists and contains the rooms directory
|
# Test that the output directory exists and contains the rooms directory
|
||||||
dir_r="/tmp/export_data/rooms"
|
dir="/tmp/export_data/rooms"
|
||||||
dir_u="/tmp/export_data/user_data"
|
if [ -d "$dir" ]; then
|
||||||
if [ -d "$dir_r" ] && [ -d "$dir_u" ]; then
|
|
||||||
echo "Command successful, this test passes"
|
echo "Command successful, this test passes"
|
||||||
else
|
else
|
||||||
echo "No output directories found, the command fails against a sqlite database."
|
echo "No output directories found, the command fails against a sqlite database."
|
||||||
@@ -33,7 +32,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the PostgreSQL database.
|
# Create the PostgreSQL database.
|
||||||
psql -c "CREATE DATABASE synapse"
|
poetry run .ci/scripts/postgres_exec.py "CREATE DATABASE synapse"
|
||||||
|
|
||||||
# Port the SQLite databse to postgres so we can check command works against postgres
|
# Port the SQLite databse to postgres so we can check command works against postgres
|
||||||
echo "+++ Port SQLite3 databse to postgres"
|
echo "+++ Port SQLite3 databse to postgres"
|
||||||
@@ -44,9 +43,8 @@ poetry run python -m synapse.app.admin_cmd -c .ci/postgres-config.yaml export-d
|
|||||||
--output-directory /tmp/export_data2
|
--output-directory /tmp/export_data2
|
||||||
|
|
||||||
# Test that the output directory exists and contains the rooms directory
|
# Test that the output directory exists and contains the rooms directory
|
||||||
dir_r2="/tmp/export_data2/rooms"
|
dir2="/tmp/export_data2/rooms"
|
||||||
dir_u2="/tmp/export_data2/user_data"
|
if [ -d "$dir2" ]; then
|
||||||
if [ -d "$dir_r2" ] && [ -d "$dir_u2" ]; then
|
|
||||||
echo "Command successful, this test passes"
|
echo "Command successful, this test passes"
|
||||||
else
|
else
|
||||||
echo "No output directories found, the command fails against a postgres database."
|
echo "No output directories found, the command fails against a postgres database."
|
||||||
|
|||||||
@@ -2,27 +2,27 @@
|
|||||||
#
|
#
|
||||||
# Test script for 'synapse_port_db'.
|
# Test script for 'synapse_port_db'.
|
||||||
# - configures synapse and a postgres server.
|
# - configures synapse and a postgres server.
|
||||||
# - runs the port script on a prepopulated test sqlite db. Checks that the
|
# - runs the port script on a prepopulated test sqlite db
|
||||||
# return code is zero.
|
# - also runs it against an new sqlite db
|
||||||
# - reruns the port script on the same sqlite db, targetting the same postgres db.
|
|
||||||
# Checks that the return code is zero.
|
|
||||||
# - runs the port script against a new sqlite db. Checks the return code is zero.
|
|
||||||
#
|
#
|
||||||
# Expects Synapse to have been already installed with `poetry install --extras postgres`.
|
# Expects Synapse to have been already installed with `poetry install --extras postgres`.
|
||||||
# Expects `poetry` to be available on the `PATH`.
|
# Expects `poetry` to be available on the `PATH`.
|
||||||
|
|
||||||
set -xe -o pipefail
|
set -xe
|
||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
|
|
||||||
echo "--- Generate the signing key"
|
echo "--- Generate the signing key"
|
||||||
|
|
||||||
|
# Generate the server's signing key.
|
||||||
poetry run synapse_homeserver --generate-keys -c .ci/sqlite-config.yaml
|
poetry run synapse_homeserver --generate-keys -c .ci/sqlite-config.yaml
|
||||||
|
|
||||||
echo "--- Prepare test database"
|
echo "--- Prepare test database"
|
||||||
# Make sure the SQLite3 database is using the latest schema and has no pending background updates.
|
|
||||||
|
# Make sure the SQLite3 database is using the latest schema and has no pending background update.
|
||||||
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
||||||
|
|
||||||
# Create the PostgreSQL database.
|
# Create the PostgreSQL database.
|
||||||
psql -c "CREATE DATABASE synapse"
|
poetry run .ci/scripts/postgres_exec.py "CREATE DATABASE synapse"
|
||||||
|
|
||||||
echo "+++ Run synapse_port_db against test database"
|
echo "+++ Run synapse_port_db against test database"
|
||||||
# TODO: this invocation of synapse_port_db (and others below) used to be prepended with `coverage run`,
|
# TODO: this invocation of synapse_port_db (and others below) used to be prepended with `coverage run`,
|
||||||
@@ -45,23 +45,9 @@ rm .ci/test_db.db
|
|||||||
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
||||||
|
|
||||||
# re-create the PostgreSQL database.
|
# re-create the PostgreSQL database.
|
||||||
psql \
|
poetry run .ci/scripts/postgres_exec.py \
|
||||||
-c "DROP DATABASE synapse" \
|
"DROP DATABASE synapse" \
|
||||||
-c "CREATE DATABASE synapse"
|
"CREATE DATABASE synapse"
|
||||||
|
|
||||||
echo "+++ Run synapse_port_db against empty database"
|
echo "+++ Run synapse_port_db against empty database"
|
||||||
poetry run synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
|
poetry run synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
|
||||||
|
|
||||||
echo "--- Create a brand new postgres database from schema"
|
|
||||||
cp .ci/postgres-config.yaml .ci/postgres-config-unported.yaml
|
|
||||||
sed -i -e 's/database: synapse/database: synapse_unported/' .ci/postgres-config-unported.yaml
|
|
||||||
psql -c "CREATE DATABASE synapse_unported"
|
|
||||||
poetry run update_synapse_database --database-config .ci/postgres-config-unported.yaml --run-background-updates
|
|
||||||
|
|
||||||
echo "+++ Comparing ported schema with unported schema"
|
|
||||||
# Ignore the tables that portdb creates. (Should it tidy them up when the porting is completed?)
|
|
||||||
psql synapse -c "DROP TABLE port_from_sqlite3;"
|
|
||||||
pg_dump --format=plain --schema-only --no-tablespaces --no-acl --no-owner synapse_unported > unported.sql
|
|
||||||
pg_dump --format=plain --schema-only --no-tablespaces --no-acl --no-owner synapse > ported.sql
|
|
||||||
# By default, `diff` returns zero if there are no changes and nonzero otherwise
|
|
||||||
diff -u unported.sql ported.sql | tee schema_diff
|
|
||||||
@@ -8,11 +8,8 @@
|
|||||||
!README.rst
|
!README.rst
|
||||||
!pyproject.toml
|
!pyproject.toml
|
||||||
!poetry.lock
|
!poetry.lock
|
||||||
!Cargo.lock
|
|
||||||
!Cargo.toml
|
|
||||||
!build_rust.py
|
!build_rust.py
|
||||||
|
|
||||||
rust/target
|
rust/target
|
||||||
synapse/*.so
|
|
||||||
|
|
||||||
**/__pycache__
|
**/__pycache__
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
# 4 space indentation
|
# 4 space indentation
|
||||||
[*.{py,pyi}]
|
[*.py]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
max_line_length = 88
|
max_line_length = 88
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# TODO: incorporate this into pyproject.toml if flake8 supports it in the future.
|
||||||
|
# See https://github.com/PyCQA/flake8/issues/234
|
||||||
|
[flake8]
|
||||||
|
# see https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
|
||||||
|
# for error codes. The ones we ignore are:
|
||||||
|
# W503: line break before binary operator
|
||||||
|
# W504: line break after binary operator
|
||||||
|
# E203: whitespace before ':' (which is contrary to pep8?)
|
||||||
|
# E731: do not assign a lambda expression, use a def
|
||||||
|
# E501: Line too long (black enforces this for us)
|
||||||
|
ignore=W503,W504,E203,E731,E501
|
||||||
@@ -21,8 +21,4 @@ aff1eb7c671b0a3813407321d2702ec46c71fa56
|
|||||||
0a00b7ff14890987f09112a2ae696c61001e6cf1
|
0a00b7ff14890987f09112a2ae696c61001e6cf1
|
||||||
|
|
||||||
# Convert tests/rest/admin/test_room.py to unix file endings (#7953).
|
# Convert tests/rest/admin/test_room.py to unix file endings (#7953).
|
||||||
c4268e3da64f1abb5b31deaeb5769adb6510c0a7
|
c4268e3da64f1abb5b31deaeb5769adb6510c0a7
|
||||||
|
|
||||||
# Update black to 23.1.0 (#15103)
|
|
||||||
9bb2eac71962970d02842bca441f4bcdbbf93a11
|
|
||||||
|
|
||||||
@@ -74,36 +74,6 @@ body:
|
|||||||
- Debian packages from packages.matrix.org
|
- Debian packages from packages.matrix.org
|
||||||
- pip (from PyPI)
|
- pip (from PyPI)
|
||||||
- Other (please mention below)
|
- Other (please mention below)
|
||||||
- I don't know
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
id: database
|
|
||||||
attributes:
|
|
||||||
label: Database
|
|
||||||
description: |
|
|
||||||
Are you using SQLite or PostgreSQL? What's the version of your database?
|
|
||||||
|
|
||||||
If PostgreSQL, please also answer the following:
|
|
||||||
- are you using a single PostgreSQL server
|
|
||||||
or [separate servers for `main` and `state`](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#databases)?
|
|
||||||
- have you previously ported from SQLite using the Synapse "portdb" script?
|
|
||||||
- have you previously restored from a backup?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: workers
|
|
||||||
attributes:
|
|
||||||
label: Workers
|
|
||||||
description: |
|
|
||||||
Are you running a single Synapse process, or are you running
|
|
||||||
[2 or more workers](https://matrix-org.github.io/synapse/latest/workers.html)?
|
|
||||||
options:
|
|
||||||
- Single process
|
|
||||||
- Multiple workers
|
|
||||||
- I don't know
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: platform
|
id: platform
|
||||||
attributes:
|
attributes:
|
||||||
@@ -113,28 +83,17 @@ body:
|
|||||||
e.g. distro, hardware, if it's running in a vm/container, etc.
|
e.g. distro, hardware, if it's running in a vm/container, etc.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
|
||||||
id: config
|
|
||||||
attributes:
|
|
||||||
label: Configuration
|
|
||||||
description: |
|
|
||||||
Do you have any unusual config options turned on? If so, please provide details.
|
|
||||||
|
|
||||||
- Experimental or undocumented features
|
|
||||||
- [Presence](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#presence)
|
|
||||||
- [Message retention](https://matrix-org.github.io/synapse/latest/message_retention_policies.html)
|
|
||||||
- [Synapse modules](https://matrix-org.github.io/synapse/latest/modules/index.html)
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant log output
|
||||||
description: |
|
description: |
|
||||||
Please copy and paste any relevant log output as text (not images), ideally at INFO or DEBUG log level.
|
Please copy and paste any relevant log output, ideally at INFO or DEBUG log level.
|
||||||
This will be automatically formatted into code, so there is no need for backticks (`\``).
|
This will be automatically formatted into code, so there is no need for backticks.
|
||||||
|
|
||||||
Please be careful to remove any personal or private data.
|
Please be careful to remove any personal or private data.
|
||||||
|
|
||||||
**Bug reports are usually impossible to diagnose without logging.**
|
**Bug reports are usually very difficult to diagnose without logging.**
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- # "pip" is the correct setting for poetry, per https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
|
|
||||||
package-ecosystem: "pip"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
|
|
||||||
- package-ecosystem: "docker"
|
|
||||||
directory: "/docker"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
|
|
||||||
- package-ecosystem: "cargo"
|
|
||||||
directory: "/"
|
|
||||||
versioning-strategy: "lockfile-only"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
@@ -10,7 +10,6 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -18,37 +17,28 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
id: qemu
|
id: qemu
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v1
|
||||||
with:
|
with:
|
||||||
platforms: arm64
|
platforms: arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Inspect builder
|
- name: Inspect builder
|
||||||
run: docker buildx inspect
|
run: docker buildx inspect
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
- name: Log in to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Log in to GHCR
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Calculate docker image tag
|
- name: Calculate docker image tag
|
||||||
id: set-tag
|
id: set-tag
|
||||||
uses: docker/metadata-action@master
|
uses: docker/metadata-action@master
|
||||||
with:
|
with:
|
||||||
images: |
|
images: matrixdotorg/synapse
|
||||||
docker.io/matrixdotorg/synapse
|
|
||||||
ghcr.io/matrix-org/synapse
|
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=false
|
||||||
tags: |
|
tags: |
|
||||||
@@ -58,15 +48,10 @@ jobs:
|
|||||||
type=pep440,pattern={{raw}}
|
type=pep440,pattern={{raw}}
|
||||||
|
|
||||||
- name: Build and push all platforms
|
- name: Build and push all platforms
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
labels: "gitsha1=${{ github.sha }}"
|
labels: "gitsha1=${{ github.sha }}"
|
||||||
tags: "${{ steps.set-tag.outputs.tags }}"
|
tags: "${{ steps.set-tag.outputs.tags }}"
|
||||||
file: "docker/Dockerfile"
|
file: "docker/Dockerfile"
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
# arm64 builds OOM without the git fetch setting. c.f.
|
|
||||||
# https://github.com/rust-lang/cargo/issues/10583
|
|
||||||
build-args: |
|
|
||||||
CARGO_NET_GIT_FETCH_WITH_CLI=true
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
name: Deploy documentation PR preview
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: [ "Prepare documentation PR preview" ]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
netlify:
|
|
||||||
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
|
|
||||||
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
|
|
||||||
- name: 📥 Download artifact
|
|
||||||
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
|
|
||||||
with:
|
|
||||||
workflow: docs-pr.yaml
|
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
|
||||||
name: book
|
|
||||||
path: book
|
|
||||||
|
|
||||||
- name: 📤 Deploy to Netlify
|
|
||||||
uses: matrix-org/netlify-pr-preview@v2
|
|
||||||
with:
|
|
||||||
path: book
|
|
||||||
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
|
||||||
branch: ${{ github.event.workflow_run.head_branch }}
|
|
||||||
revision: ${{ github.event.workflow_run.head_sha }}
|
|
||||||
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
||||||
site_id: ${{ secrets.NETLIFY_SITE_ID }}
|
|
||||||
desc: Documentation preview
|
|
||||||
deployment_env: PR Documentation Preview
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
name: Prepare documentation PR preview
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- docs/**
|
|
||||||
- book.toml
|
|
||||||
- .github/workflows/docs-pr.yaml
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pages:
|
|
||||||
name: GitHub Pages
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup mdbook
|
|
||||||
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
|
|
||||||
with:
|
|
||||||
mdbook-version: '0.4.17'
|
|
||||||
|
|
||||||
- name: Build the documentation
|
|
||||||
# mdbook will only create an index.html if we're including docs/README.md in SUMMARY.md.
|
|
||||||
# However, we're using docs/README.md for other purposes and need to pick a new page
|
|
||||||
# as the default. Let's opt for the welcome page instead.
|
|
||||||
run: |
|
|
||||||
mdbook build
|
|
||||||
cp book/welcome_and_overview.html book/index.html
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: book
|
|
||||||
path: book
|
|
||||||
# We'll only use this in a workflow_run, then we're done with it
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
link-check:
|
|
||||||
name: Check links in documentation
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup mdbook
|
|
||||||
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
|
|
||||||
with:
|
|
||||||
mdbook-version: '0.4.17'
|
|
||||||
|
|
||||||
- name: Setup htmltest
|
|
||||||
run: |
|
|
||||||
wget https://github.com/wjdp/htmltest/releases/download/v0.17.0/htmltest_0.17.0_linux_amd64.tar.gz
|
|
||||||
echo '775c597ee74899d6002cd2d93076f897f4ba68686bceabe2e5d72e84c57bc0fb htmltest_0.17.0_linux_amd64.tar.gz' | sha256sum -c
|
|
||||||
tar zxf htmltest_0.17.0_linux_amd64.tar.gz
|
|
||||||
|
|
||||||
- name: Test links with htmltest
|
|
||||||
# Build the book with `./` as the site URL (to make checks on 404.html possible)
|
|
||||||
# Then run htmltest (without checking external links since that involves the network and is slow).
|
|
||||||
run: |
|
|
||||||
MDBOOK_OUTPUT__HTML__SITE_URL="./" mdbook build
|
|
||||||
./htmltest book --skip-external
|
|
||||||
+21
-60
@@ -13,10 +13,25 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre:
|
pages:
|
||||||
name: Calculate variables for GitHub Pages deployment
|
name: GitHub Pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup mdbook
|
||||||
|
uses: peaceiris/actions-mdbook@4b5ef36b314c2599664ca107bb8c02412548d79d # v1.1.14
|
||||||
|
with:
|
||||||
|
mdbook-version: '0.4.17'
|
||||||
|
|
||||||
|
- name: Build the documentation
|
||||||
|
# mdbook will only create an index.html if we're including docs/README.md in SUMMARY.md.
|
||||||
|
# However, we're using docs/README.md for other purposes and need to pick a new page
|
||||||
|
# as the default. Let's opt for the welcome page instead.
|
||||||
|
run: |
|
||||||
|
mdbook build
|
||||||
|
cp book/welcome_and_overview.html book/index.html
|
||||||
|
|
||||||
# Figure out the target directory.
|
# Figure out the target directory.
|
||||||
#
|
#
|
||||||
# The target directory depends on the name of the branch
|
# The target directory depends on the name of the branch
|
||||||
@@ -39,66 +54,12 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# finally, set the 'branch-version' var.
|
# finally, set the 'branch-version' var.
|
||||||
echo "branch-version=$branch" >> "$GITHUB_OUTPUT"
|
echo "::set-output name=branch-version::$branch"
|
||||||
outputs:
|
|
||||||
branch-version: ${{ steps.vars.outputs.branch-version }}
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
pages-docs:
|
|
||||||
name: GitHub Pages
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- pre
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup mdbook
|
|
||||||
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
|
|
||||||
with:
|
|
||||||
mdbook-version: '0.4.17'
|
|
||||||
|
|
||||||
- name: Build the documentation
|
|
||||||
# mdbook will only create an index.html if we're including docs/README.md in SUMMARY.md.
|
|
||||||
# However, we're using docs/README.md for other purposes and need to pick a new page
|
|
||||||
# as the default. Let's opt for the welcome page instead.
|
|
||||||
run: |
|
|
||||||
mdbook build
|
|
||||||
cp book/welcome_and_overview.html book/index.html
|
|
||||||
|
|
||||||
# Deploy to the target directory.
|
# Deploy to the target directory.
|
||||||
- name: Deploy to gh pages
|
- name: Deploy to gh pages
|
||||||
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
|
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./book
|
publish_dir: ./book
|
||||||
destination_dir: ./${{ needs.pre.outputs.branch-version }}
|
destination_dir: ./${{ steps.vars.outputs.branch-version }}
|
||||||
|
|
||||||
################################################################################
|
|
||||||
pages-devdocs:
|
|
||||||
name: GitHub Pages (developer docs)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- pre
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: "Set up Sphinx"
|
|
||||||
uses: matrix-org/setup-python-poetry@v1
|
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
poetry-version: "1.3.2"
|
|
||||||
groups: "dev-docs"
|
|
||||||
extras: ""
|
|
||||||
|
|
||||||
- name: Build the documentation
|
|
||||||
run: |
|
|
||||||
cd dev-docs
|
|
||||||
poetry run make html
|
|
||||||
|
|
||||||
# Deploy to the target directory.
|
|
||||||
- name: Deploy to gh pages
|
|
||||||
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./dev-docs/_build/html
|
|
||||||
destination_dir: ./dev-docs/${{ needs.pre.outputs.branch-version }}
|
|
||||||
|
|||||||
@@ -25,9 +25,12 @@ jobs:
|
|||||||
mypy:
|
mypy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
# The dev dependencies aren't exposed in the wheel metadata (at least with current
|
# The dev dependencies aren't exposed in the wheel metadata (at least with current
|
||||||
@@ -35,7 +38,7 @@ jobs:
|
|||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
poetry-version: "1.3.2"
|
poetry-version: "1.2.0"
|
||||||
extras: "all"
|
extras: "all"
|
||||||
# Dump installed versions for debugging.
|
# Dump installed versions for debugging.
|
||||||
- run: poetry run pip list > before.txt
|
- run: poetry run pip list > before.txt
|
||||||
@@ -56,10 +59,13 @@ jobs:
|
|||||||
postgres-version: "14"
|
postgres-version: "14"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- run: sudo apt-get -qq install xmlsec1
|
- run: sudo apt-get -qq install xmlsec1
|
||||||
@@ -70,7 +76,7 @@ jobs:
|
|||||||
-e POSTGRES_PASSWORD=postgres \
|
-e POSTGRES_PASSWORD=postgres \
|
||||||
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
|
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
|
||||||
postgres:${{ matrix.postgres-version }}
|
postgres:${{ matrix.postgres-version }}
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
- run: pip install .[all,test]
|
- run: pip install .[all,test]
|
||||||
@@ -127,10 +133,13 @@ jobs:
|
|||||||
BLACKLIST: ${{ matrix.workers && 'synapse-blacklist-with-workers' }}
|
BLACKLIST: ${{ matrix.workers && 'synapse-blacklist-with-workers' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Ensure sytest runs `pip install`
|
- name: Ensure sytest runs `pip install`
|
||||||
@@ -146,7 +155,7 @@ jobs:
|
|||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
|
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
|
||||||
- name: Upload SyTest logs
|
- name: Upload SyTest logs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v2
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.*, ', ') }})
|
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.*, ', ') }})
|
||||||
@@ -173,13 +182,11 @@ jobs:
|
|||||||
database: Postgres
|
database: Postgres
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run actions/checkout@v3 for synapse
|
- name: Run actions/checkout@v2 for synapse
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: synapse
|
path: synapse
|
||||||
|
|
||||||
- uses: actions/setup-go@v4
|
|
||||||
|
|
||||||
- name: Prepare Complement's Prerequisites
|
- name: Prepare Complement's Prerequisites
|
||||||
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
|
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
|
||||||
|
|
||||||
@@ -194,17 +201,16 @@ jobs:
|
|||||||
open-issue:
|
open-issue:
|
||||||
if: "failure() && github.event_name != 'push' && github.event_name != 'pull_request'"
|
if: "failure() && github.event_name != 'push' && github.event_name != 'pull_request'"
|
||||||
needs:
|
needs:
|
||||||
# TODO: should mypy be included here? It feels more brittle than the others.
|
# TODO: should mypy be included here? It feels more brittle than the other two.
|
||||||
- mypy
|
- mypy
|
||||||
- trial
|
- trial
|
||||||
- sytest
|
- sytest
|
||||||
- complement
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
|
- uses: JasonEtco/create-an-issue@5d9504915f79f9cc6d791934b8ef34f2353dd74d # v2.5.0, 2020-12-06
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["develop", "release-*"]
|
|
||||||
paths:
|
|
||||||
- poetry.lock
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- poetry.lock
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-sdists:
|
|
||||||
name: "Check locked dependencies have sdists"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
- run: pip install tomli
|
|
||||||
- run: ./scripts-dev/check_locked_deps_have_sdists.py
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
# This task does not run complement tests, see tests.yaml instead.
|
|
||||||
# This task does not build docker images for synapse for use on docker hub, see docker.yaml instead
|
|
||||||
|
|
||||||
name: Store complement-synapse image in ghcr.io
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
branch:
|
|
||||||
required: true
|
|
||||||
default: 'develop'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- develop
|
|
||||||
- master
|
|
||||||
|
|
||||||
# Only run this action once per pull request/branch; restart if a new commit arrives.
|
|
||||||
# C.f. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
|
|
||||||
# and https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build and push complement image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout specific branch (debug build)
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
with:
|
|
||||||
ref: ${{ inputs.branch }}
|
|
||||||
- name: Checkout clean copy of develop (scheduled build)
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
if: github.event_name == 'schedule'
|
|
||||||
with:
|
|
||||||
ref: develop
|
|
||||||
- name: Checkout clean copy of master (on-push)
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
with:
|
|
||||||
ref: master
|
|
||||||
- name: Login to registry
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Work out labels for complement image
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
images: ghcr.io/${{ github.repository }}/complement-synapse
|
|
||||||
tags: |
|
|
||||||
type=schedule,pattern=nightly,enable=${{ github.event_name == 'schedule'}}
|
|
||||||
type=raw,value=develop,enable=${{ github.event_name == 'schedule' || inputs.branch == 'develop' }}
|
|
||||||
type=raw,value=latest,enable=${{ github.event_name == 'push' || inputs.branch == 'master' }}
|
|
||||||
type=sha,format=long
|
|
||||||
- name: Run scripts-dev/complement.sh to generate complement-synapse:latest image.
|
|
||||||
run: scripts-dev/complement.sh --build-only
|
|
||||||
- name: Tag and push generated image
|
|
||||||
run: |
|
|
||||||
for TAG in ${{ join(fromJson(steps.meta.outputs.json).tags, ' ') }}; do
|
|
||||||
echo "tag and push $TAG"
|
|
||||||
docker tag complement-synapse $TAG
|
|
||||||
docker push $TAG
|
|
||||||
done
|
|
||||||
@@ -4,16 +4,13 @@ name: Build release artifacts
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
# we build on PRs and develop to (hopefully) get early warning
|
# we build on PRs and develop to (hopefully) get early warning
|
||||||
# of things breaking (but only build one set of debs). PRs skip
|
# of things breaking (but only build one set of debs)
|
||||||
# building wheels on macOS & ARM.
|
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: ["develop", "release-*"]
|
branches: ["develop", "release-*"]
|
||||||
|
|
||||||
# we do the full build on tags.
|
# we do the full build on tags.
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
merge_group:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -27,10 +24,8 @@ jobs:
|
|||||||
name: "Calculate list of debian distros"
|
name: "Calculate list of debian distros"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v2
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
- id: set-distros
|
- id: set-distros
|
||||||
run: |
|
run: |
|
||||||
# if we're running from a tag, get the full list of distros; otherwise just use debian:sid
|
# if we're running from a tag, get the full list of distros; otherwise just use debian:sid
|
||||||
@@ -38,7 +33,7 @@ jobs:
|
|||||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
dists=$(scripts-dev/build_debian_packages.py --show-dists-json)
|
dists=$(scripts-dev/build_debian_packages.py --show-dists-json)
|
||||||
fi
|
fi
|
||||||
echo "distros=$dists" >> "$GITHUB_OUTPUT"
|
echo "::set-output name=distros::$dists"
|
||||||
# map the step outputs to job outputs
|
# map the step outputs to job outputs
|
||||||
outputs:
|
outputs:
|
||||||
distros: ${{ steps.set-distros.outputs.distros }}
|
distros: ${{ steps.set-distros.outputs.distros }}
|
||||||
@@ -54,18 +49,18 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: src
|
path: src
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v1
|
||||||
with:
|
with:
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
- name: Set up docker layer caching
|
- name: Set up docker layer caching
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
@@ -73,9 +68,7 @@ jobs:
|
|||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
- name: Set up python
|
- name: Set up python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v2
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
- name: Build the packages
|
- name: Build the packages
|
||||||
# see https://github.com/docker/build-push-action/issues/252
|
# see https://github.com/docker/build-push-action/issues/252
|
||||||
@@ -91,69 +84,45 @@ jobs:
|
|||||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
|
|
||||||
- name: Upload debs as artifacts
|
- name: Upload debs as artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: debs
|
name: debs
|
||||||
path: debs/*
|
path: debs/*
|
||||||
|
|
||||||
build-wheels:
|
build-wheels:
|
||||||
name: Build wheels on ${{ matrix.os }} for ${{ matrix.arch }}
|
name: Build wheels on ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-11]
|
os: [ubuntu-20.04, macos-10.15]
|
||||||
arch: [x86_64, aarch64]
|
|
||||||
# is_pr is a flag used to exclude certain jobs from the matrix on PRs.
|
|
||||||
# It is not read by the rest of the workflow.
|
|
||||||
is_pr:
|
is_pr:
|
||||||
- ${{ startsWith(github.ref, 'refs/pull/') }}
|
- ${{ startsWith(github.ref, 'refs/pull/') }}
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
# Don't build macos wheels on PR CI.
|
# Don't build macos wheels on PR CI.
|
||||||
- is_pr: true
|
- is_pr: true
|
||||||
os: "macos-11"
|
os: "macos-10.15"
|
||||||
# Don't build aarch64 wheels on mac.
|
|
||||||
- os: "macos-11"
|
|
||||||
arch: aarch64
|
|
||||||
# Don't build aarch64 wheels on PR CI.
|
|
||||||
- is_pr: true
|
|
||||||
arch: aarch64
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
|
||||||
# setup-python@v4 doesn't impose a default python version. Need to use 3.x
|
|
||||||
# here, because `python` on osx points to Python 2.7.
|
|
||||||
python-version: "3.x"
|
|
||||||
|
|
||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: python -m pip install cibuildwheel==2.9.0
|
run: python -m pip install cibuildwheel==2.9.0 poetry==1.2.0
|
||||||
|
|
||||||
- name: Set up QEMU to emulate aarch64
|
# Only build a single wheel in CI.
|
||||||
if: matrix.arch == 'aarch64'
|
- name: Set env vars.
|
||||||
uses: docker/setup-qemu-action@v2
|
run: |
|
||||||
with:
|
echo "CIBW_BUILD="cp37-manylinux_x86_64"" >> $GITHUB_ENV
|
||||||
platforms: arm64
|
|
||||||
|
|
||||||
- name: Build aarch64 wheels
|
|
||||||
if: matrix.arch == 'aarch64'
|
|
||||||
run: echo 'CIBW_ARCHS_LINUX=aarch64' >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Only build a single wheel on PR
|
|
||||||
if: startsWith(github.ref, 'refs/pull/')
|
if: startsWith(github.ref, 'refs/pull/')
|
||||||
run: echo "CIBW_BUILD="cp37-manylinux_${{ matrix.arch }}"" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: python -m cibuildwheel --output-dir wheelhouse
|
run: python -m cibuildwheel --output-dir wheelhouse
|
||||||
env:
|
env:
|
||||||
# Skip testing for platforms which various libraries don't have wheels
|
# Skip testing for platforms which various libraries don't have wheels
|
||||||
# for, and so need extra build deps.
|
# for, and so need extra build deps.
|
||||||
CIBW_TEST_SKIP: pp3*-* *i686* *musl*
|
CIBW_TEST_SKIP: pp39-* *i686* *musl* pp37-macosx*
|
||||||
# Fix Rust OOM errors on emulated aarch64: https://github.com/rust-lang/cargo/issues/10583
|
|
||||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
||||||
CIBW_ENVIRONMENT_PASS_LINUX: CARGO_NET_GIT_FETCH_WITH_CLI
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -176,7 +145,7 @@ jobs:
|
|||||||
- name: Build sdist
|
- name: Build sdist
|
||||||
run: python -m build --sdist
|
run: python -m build --sdist
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Sdist
|
name: Sdist
|
||||||
path: dist/*.tar.gz
|
path: dist/*.tar.gz
|
||||||
@@ -193,7 +162,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download all workflow run artifacts
|
- name: Download all workflow run artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v2
|
||||||
- name: Build a tarball for the debs
|
- name: Build a tarball for the debs
|
||||||
run: tar -cvJf debs.tar.xz debs
|
run: tar -cvJf debs.tar.xz debs
|
||||||
- name: Attach to release
|
- name: Attach to release
|
||||||
|
|||||||
+87
-234
@@ -4,8 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: ["develop", "release-*"]
|
branches: ["develop", "release-*"]
|
||||||
pull_request:
|
pull_request:
|
||||||
merge_group:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -28,116 +26,45 @@ jobs:
|
|||||||
rust:
|
rust:
|
||||||
- 'rust/**'
|
- 'rust/**'
|
||||||
- 'Cargo.toml'
|
- 'Cargo.toml'
|
||||||
- 'Cargo.lock'
|
|
||||||
|
|
||||||
check-sampleconfig:
|
check-sampleconfig:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Install Rust
|
- uses: actions/setup-python@v2
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
- run: pip install .
|
||||||
- uses: Swatinem/rust-cache@v2
|
- run: scripts-dev/generate_sample_config.sh --check
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- run: scripts-dev/config-lint.sh
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
poetry-version: "1.3.2"
|
|
||||||
extras: "all"
|
|
||||||
- run: poetry run scripts-dev/generate_sample_config.sh --check
|
|
||||||
- run: poetry run scripts-dev/config-lint.sh
|
|
||||||
|
|
||||||
check-schema-delta:
|
check-schema-delta:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v2
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
|
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
|
||||||
- run: scripts-dev/check_schema_delta.py --force-colors
|
- run: scripts-dev/check_schema_delta.py --force-colors
|
||||||
|
|
||||||
check-lockfile:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
- run: .ci/scripts/check_lockfile.py
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
uses: "matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v1"
|
||||||
steps:
|
with:
|
||||||
- name: Checkout repository
|
typechecking-extras: "all"
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Poetry
|
|
||||||
uses: matrix-org/setup-python-poetry@v1
|
|
||||||
with:
|
|
||||||
install-project: "false"
|
|
||||||
|
|
||||||
- name: Import order (isort)
|
|
||||||
run: poetry run isort --check --diff .
|
|
||||||
|
|
||||||
- name: Code style (black)
|
|
||||||
run: poetry run black --check --diff .
|
|
||||||
|
|
||||||
- name: Semantic checks (ruff)
|
|
||||||
# --quiet suppresses the update check.
|
|
||||||
run: poetry run ruff --quiet .
|
|
||||||
|
|
||||||
lint-mypy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Typechecking
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Poetry
|
|
||||||
uses: matrix-org/setup-python-poetry@v1
|
|
||||||
with:
|
|
||||||
# We want to make use of type hints in optional dependencies too.
|
|
||||||
extras: all
|
|
||||||
# We have seen odd mypy failures that were resolved when we started
|
|
||||||
# installing the project again:
|
|
||||||
# https://github.com/matrix-org/synapse/pull/15376#issuecomment-1498983775
|
|
||||||
# To make CI green, err towards caution and install the project.
|
|
||||||
install-project: "true"
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
# Cribbed from
|
|
||||||
# https://github.com/AustinScola/mypy-cache-github-action/blob/85ea4f2972abed39b33bd02c36e341b28ca59213/src/restore.ts#L10-L17
|
|
||||||
- name: Restore/persist mypy's cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
.mypy_cache
|
|
||||||
key: mypy-cache-${{ github.context.sha }}
|
|
||||||
restore-keys: mypy-cache-
|
|
||||||
|
|
||||||
- name: Run mypy
|
|
||||||
run: poetry run mypy
|
|
||||||
|
|
||||||
lint-crlf:
|
lint-crlf:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Check line endings
|
- name: Check line endings
|
||||||
run: scripts-dev/check_line_terminators.sh
|
run: scripts-dev/check_line_terminators.sh
|
||||||
|
|
||||||
lint-newsfile:
|
lint-newsfile:
|
||||||
if: ${{ (github.base_ref == 'develop' || contains(github.base_ref, 'release-')) && github.actor != 'dependabot[bot]' }}
|
if: ${{ github.base_ref == 'develop' || contains(github.base_ref, 'release-') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v2
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
- run: "pip install 'towncrier>=18.6.0rc1'"
|
- run: "pip install 'towncrier>=18.6.0rc1'"
|
||||||
- run: scripts-dev/check-newsfragment.sh
|
- run: scripts-dev/check-newsfragment.sh
|
||||||
env:
|
env:
|
||||||
@@ -146,15 +73,12 @@ jobs:
|
|||||||
lint-pydantic:
|
lint-pydantic:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Install Rust
|
fetch-depth: 0
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
with:
|
with:
|
||||||
poetry-version: "1.3.2"
|
|
||||||
extras: "all"
|
extras: "all"
|
||||||
- run: poetry run scripts-dev/check_pydantic_models.py
|
- run: poetry run scripts-dev/check_pydantic_models.py
|
||||||
|
|
||||||
@@ -164,34 +88,17 @@ jobs:
|
|||||||
if: ${{ needs.changes.outputs.rust == 'true' }}
|
if: ${{ needs.changes.outputs.rust == 'true' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
toolchain: 1.61.0
|
||||||
|
override: true
|
||||||
components: clippy
|
components: clippy
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- run: cargo clippy -- -D warnings
|
- run: cargo clippy
|
||||||
|
|
||||||
# We also lint against a nightly rustc so that we can lint the benchmark
|
|
||||||
# suite, which requires a nightly compiler.
|
|
||||||
lint-clippy-nightly:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: changes
|
|
||||||
if: ${{ needs.changes.outputs.rust == 'true' }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: nightly-2022-12-01
|
|
||||||
components: clippy
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- run: cargo clippy --all-features -- -D warnings
|
|
||||||
|
|
||||||
lint-rustfmt:
|
lint-rustfmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -199,14 +106,14 @@ jobs:
|
|||||||
if: ${{ needs.changes.outputs.rust == 'true' }}
|
if: ${{ needs.changes.outputs.rust == 'true' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
# We use nightly so that it correctly groups together imports
|
toolchain: 1.61.0
|
||||||
toolchain: nightly-2022-12-01
|
override: true
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- run: cargo fmt --check
|
- run: cargo fmt --check
|
||||||
@@ -216,13 +123,11 @@ jobs:
|
|||||||
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
|
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
|
||||||
needs:
|
needs:
|
||||||
- lint
|
- lint
|
||||||
- lint-mypy
|
|
||||||
- lint-crlf
|
- lint-crlf
|
||||||
- lint-newsfile
|
- lint-newsfile
|
||||||
- lint-pydantic
|
- lint-pydantic
|
||||||
- check-sampleconfig
|
- check-sampleconfig
|
||||||
- check-schema-delta
|
- check-schema-delta
|
||||||
- check-lockfile
|
|
||||||
- lint-clippy
|
- lint-clippy
|
||||||
- lint-rustfmt
|
- lint-rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -234,10 +139,8 @@ jobs:
|
|||||||
needs: linting-done
|
needs: linting-done
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v2
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
- id: get-matrix
|
- id: get-matrix
|
||||||
run: .ci/scripts/calculate_jobs.py
|
run: .ci/scripts/calculate_jobs.py
|
||||||
outputs:
|
outputs:
|
||||||
@@ -253,37 +156,27 @@ jobs:
|
|||||||
job: ${{ fromJson(needs.calculate-test-jobs.outputs.trial_test_matrix) }}
|
job: ${{ fromJson(needs.calculate-test-jobs.outputs.trial_test_matrix) }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- run: sudo apt-get -qq install xmlsec1
|
- run: sudo apt-get -qq install xmlsec1
|
||||||
- name: Set up PostgreSQL ${{ matrix.job.postgres-version }}
|
- name: Set up PostgreSQL ${{ matrix.job.postgres-version }}
|
||||||
if: ${{ matrix.job.postgres-version }}
|
if: ${{ matrix.job.postgres-version }}
|
||||||
# 1. Mount postgres data files onto a tmpfs in-memory filesystem to reduce overhead of docker's overlayfs layer.
|
|
||||||
# 2. Expose the unix socket for postgres. This removes latency of using docker-proxy for connections.
|
|
||||||
run: |
|
run: |
|
||||||
docker run -d -p 5432:5432 \
|
docker run -d -p 5432:5432 \
|
||||||
--tmpfs /var/lib/postgres:rw,size=6144m \
|
|
||||||
--mount 'type=bind,src=/var/run/postgresql,dst=/var/run/postgresql' \
|
|
||||||
-e POSTGRES_PASSWORD=postgres \
|
-e POSTGRES_PASSWORD=postgres \
|
||||||
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
|
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
|
||||||
postgres:${{ matrix.job.postgres-version }}
|
postgres:${{ matrix.job.postgres-version }}
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.job.python-version }}
|
python-version: ${{ matrix.job.python-version }}
|
||||||
poetry-version: "1.3.2"
|
|
||||||
extras: ${{ matrix.job.extras }}
|
extras: ${{ matrix.job.extras }}
|
||||||
- name: Await PostgreSQL
|
- name: Await PostgreSQL
|
||||||
if: ${{ matrix.job.postgres-version }}
|
if: ${{ matrix.job.postgres-version }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
run: until pg_isready -h localhost; do sleep 1; done
|
run: until pg_isready -h localhost; do sleep 1; done
|
||||||
- run: poetry run trial --jobs=6 tests
|
- run: poetry run trial --jobs=2 tests
|
||||||
env:
|
env:
|
||||||
SYNAPSE_POSTGRES: ${{ matrix.job.database == 'postgres' || '' }}
|
SYNAPSE_POSTGRES: ${{ matrix.job.database == 'postgres' || '' }}
|
||||||
SYNAPSE_POSTGRES_HOST: /var/run/postgresql
|
SYNAPSE_POSTGRES_HOST: localhost
|
||||||
SYNAPSE_POSTGRES_USER: postgres
|
SYNAPSE_POSTGRES_USER: postgres
|
||||||
SYNAPSE_POSTGRES_PASSWORD: postgres
|
SYNAPSE_POSTGRES_PASSWORD: postgres
|
||||||
- name: Dump logs
|
- name: Dump logs
|
||||||
@@ -305,42 +198,52 @@ jobs:
|
|||||||
needs: linting-done
|
needs: linting-done
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.61.0
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
# There aren't wheels for some of the older deps, so we need to install
|
# There aren't wheels for some of the older deps, so we need to install
|
||||||
# their build dependencies
|
# their build dependencies
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get -qq update
|
|
||||||
sudo apt-get -qq install build-essential libffi-dev python-dev \
|
sudo apt-get -qq install build-essential libffi-dev python-dev \
|
||||||
libxml2-dev libxslt-dev xmlsec1 zlib1g-dev libjpeg-dev libwebp-dev
|
libxml2-dev libxslt-dev xmlsec1 zlib1g-dev libjpeg-dev libwebp-dev
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
||||||
|
# Calculating the old-deps actually takes a bunch of time, so we cache the
|
||||||
|
# pyproject.toml / poetry.lock. We need to cache pyproject.toml as
|
||||||
|
# otherwise the `poetry install` step will error due to the poetry.lock
|
||||||
|
# file being outdated.
|
||||||
|
#
|
||||||
|
# This caches the output of `Prepare old deps`, which should generate the
|
||||||
|
# same `pyproject.toml` and `poetry.lock` for a given `pyproject.toml` input.
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
id: cache-poetry-old-deps
|
||||||
|
name: Cache poetry.lock
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
poetry.lock
|
||||||
|
pyproject.toml
|
||||||
|
key: poetry-old-deps2-${{ hashFiles('pyproject.toml') }}
|
||||||
- name: Prepare old deps
|
- name: Prepare old deps
|
||||||
if: steps.cache-poetry-old-deps.outputs.cache-hit != 'true'
|
if: steps.cache-poetry-old-deps.outputs.cache-hit != 'true'
|
||||||
run: .ci/scripts/prepare_old_deps.sh
|
run: .ci/scripts/prepare_old_deps.sh
|
||||||
|
|
||||||
# Note: we install using `pip` here, not poetry. `poetry install` ignores the
|
# We only now install poetry so that `setup-python-poetry` caches the
|
||||||
# build-system section (https://github.com/python-poetry/poetry/issues/6154), but
|
# right poetry.lock's dependencies.
|
||||||
# we explicitly want to test that you can `pip install` using the oldest version
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
# of poetry-core and setuptools-rust.
|
with:
|
||||||
- run: pip install .[all,test]
|
python-version: '3.7'
|
||||||
|
extras: "all test"
|
||||||
|
|
||||||
# We nuke the local copy, as we've installed synapse into the virtualenv
|
- run: poetry run trial -j2 tests
|
||||||
# (rather than use an editable install, which we no longer support). If we
|
|
||||||
# don't do this then python can't find the native lib.
|
|
||||||
- run: rm -rf synapse/
|
|
||||||
|
|
||||||
# Sanity check we can import/run Synapse
|
|
||||||
- run: python -m synapse.app.homeserver --help
|
|
||||||
|
|
||||||
- run: python -m twisted.trial -j6 tests
|
|
||||||
- name: Dump logs
|
- name: Dump logs
|
||||||
# Logs are most useful when the command fails, always include them.
|
# Logs are most useful when the command fails, always include them.
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -366,13 +269,12 @@ jobs:
|
|||||||
extras: ["all"]
|
extras: ["all"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
# Install libs necessary for PyPy to build binary wheels for dependencies
|
# Install libs necessary for PyPy to build binary wheels for dependencies
|
||||||
- run: sudo apt-get -qq install xmlsec1 libxml2-dev libxslt-dev
|
- run: sudo apt-get -qq install xmlsec1 libxml2-dev libxslt-dev
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
poetry-version: "1.3.2"
|
|
||||||
extras: ${{ matrix.extras }}
|
extras: ${{ matrix.extras }}
|
||||||
- run: poetry run trial --jobs=2 tests
|
- run: poetry run trial --jobs=2 tests
|
||||||
- name: Dump logs
|
- name: Dump logs
|
||||||
@@ -400,7 +302,6 @@ jobs:
|
|||||||
SYTEST_BRANCH: ${{ github.head_ref }}
|
SYTEST_BRANCH: ${{ github.head_ref }}
|
||||||
POSTGRES: ${{ matrix.job.postgres && 1}}
|
POSTGRES: ${{ matrix.job.postgres && 1}}
|
||||||
MULTI_POSTGRES: ${{ (matrix.job.postgres == 'multi-postgres') && 1}}
|
MULTI_POSTGRES: ${{ (matrix.job.postgres == 'multi-postgres') && 1}}
|
||||||
ASYNCIO_REACTOR: ${{ (matrix.job.reactor == 'asyncio') && 1 }}
|
|
||||||
WORKERS: ${{ matrix.job.workers && 1 }}
|
WORKERS: ${{ matrix.job.workers && 1 }}
|
||||||
BLACKLIST: ${{ matrix.job.workers && 'synapse-blacklist-with-workers' }}
|
BLACKLIST: ${{ matrix.job.workers && 'synapse-blacklist-with-workers' }}
|
||||||
TOP: ${{ github.workspace }}
|
TOP: ${{ github.workspace }}
|
||||||
@@ -411,12 +312,15 @@ jobs:
|
|||||||
job: ${{ fromJson(needs.calculate-test-jobs.outputs.sytest_test_matrix) }}
|
job: ${{ fromJson(needs.calculate-test-jobs.outputs.sytest_test_matrix) }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Prepare test blacklist
|
- name: Prepare test blacklist
|
||||||
run: cat sytest-blacklist .ci/worker-blacklist > synapse-blacklist-with-workers
|
run: cat sytest-blacklist .ci/worker-blacklist > synapse-blacklist-with-workers
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.61.0
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Run SyTest
|
- name: Run SyTest
|
||||||
@@ -426,7 +330,7 @@ jobs:
|
|||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
|
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
|
||||||
- name: Upload SyTest logs
|
- name: Upload SyTest logs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v2
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.job.*, ', ') }})
|
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.job.*, ', ') }})
|
||||||
@@ -456,32 +360,27 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- run: sudo apt-get -qq install xmlsec1 postgresql-client
|
- run: sudo apt-get -qq install xmlsec1
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
with:
|
with:
|
||||||
poetry-version: "1.3.2"
|
|
||||||
extras: "postgres"
|
extras: "postgres"
|
||||||
- run: .ci/scripts/test_export_data_command.sh
|
- run: .ci/scripts/test_export_data_command.sh
|
||||||
env:
|
|
||||||
PGHOST: localhost
|
|
||||||
PGUSER: postgres
|
|
||||||
PGPASSWORD: postgres
|
|
||||||
PGDATABASE: postgres
|
|
||||||
|
|
||||||
|
|
||||||
portdb:
|
portdb:
|
||||||
if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
|
if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
|
||||||
needs: linting-done
|
needs: linting-done
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TOP: ${{ github.workspace }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- python-version: "3.7"
|
- python-version: "3.7"
|
||||||
postgres-version: "11"
|
postgres-version: "10"
|
||||||
|
|
||||||
- python-version: "3.11"
|
- python-version: "3.10"
|
||||||
postgres-version: "15"
|
postgres-version: "14"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -498,38 +397,13 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Add PostgreSQL apt repository
|
- run: sudo apt-get -qq install xmlsec1
|
||||||
# We need a version of pg_dump that can handle the version of
|
|
||||||
# PostgreSQL being tested against. The Ubuntu package repository lags
|
|
||||||
# behind new releases, so we have to use the PostreSQL apt repository.
|
|
||||||
# Steps taken from https://www.postgresql.org/download/linux/ubuntu/
|
|
||||||
run: |
|
|
||||||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
|
||||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
|
||||||
sudo apt-get update
|
|
||||||
- run: sudo apt-get -qq install xmlsec1 postgresql-client
|
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
poetry-version: "1.3.2"
|
|
||||||
extras: "postgres"
|
extras: "postgres"
|
||||||
- run: .ci/scripts/test_synapse_port_db.sh
|
- run: .ci/scripts/test_synapse_port_db.sh
|
||||||
id: run_tester_script
|
|
||||||
env:
|
|
||||||
PGHOST: localhost
|
|
||||||
PGUSER: postgres
|
|
||||||
PGPASSWORD: postgres
|
|
||||||
PGDATABASE: postgres
|
|
||||||
- name: "Upload schema differences"
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ failure() && !cancelled() && steps.run_tester_script.outcome == 'failure' }}
|
|
||||||
with:
|
|
||||||
name: Schema dumps
|
|
||||||
path: |
|
|
||||||
unported.sql
|
|
||||||
ported.sql
|
|
||||||
schema_diff
|
|
||||||
|
|
||||||
complement:
|
complement:
|
||||||
if: "${{ !failure() && !cancelled() }}"
|
if: "${{ !failure() && !cancelled() }}"
|
||||||
@@ -550,27 +424,25 @@ jobs:
|
|||||||
database: Postgres
|
database: Postgres
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run actions/checkout@v3 for synapse
|
- name: Run actions/checkout@v2 for synapse
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: synapse
|
path: synapse
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.61.0
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- uses: actions/setup-go@v4
|
|
||||||
|
|
||||||
- name: Prepare Complement's Prerequisites
|
- name: Prepare Complement's Prerequisites
|
||||||
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
|
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
|
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
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
POSTGRES: ${{ (matrix.database == 'Postgres') && 1 || '' }}
|
|
||||||
WORKERS: ${{ (matrix.arrangement == 'workers') && 1 || '' }}
|
|
||||||
name: Run Complement Tests
|
name: Run Complement Tests
|
||||||
|
|
||||||
cargo-test:
|
cargo-test:
|
||||||
@@ -581,34 +453,17 @@ jobs:
|
|||||||
- changes
|
- changes
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@1.58.1
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.61.0
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- run: cargo test
|
- run: cargo test
|
||||||
|
|
||||||
# We want to ensure that the cargo benchmarks still compile, which requires a
|
|
||||||
# nightly compiler.
|
|
||||||
cargo-bench:
|
|
||||||
if: ${{ needs.changes.outputs.rust == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- linting-done
|
|
||||||
- changes
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: nightly-2022-12-01
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- run: cargo bench --no-run
|
|
||||||
|
|
||||||
# a job which marks all the other jobs as complete, thus allowing PRs to be merged.
|
# a job which marks all the other jobs as complete, thus allowing PRs to be merged.
|
||||||
tests-done:
|
tests-done:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -620,7 +475,6 @@ jobs:
|
|||||||
- portdb
|
- portdb
|
||||||
- complement
|
- complement
|
||||||
- cargo-test
|
- cargo-test
|
||||||
- cargo-bench
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: matrix-org/done-action@v2
|
- uses: matrix-org/done-action@v2
|
||||||
@@ -632,4 +486,3 @@ jobs:
|
|||||||
skippable: |
|
skippable: |
|
||||||
lint-newsfile
|
lint-newsfile
|
||||||
cargo-test
|
cargo-test
|
||||||
cargo-bench
|
|
||||||
|
|||||||
@@ -5,11 +5,24 @@ on:
|
|||||||
types: [ opened ]
|
types: [ opened ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
add_new_issues:
|
||||||
uses: matrix-org/backend-meta/.github/workflows/triage-incoming.yml@v2
|
name: Add new issues to the triage board
|
||||||
with:
|
runs-on: ubuntu-latest
|
||||||
project_id: 'PVT_kwDOAIB0Bs4AFDdZ'
|
steps:
|
||||||
content_id: ${{ github.event.issue.node_id }}
|
- uses: octokit/graphql-action@v2.x
|
||||||
secrets:
|
id: add_to_project
|
||||||
github_access_token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
with:
|
||||||
|
headers: '{"GraphQL-Features": "projects_next_graphql"}'
|
||||||
|
query: |
|
||||||
|
mutation add_to_project($projectid:ID!,$contentid:ID!) {
|
||||||
|
addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) {
|
||||||
|
item {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
projectid: ${{ env.PROJECT_ID }}
|
||||||
|
contentid: ${{ github.event.issue.node_id }}
|
||||||
|
env:
|
||||||
|
PROJECT_ID: "PVT_kwDOAIB0Bs4AFDdZ"
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -11,34 +11,34 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
contains(github.event.issue.labels.*.name, 'X-Needs-Info')
|
contains(github.event.issue.labels.*.name, 'X-Needs-Info')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/add-to-project@main
|
- uses: octokit/graphql-action@v2.x
|
||||||
id: add_project
|
id: add_to_project
|
||||||
with:
|
with:
|
||||||
project-url: "https://github.com/orgs/matrix-org/projects/67"
|
headers: '{"GraphQL-Features": "projects_next_graphql"}'
|
||||||
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
query: |
|
||||||
- name: Set status
|
mutation {
|
||||||
env:
|
updateProjectV2ItemFieldValue(
|
||||||
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
input: {
|
||||||
run: |
|
projectId: $projectid
|
||||||
gh api graphql -f query='
|
itemId: $contentid
|
||||||
mutation(
|
fieldId: $fieldid
|
||||||
$project: ID!
|
value: {
|
||||||
$item: ID!
|
singleSelectOptionId: "Todo"
|
||||||
$fieldid: ID!
|
|
||||||
$columnid: String!
|
|
||||||
) {
|
|
||||||
updateProjectV2ItemFieldValue(
|
|
||||||
input: {
|
|
||||||
projectId: $project
|
|
||||||
itemId: $item
|
|
||||||
fieldId: $fieldid
|
|
||||||
value: {
|
|
||||||
singleSelectOptionId: $columnid
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
projectV2Item {
|
projectV2Item {
|
||||||
id
|
id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}' -f project="PVT_kwDOAIB0Bs4AFDdZ" -f item=${{ steps.add_project.outputs.itemId }} -f fieldid="PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4" -f columnid=ba22e43c --silent
|
|
||||||
|
projectid: ${{ env.PROJECT_ID }}
|
||||||
|
contentid: ${{ github.event.issue.node_id }}
|
||||||
|
fieldid: ${{ env.FIELD_ID }}
|
||||||
|
optionid: ${{ env.OPTION_ID }}
|
||||||
|
env:
|
||||||
|
PROJECT_ID: "PVT_kwDOAIB0Bs4AFDdZ"
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
FIELD_ID: "PVTSSF_lADOAIB0Bs4AFDdZzgC6ZA4"
|
||||||
|
OPTION_ID: "ba22e43c"
|
||||||
|
|||||||
@@ -5,13 +5,6 @@ on:
|
|||||||
- cron: 0 8 * * *
|
- cron: 0 8 * * *
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
twisted_ref:
|
|
||||||
description: Commit, branch or tag to checkout from upstream Twisted.
|
|
||||||
required: false
|
|
||||||
default: 'trunk'
|
|
||||||
type: string
|
|
||||||
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -22,10 +15,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
@@ -34,7 +30,7 @@ jobs:
|
|||||||
extras: "all"
|
extras: "all"
|
||||||
- run: |
|
- run: |
|
||||||
poetry remove twisted
|
poetry remove twisted
|
||||||
poetry add --extras tls git+https://github.com/twisted/twisted.git#${{ inputs.twisted_ref }}
|
poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk
|
||||||
poetry install --no-interaction --extras "all test"
|
poetry install --no-interaction --extras "all test"
|
||||||
- name: Remove warn_unused_ignores from mypy config
|
- name: Remove warn_unused_ignores from mypy config
|
||||||
run: sed '/warn_unused_ignores = True/d' -i mypy.ini
|
run: sed '/warn_unused_ignores = True/d' -i mypy.ini
|
||||||
@@ -44,11 +40,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- run: sudo apt-get -qq install xmlsec1
|
- run: sudo apt-get -qq install xmlsec1
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- uses: matrix-org/setup-python-poetry@v1
|
- uses: matrix-org/setup-python-poetry@v1
|
||||||
@@ -82,10 +81,13 @@ jobs:
|
|||||||
- ${{ github.workspace }}:/src
|
- ${{ github.workspace }}:/src
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Patch dependencies
|
- name: Patch dependencies
|
||||||
@@ -110,7 +112,7 @@ jobs:
|
|||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
|
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
|
||||||
- name: Upload SyTest logs
|
- name: Upload SyTest logs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v2
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.*, ', ') }})
|
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.*, ', ') }})
|
||||||
@@ -136,13 +138,11 @@ jobs:
|
|||||||
database: Postgres
|
database: Postgres
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run actions/checkout@v3 for synapse
|
- name: Run actions/checkout@v2 for synapse
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: synapse
|
path: synapse
|
||||||
|
|
||||||
- uses: actions/setup-go@v4
|
|
||||||
|
|
||||||
- name: Prepare Complement's Prerequisites
|
- name: Prepare Complement's Prerequisites
|
||||||
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
|
run: synapse/.ci/scripts/setup_complement_prerequisites.sh
|
||||||
|
|
||||||
@@ -151,11 +151,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -yqq python3 pipx
|
DEBIAN_FRONTEND=noninteractive sudo apt-get install -yqq python3 pipx
|
||||||
pipx install poetry==1.3.2
|
pipx install poetry==1.1.14
|
||||||
|
|
||||||
poetry remove -n twisted
|
poetry remove -n twisted
|
||||||
poetry add -n --extras tls git+https://github.com/twisted/twisted.git#trunk
|
poetry add -n --extras tls git+https://github.com/twisted/twisted.git#trunk
|
||||||
poetry lock --no-update
|
poetry lock --no-update
|
||||||
|
# NOT IN 1.1.14 poetry lock --check
|
||||||
working-directory: synapse
|
working-directory: synapse
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
@@ -176,8 +177,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
|
- uses: JasonEtco/create-an-issue@5d9504915f79f9cc6d791934b8ef34f2353dd74d # v2.5.0, 2020-12-06
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
+2
-12
@@ -15,10 +15,8 @@ _trial_temp*/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
# We do want poetry, cargo and flake lockfiles.
|
# We do want the poetry lockfile.
|
||||||
!poetry.lock
|
!poetry.lock
|
||||||
!Cargo.lock
|
|
||||||
!flake.lock
|
|
||||||
|
|
||||||
# stuff that is likely to exist when you run a server locally
|
# stuff that is likely to exist when you run a server locally
|
||||||
/*.db
|
/*.db
|
||||||
@@ -37,10 +35,6 @@ __pycache__/
|
|||||||
|
|
||||||
# For direnv users
|
# For direnv users
|
||||||
/.envrc
|
/.envrc
|
||||||
.direnv/
|
|
||||||
|
|
||||||
# For nix/devenv users
|
|
||||||
.devenv/
|
|
||||||
|
|
||||||
# IDEs
|
# IDEs
|
||||||
/.idea/
|
/.idea/
|
||||||
@@ -57,7 +51,6 @@ __pycache__/
|
|||||||
/coverage.*
|
/coverage.*
|
||||||
/dist/
|
/dist/
|
||||||
/docs/build/
|
/docs/build/
|
||||||
/dev-docs/_build/
|
|
||||||
/htmlcov
|
/htmlcov
|
||||||
/pip-wheel-metadata/
|
/pip-wheel-metadata/
|
||||||
|
|
||||||
@@ -66,7 +59,7 @@ book/
|
|||||||
|
|
||||||
# complement
|
# complement
|
||||||
/complement-*
|
/complement-*
|
||||||
/main.tar.gz
|
/master.tar.gz
|
||||||
|
|
||||||
# rust
|
# rust
|
||||||
/target/
|
/target/
|
||||||
@@ -74,6 +67,3 @@ book/
|
|||||||
|
|
||||||
# Poetry will create a setup.py, which we don't want to include.
|
# Poetry will create a setup.py, which we don't want to include.
|
||||||
/setup.py
|
/setup.py
|
||||||
|
|
||||||
# Don't include users' poetry configs
|
|
||||||
/poetry.toml
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
group_imports = "StdExternalCrate"
|
|
||||||
+16
-1858
File diff suppressed because it is too large
Load Diff
Generated
-474
@@ -1,474 +0,0 @@
|
|||||||
# This file is automatically @generated by Cargo.
|
|
||||||
# It is not intended for manual editing.
|
|
||||||
version = 3
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "aho-corasick"
|
|
||||||
version = "0.7.19"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e"
|
|
||||||
dependencies = [
|
|
||||||
"memchr",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "anyhow"
|
|
||||||
version = "1.0.71"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "arc-swap"
|
|
||||||
version = "1.5.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "983cd8b9d4b02a6dc6ffa557262eb5858a27a0038ffffe21a0f133eaa819a164"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "autocfg"
|
|
||||||
version = "1.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bitflags"
|
|
||||||
version = "1.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "blake2"
|
|
||||||
version = "0.10.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
|
|
||||||
dependencies = [
|
|
||||||
"digest",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "block-buffer"
|
|
||||||
version = "0.10.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
|
|
||||||
dependencies = [
|
|
||||||
"generic-array",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cfg-if"
|
|
||||||
version = "1.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crypto-common"
|
|
||||||
version = "0.1.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
|
||||||
dependencies = [
|
|
||||||
"generic-array",
|
|
||||||
"typenum",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "digest"
|
|
||||||
version = "0.10.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c"
|
|
||||||
dependencies = [
|
|
||||||
"block-buffer",
|
|
||||||
"crypto-common",
|
|
||||||
"subtle",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "generic-array"
|
|
||||||
version = "0.14.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
|
|
||||||
dependencies = [
|
|
||||||
"typenum",
|
|
||||||
"version_check",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hex"
|
|
||||||
version = "0.4.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "indoc"
|
|
||||||
version = "1.0.7"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "itoa"
|
|
||||||
version = "1.0.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lazy_static"
|
|
||||||
version = "1.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
version = "0.2.135"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lock_api"
|
|
||||||
version = "0.4.9"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
"scopeguard",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "log"
|
|
||||||
version = "0.4.18"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memchr"
|
|
||||||
version = "2.5.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memoffset"
|
|
||||||
version = "0.6.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "once_cell"
|
|
||||||
version = "1.15.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parking_lot"
|
|
||||||
version = "0.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
|
|
||||||
dependencies = [
|
|
||||||
"lock_api",
|
|
||||||
"parking_lot_core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parking_lot_core"
|
|
||||||
version = "0.9.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"libc",
|
|
||||||
"redox_syscall",
|
|
||||||
"smallvec",
|
|
||||||
"windows-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro2"
|
|
||||||
version = "1.0.52"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224"
|
|
||||||
dependencies = [
|
|
||||||
"unicode-ident",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyo3"
|
|
||||||
version = "0.17.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"cfg-if",
|
|
||||||
"indoc",
|
|
||||||
"libc",
|
|
||||||
"memoffset",
|
|
||||||
"parking_lot",
|
|
||||||
"pyo3-build-config",
|
|
||||||
"pyo3-ffi",
|
|
||||||
"pyo3-macros",
|
|
||||||
"unindent",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyo3-build-config"
|
|
||||||
version = "0.17.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8"
|
|
||||||
dependencies = [
|
|
||||||
"once_cell",
|
|
||||||
"target-lexicon",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyo3-ffi"
|
|
||||||
version = "0.17.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"pyo3-build-config",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyo3-log"
|
|
||||||
version = "0.8.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f9c8b57fe71fb5dcf38970ebedc2b1531cf1c14b1b9b4c560a182a57e115575c"
|
|
||||||
dependencies = [
|
|
||||||
"arc-swap",
|
|
||||||
"log",
|
|
||||||
"pyo3",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyo3-macros"
|
|
||||||
version = "0.17.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"pyo3-macros-backend",
|
|
||||||
"quote",
|
|
||||||
"syn 1.0.104",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyo3-macros-backend"
|
|
||||||
version = "0.17.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 1.0.104",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pythonize"
|
|
||||||
version = "0.17.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0f7f0c136f5fbc01868185eef462800e49659eb23acca83b9e884367a006acb6"
|
|
||||||
dependencies = [
|
|
||||||
"pyo3",
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "quote"
|
|
||||||
version = "1.0.26"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "redox_syscall"
|
|
||||||
version = "0.2.16"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex"
|
|
||||||
version = "1.7.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d"
|
|
||||||
dependencies = [
|
|
||||||
"aho-corasick",
|
|
||||||
"memchr",
|
|
||||||
"regex-syntax",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex-syntax"
|
|
||||||
version = "0.6.29"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ryu"
|
|
||||||
version = "1.0.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "scopeguard"
|
|
||||||
version = "1.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde"
|
|
||||||
version = "1.0.163"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
|
|
||||||
dependencies = [
|
|
||||||
"serde_derive",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_derive"
|
|
||||||
version = "1.0.163"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.10",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_json"
|
|
||||||
version = "1.0.96"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
|
|
||||||
dependencies = [
|
|
||||||
"itoa",
|
|
||||||
"ryu",
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "smallvec"
|
|
||||||
version = "1.10.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "subtle"
|
|
||||||
version = "2.4.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "syn"
|
|
||||||
version = "1.0.104"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"unicode-ident",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "syn"
|
|
||||||
version = "2.0.10"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"unicode-ident",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "synapse"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"blake2",
|
|
||||||
"hex",
|
|
||||||
"lazy_static",
|
|
||||||
"log",
|
|
||||||
"pyo3",
|
|
||||||
"pyo3-log",
|
|
||||||
"pythonize",
|
|
||||||
"regex",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "target-lexicon"
|
|
||||||
version = "0.12.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "typenum"
|
|
||||||
version = "1.15.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-ident"
|
|
||||||
version = "1.0.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unindent"
|
|
||||||
version = "0.1.10"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "58ee9362deb4a96cef4d437d1ad49cffc9b9e92d202b6995674e928ce684f112"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "version_check"
|
|
||||||
version = "0.9.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-sys"
|
|
||||||
version = "0.36.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
|
|
||||||
dependencies = [
|
|
||||||
"windows_aarch64_msvc",
|
|
||||||
"windows_i686_gnu",
|
|
||||||
"windows_i686_msvc",
|
|
||||||
"windows_x86_64_gnu",
|
|
||||||
"windows_x86_64_msvc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_msvc"
|
|
||||||
version = "0.36.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_gnu"
|
|
||||||
version = "0.36.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_msvc"
|
|
||||||
version = "0.36.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnu"
|
|
||||||
version = "0.36.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_msvc"
|
|
||||||
version = "0.36.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
|
|
||||||
@@ -15,9 +15,6 @@ def build(setup_kwargs: Dict[str, Any]) -> None:
|
|||||||
path=cargo_toml_path,
|
path=cargo_toml_path,
|
||||||
binding=Binding.PyO3,
|
binding=Binding.PyO3,
|
||||||
py_limited_api=True,
|
py_limited_api=True,
|
||||||
# We force always building in release mode, as we can't tell the
|
|
||||||
# difference between using `poetry` in development vs production.
|
|
||||||
debug=False,
|
|
||||||
)
|
)
|
||||||
setup_kwargs.setdefault("rust_extensions", []).append(extension)
|
setup_kwargs.setdefault("rust_extensions", []).append(extension)
|
||||||
setup_kwargs["zip_safe"] = False
|
setup_kwargs["zip_safe"] = False
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Note that `libpq` is required on ARM-based Macs.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a bug introduced in Synapse v1.41.0 where the `/hierarchy` API returned non-standard information (a `room_id` field under each entry in `children_state`).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add admin APIs to fetch messages within a particular window of time.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Cancel the processing of key query requests when they time out.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Improve validation of request bodies for the following client-server API endpoints: [`/account/3pid/msisdn/requestToken`](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3account3pidmsisdnrequesttoken) and [`/org.matrix.msc3720/account_status`](https://github.com/matrix-org/matrix-spec-proposals/blob/babolivier/user_status/proposals/3720-account-status.md#post-_matrixclientv1account_status).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add & populate `event_stream_ordering` column on receipts table for future optimisation of push action processing. Contributed by Nick @ Beeper (@fizzadar).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Rename the `EventFormatVersions` enum values so that they line up with room version numbers.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Update trial old deps CI to use poetry 1.2.0.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add experimental configuration option to allow disabling legacy Prometheus metric names.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add experimental configuration option to allow disabling legacy Prometheus metric names.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add experimental configuration option to allow disabling legacy Prometheus metric names.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix typechecking with latest types-jsonschema.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Update trial old deps CI to use poetry 1.2.0.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a mistake in the config manual: the `event_cache_size` _is_ scaled by `caches.global_factor`. The documentation was incorrect since Synapse 1.22.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a typo in the documentation for the login ratelimiting configuration.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Define Synapse's compatability policy for SQLite versions.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Strip number suffix from instance name to consolidate services that traces are spread over.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Instrument `get_metadata_for_events` for understandable traces in Jaeger.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a bug where Synapse fails to start if a signing key file contains an empty line.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Document the timestamp when a user accepts the consent, if [consent tracking](https://matrix-org.github.io/synapse/latest/consent_tracking.html) is used.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Remove old queries to join room memberships to current state events. Contributed by Nick @ Beeper (@fizzadar).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a long standing bug where Synapse would fail to handle malformed user IDs or room aliases gracefully in certain cases.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Avoid raising an error due to malformed user IDs in `get_current_hosts_in_room`. Malformed user IDs cannot currently join a room, so this error would not be hit.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a long standing bug where device lists would remain cached when remote users left and rejoined the last room shared with the local homeserver.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Update the docstrings for `get_users_in_room` and `get_current_hosts_in_room` to explain the impact of partial state.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
User an additional database query when persisting receipts.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Re-type hint some collections as read-only.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Remove unused Prometheus recording rules from `synapse-v2.rules` and add comments describing where the rest are used.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a check for editable installs if the Rust library needs rebuilding.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Synapse will now refuse to start if configured to use SQLite < 3.27.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Tag traces with the instance name to be able to easily jump into the right logs and filter traces by instance.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Concurrently fetch room push actions when calculating badge counts. Contributed by Nick @ Beeper (@fizzadar).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a long-standing bug where the `cache_invalidation_stream_seq` sequence would begin at 1 instead of 2.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Update the script which makes full schema dumps.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add a stub Rust crate.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Simplify the dependency DAG in the tests workflow.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix a long-standing spec compliance bug where Synapse would accept a trailing slash on the end of `/get_missing_events` federation requests.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
complement tests: put postgres data folder on an host path on /tmp that we bindmount, outside of the container storage that can be quite slow.
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Schema symlinks
|
|
||||||
|
|
||||||
This directory contains symlinks to the latest dump of the postgres full schema. This is useful to have, as it allows IDEs to understand our schema and provide autocomplete, linters, inspections, etc.
|
|
||||||
|
|
||||||
In particular, the DataGrip functionality in IntelliJ's products seems to only consider files called `*.sql` when defining a schema from DDL; `*.sql.postgres` will be ignored. To get around this we symlink those files to ones ending in `.sql`. We've chosen to ignore the `.sql.sqlite` schema dumps here, as they're not intended for production use (and are much quicker to test against).
|
|
||||||
|
|
||||||
## Example
|
|
||||||

|
|
||||||
|
|
||||||
## Caveats
|
|
||||||
|
|
||||||
- Doesn't include temporary tables created ad-hoc by Synapse.
|
|
||||||
- Postgres only. IDEs will likely be confused by SQLite-specific queries.
|
|
||||||
- Will not include migrations created after the latest schema dump.
|
|
||||||
- Symlinks might confuse checkouts on Windows systems.
|
|
||||||
|
|
||||||
## Instructions
|
|
||||||
|
|
||||||
### Jetbrains IDEs with DataGrip plugin
|
|
||||||
|
|
||||||
- View -> Tool Windows -> Database
|
|
||||||
- `+` Icon -> DDL Data Source
|
|
||||||
- Pick a name, e.g. `Synapse schema dump`
|
|
||||||
- Under sources, click `+`.
|
|
||||||
- Add an entry with Path pointing to this directory, and dialect set to PostgreSQL.
|
|
||||||
- OK, and OK.
|
|
||||||
- IDE should now be aware of the schema.
|
|
||||||
- Try control-clicking on a table name in a bit of SQL e.g. in `_get_forgotten_rooms_for_user_txn`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../synapse/storage/schema/common/full_schemas/72/full.sql.postgres
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
@@ -1 +0,0 @@
|
|||||||
../../synapse/storage/schema/main/full_schemas/72/full.sql.postgres
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../synapse/storage/schema/common/schema_version.sql
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../synapse/storage/schema/state/full_schemas/72/full.sql.postgres
|
|
||||||
@@ -68,12 +68,7 @@ redis:
|
|||||||
enabled: true
|
enabled: true
|
||||||
host: redis
|
host: redis
|
||||||
port: 6379
|
port: 6379
|
||||||
# dbid: <redis_logical_db_id>
|
|
||||||
# password: <secret_password>
|
# password: <secret_password>
|
||||||
# use_tls: True
|
|
||||||
# certificate_file: <path_to_certificate>
|
|
||||||
# private_key_file: <path_to_private_key>
|
|
||||||
# ca_file: <path_to_ca_certificate>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This assumes that your Redis service is called `redis` in your Docker Compose file.
|
This assumes that your Redis service is called `redis` in your Docker Compose file.
|
||||||
@@ -99,6 +94,20 @@ worker_replication_host: synapse
|
|||||||
worker_replication_http_port: 9093
|
worker_replication_http_port: 9093
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Add Workers to `instance_map`
|
||||||
|
|
||||||
|
Locate the `instance_map` section of your `homeserver.yaml` and populate it with your workers:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
instance_map:
|
||||||
|
synapse-generic-worker-1: # The worker_name setting in your worker configuration file
|
||||||
|
host: synapse-generic-worker-1 # The name of the worker service in your Docker Compose file
|
||||||
|
port: 8034 # The port assigned to the replication listener in your worker config file
|
||||||
|
synapse-federation-sender-1:
|
||||||
|
host: synapse-federation-sender-1
|
||||||
|
port: 8034
|
||||||
|
```
|
||||||
|
|
||||||
### Configure Federation Senders
|
### Configure Federation Senders
|
||||||
|
|
||||||
This section is applicable if you are using Federation senders (synapse.app.federation_sender). Locate the `send_federation` and `federation_sender_instances` settings in your `homeserver.yaml` and configure them:
|
This section is applicable if you are using Federation senders (synapse.app.federation_sender). Locate the `send_federation` and `federation_sender_instances` settings in your `homeserver.yaml` and configure them:
|
||||||
@@ -113,4 +122,4 @@ federation_sender_instances:
|
|||||||
|
|
||||||
## Other Worker types
|
## Other Worker types
|
||||||
|
|
||||||
Using the concepts shown here it is possible to create other worker types in Docker Compose. See the [Workers](https://matrix-org.github.io/synapse/latest/workers.html#available-worker-applications) documentation for a list of available workers.
|
Using the concepts shown here it is possible to create other worker types in Docker Compose. See the [Workers](https://matrix-org.github.io/synapse/latest/workers.html#available-worker-applications) documentation for a list of available workers.
|
||||||
@@ -5,4 +5,10 @@ worker_name: synapse-federation-sender-1
|
|||||||
worker_replication_host: synapse
|
worker_replication_host: synapse
|
||||||
worker_replication_http_port: 9093
|
worker_replication_http_port: 9093
|
||||||
|
|
||||||
|
worker_listeners:
|
||||||
|
- type: http
|
||||||
|
port: 8034
|
||||||
|
resources:
|
||||||
|
- names: [replication]
|
||||||
|
|
||||||
worker_log_config: /data/federation_sender.log.config
|
worker_log_config: /data/federation_sender.log.config
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ worker_replication_host: synapse
|
|||||||
worker_replication_http_port: 9093
|
worker_replication_http_port: 9093
|
||||||
|
|
||||||
worker_listeners:
|
worker_listeners:
|
||||||
|
- type: http
|
||||||
|
port: 8034
|
||||||
|
resources:
|
||||||
|
- names: [replication]
|
||||||
- type: http
|
- type: http
|
||||||
port: 8081
|
port: 8081
|
||||||
x_forwarded: true
|
x_forwarded: true
|
||||||
|
|||||||
+347
-1208
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
|||||||
# `lnav` config for Synapse logs
|
|
||||||
|
|
||||||
[lnav](https://lnav.org/) is a log-viewing tool. It is particularly useful when
|
|
||||||
you need to interleave multiple log files, or for exploring a large log file
|
|
||||||
with regex filters. The downside is that it is not as ubiquitous as tools like
|
|
||||||
`less`, `grep`, etc.
|
|
||||||
|
|
||||||
This directory contains an `lnav` [log format definition](
|
|
||||||
https://docs.lnav.org/en/v0.10.1/formats.html#defining-a-new-format
|
|
||||||
) for Synapse logs as
|
|
||||||
emitted by Synapse with the default [logging configuration](
|
|
||||||
https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#log_config
|
|
||||||
). It supports lnav 0.10.1 because that's what's packaged by my distribution.
|
|
||||||
|
|
||||||
This should allow lnav:
|
|
||||||
|
|
||||||
- to interpret timestamps, allowing log interleaving;
|
|
||||||
- to interpret log severity levels, allowing colouring by log level(!!!);
|
|
||||||
- to interpret request IDs, allowing you to skip through a specific request; and
|
|
||||||
- to highlight room, event and user IDs in logs.
|
|
||||||
|
|
||||||
See also https://gist.github.com/benje/e2ab750b0a81d11920d83af637d289f7 for a
|
|
||||||
similar example.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
[](https://asciinema.org/a/556133)
|
|
||||||
|
|
||||||
## Tips
|
|
||||||
|
|
||||||
- `lnav -i /path/to/synapse/checkout/contrib/lnav/synapse-log-format.json`
|
|
||||||
- `lnav my_synapse_log_file` or `lnav synapse_log_files.*`, etc.
|
|
||||||
- `lnav --help` for CLI help.
|
|
||||||
|
|
||||||
Within lnav itself:
|
|
||||||
|
|
||||||
- `?` for help within lnav itself.
|
|
||||||
- `q` to quit.
|
|
||||||
- `/` to search a-la `less` and `vim`, then `n` and `N` to continue searching
|
|
||||||
down and up.
|
|
||||||
- Use `o` and `O` to skip through logs based on the request ID (`POST-1234`, or
|
|
||||||
else the value of the [`request_id_header`](
|
|
||||||
https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=request_id_header#listeners
|
|
||||||
) header). This may get confused if the same request ID is repeated among
|
|
||||||
multiple files or process restarts.
|
|
||||||
- ???
|
|
||||||
- Profit
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
|
|
||||||
"synapse": {
|
|
||||||
"title": "Synapse logs",
|
|
||||||
"description": "Logs output by Synapse, a Matrix homesever, under its default logging config.",
|
|
||||||
"regex": {
|
|
||||||
"log": {
|
|
||||||
"pattern": ".*(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}) - (?<logger>.+) - (?<lineno>\\d+) - (?<level>\\w+) - (?<context>.+) - (?<body>.*)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"json": false,
|
|
||||||
"timestamp-field": "timestamp",
|
|
||||||
"timestamp-format": [
|
|
||||||
"%Y-%m-%d %H:%M:%S,%L"
|
|
||||||
],
|
|
||||||
"level-field": "level",
|
|
||||||
"body-field": "body",
|
|
||||||
"opid-field": "context",
|
|
||||||
"level": {
|
|
||||||
"critical": "CRITICAL",
|
|
||||||
"error": "ERROR",
|
|
||||||
"warning": "WARNING",
|
|
||||||
"info": "INFO",
|
|
||||||
"debug": "DEBUG"
|
|
||||||
},
|
|
||||||
"sample": [
|
|
||||||
{
|
|
||||||
"line": "my-matrix-server-generic-worker-4 | 2023-01-27 09:47:09,818 - synapse.replication.tcp.client - 381 - ERROR - PUT-32992 - Timed out waiting for stream receipts",
|
|
||||||
"level": "error"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"line": "my-matrix-server-federation-sender-1 | 2023-01-25 20:56:20,995 - synapse.http.matrixfederationclient - 709 - WARNING - federation_transaction_transmission_loop-3 - {PUT-O-3} [example.com] Request failed: PUT matrix://example.com/_matrix/federation/v1/send/1674680155797: HttpResponseException('403: Forbidden')",
|
|
||||||
"level": "warning"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"line": "my-matrix-server | 2023-01-25 20:55:54,433 - synapse.storage.databases - 66 - INFO - main - [database config 'master']: Checking database server",
|
|
||||||
"level": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"line": "my-matrix-server | 2023-01-26 15:08:40,447 - synapse.access.http.8008 - 460 - INFO - PUT-74929 - 0.0.0.0 - 8008 - {@alice:example.com} Processed request: 0.011sec/0.000sec (0.000sec, 0.000sec) (0.001sec/0.008sec/3) 2B 200 \"PUT /_matrix/client/r0/user/%40alice%3Atexample.com/account_data/im.vector.setting.breadcrumbs HTTP/1.0\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.20 Chrome/108.0.5359.179 Electron/22.0.3 Safari/537.36\" [0 dbevts]",
|
|
||||||
"level": "info"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"highlights": {
|
|
||||||
"user_id": {
|
|
||||||
"pattern": "(@|%40)[^:% ]+(:|%3A)[\\[\\]0-9a-zA-Z.\\-:]+(:\\d{1,5})?(?<!:)",
|
|
||||||
"underline": true
|
|
||||||
},
|
|
||||||
"room_id": {
|
|
||||||
"pattern": "(!|%21)[^:% ]+(:|%3A)[\\[\\]0-9a-zA-Z.\\-:]+(:\\d{1,5})?(?<!:)",
|
|
||||||
"underline": true
|
|
||||||
},
|
|
||||||
"room_alias": {
|
|
||||||
"pattern": "(#|%23)[^:% ]+(:|%3A)[\\[\\]0-9a-zA-Z.\\-:]+(:\\d{1,5})?(?<!:)",
|
|
||||||
"underline": true
|
|
||||||
},
|
|
||||||
"event_id_v1_v2": {
|
|
||||||
"pattern": "(\\$|%25)[^:% ]+(:|%3A)[\\[\\]0-9a-zA-Z.\\-:]+(:\\d{1,5})?(?<!:)",
|
|
||||||
"underline": true
|
|
||||||
},
|
|
||||||
"event_id_v3_plus": {
|
|
||||||
"pattern": "(\\$|%25)([A-Za-z0-9+/_]|-){43}",
|
|
||||||
"underline": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,7 @@
|
|||||||
groups:
|
groups:
|
||||||
- name: synapse
|
- name: synapse
|
||||||
rules:
|
rules:
|
||||||
|
# These 3 rules are used in the included Prometheus console
|
||||||
###
|
|
||||||
### Prometheus Console Only
|
|
||||||
### The following rules are only needed if you use the Prometheus Console
|
|
||||||
### in contrib/prometheus/consoles/synapse.html
|
|
||||||
###
|
|
||||||
- record: 'synapse_federation_client_sent'
|
- record: 'synapse_federation_client_sent'
|
||||||
labels:
|
labels:
|
||||||
type: "EDU"
|
type: "EDU"
|
||||||
@@ -20,6 +15,7 @@ groups:
|
|||||||
type: "Query"
|
type: "Query"
|
||||||
expr: 'sum(synapse_federation_client_sent_queries) by (job)'
|
expr: 'sum(synapse_federation_client_sent_queries) by (job)'
|
||||||
|
|
||||||
|
# These 3 rules are used in the included Prometheus console
|
||||||
- record: 'synapse_federation_server_received'
|
- record: 'synapse_federation_server_received'
|
||||||
labels:
|
labels:
|
||||||
type: "EDU"
|
type: "EDU"
|
||||||
@@ -33,6 +29,7 @@ groups:
|
|||||||
type: "Query"
|
type: "Query"
|
||||||
expr: 'sum(synapse_federation_server_received_queries) by (job)'
|
expr: 'sum(synapse_federation_server_received_queries) by (job)'
|
||||||
|
|
||||||
|
# These 2 rules are used in the included Prometheus console
|
||||||
- record: 'synapse_federation_transaction_queue_pending'
|
- record: 'synapse_federation_transaction_queue_pending'
|
||||||
labels:
|
labels:
|
||||||
type: "EDU"
|
type: "EDU"
|
||||||
@@ -41,16 +38,8 @@ groups:
|
|||||||
labels:
|
labels:
|
||||||
type: "PDU"
|
type: "PDU"
|
||||||
expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
|
expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
|
||||||
###
|
|
||||||
### End of 'Prometheus Console Only' rules block
|
|
||||||
###
|
|
||||||
|
|
||||||
|
# These 3 rules are used in the included Grafana dashboard
|
||||||
###
|
|
||||||
### Grafana Only
|
|
||||||
### The following rules are only needed if you use the Grafana dashboard
|
|
||||||
### in contrib/grafana/synapse.json
|
|
||||||
###
|
|
||||||
- record: synapse_storage_events_persisted_by_source_type
|
- record: synapse_storage_events_persisted_by_source_type
|
||||||
expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_type="remote"})
|
expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep_total{origin_type="remote"})
|
||||||
labels:
|
labels:
|
||||||
@@ -64,11 +53,11 @@ groups:
|
|||||||
labels:
|
labels:
|
||||||
type: bridges
|
type: bridges
|
||||||
|
|
||||||
|
# This rule is used in the included Grafana dashboard
|
||||||
- record: synapse_storage_events_persisted_by_event_type
|
- record: synapse_storage_events_persisted_by_event_type
|
||||||
expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep_total)
|
expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep_total)
|
||||||
|
|
||||||
|
# This rule is used in the included Grafana dashboard
|
||||||
- record: synapse_storage_events_persisted_by_origin
|
- record: synapse_storage_events_persisted_by_origin
|
||||||
expr: sum without(type) (synapse_storage_events_persisted_events_sep_total)
|
expr: sum without(type) (synapse_storage_events_persisted_events_sep_total)
|
||||||
###
|
|
||||||
### End of 'Grafana Only' rules block
|
|
||||||
###
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ You can alternatively create multiple worker configuration files with a simple `
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
for i in {1..5}
|
for i in {1..5}
|
||||||
do
|
do
|
||||||
cat << EOF > generic_worker$i.yaml
|
cat << EOF >> generic_worker$i.yaml
|
||||||
worker_app: synapse.app.generic_worker
|
worker_app: synapse.app.generic_worker
|
||||||
worker_name: generic_worker$i
|
worker_name: generic_worker$i
|
||||||
|
|
||||||
@@ -18,16 +18,14 @@ worker_replication_http_port: 9093
|
|||||||
worker_listeners:
|
worker_listeners:
|
||||||
- type: http
|
- type: http
|
||||||
port: 808$i
|
port: 808$i
|
||||||
x_forwarded: true
|
|
||||||
resources:
|
resources:
|
||||||
- names: [client, federation]
|
- names: [client, federation]
|
||||||
|
|
||||||
worker_log_config: /etc/matrix-synapse/generic-worker-log.yaml
|
worker_log_config: /etc/matrix-synapse/generic-worker-log.yaml
|
||||||
#worker_pid_file: DATADIR/generic_worker$i.pid
|
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
This would create five generic workers with a unique `worker_name` field in each file and listening on ports 8081-8085.
|
This would create five generic workers with a unique `worker_name` field in each file and listening on ports 8081-8085.
|
||||||
|
|
||||||
Customise the script to your needs. Note that `worker_pid_file` is required if `worker_daemonize` is `true`. Uncomment and/or modify the line if needed.
|
Customise the script to your needs.
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ It also prints out the example lines for Synapse main configuration file.
|
|||||||
|
|
||||||
Remember to route necessary endpoints directly to a worker associated with it.
|
Remember to route necessary endpoints directly to a worker associated with it.
|
||||||
|
|
||||||
If you run the script as-is, it will create workers with the replication listener starting from port 8034 and another, regular http listener starting from 8044. If you don't need all of the stream writers listed in the script, just remove them from the ```STREAM_WRITERS``` array.
|
If you run the script as-is, it will create workers with the replication listener starting from port 8034 and another, regular http listener starting from 8044. If you don't need all of the stream writers listed in the script, just remove them from the ```STREAM_WRITERS``` array.
|
||||||
|
|
||||||
Hint: Note that `worker_pid_file` is required if `worker_daemonize` is `true`. Uncomment and/or modify the line if needed.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
@@ -48,11 +46,9 @@ worker_listeners:
|
|||||||
|
|
||||||
- type: http
|
- type: http
|
||||||
port: $(expr $HTTP_START_PORT + $i)
|
port: $(expr $HTTP_START_PORT + $i)
|
||||||
x_forwarded: true
|
|
||||||
resources:
|
resources:
|
||||||
- names: [client]
|
- names: [client]
|
||||||
|
|
||||||
#worker_pid_file: DATADIR/${STREAM_WRITERS[$i]}.pid
|
|
||||||
worker_log_config: /etc/matrix-synapse/stream-writer-log.yaml
|
worker_log_config: /etc/matrix-synapse/stream-writer-log.yaml
|
||||||
EOF
|
EOF
|
||||||
HOMESERVER_YAML_INSTANCE_MAP+=$" ${STREAM_WRITERS[$i]}_stream_writer:
|
HOMESERVER_YAML_INSTANCE_MAP+=$" ${STREAM_WRITERS[$i]}_stream_writer:
|
||||||
@@ -95,9 +91,7 @@ Simply run the script to create YAML files in the current folder and print out t
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
$ ./create_stream_writers.sh
|
$ ./create_stream_writers.sh
|
||||||
```
|
|
||||||
You should receive an output similar to the following:
|
|
||||||
```console
|
|
||||||
# Add these lines to your homeserver.yaml.
|
# Add these lines to your homeserver.yaml.
|
||||||
# Don't forget to configure your reverse proxy and
|
# Don't forget to configure your reverse proxy and
|
||||||
# necessary endpoints to their respective worker.
|
# necessary endpoints to their respective worker.
|
||||||
|
|||||||
Vendored
+2
-1
@@ -31,11 +31,12 @@ case $(dpkg-architecture -q DEB_HOST_ARCH) in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Manually install Poetry and export a pip-compatible `requirements.txt`
|
# Manually install Poetry and export a pip-compatible `requirements.txt`
|
||||||
|
# We need a Poetry pre-release as the export command is buggy in < 1.2
|
||||||
TEMP_VENV="$(mktemp -d)"
|
TEMP_VENV="$(mktemp -d)"
|
||||||
python3 -m venv "$TEMP_VENV"
|
python3 -m venv "$TEMP_VENV"
|
||||||
source "$TEMP_VENV/bin/activate"
|
source "$TEMP_VENV/bin/activate"
|
||||||
pip install -U pip
|
pip install -U pip
|
||||||
pip install poetry==1.3.2
|
pip install poetry==1.2.0
|
||||||
poetry export \
|
poetry export \
|
||||||
--extras all \
|
--extras all \
|
||||||
--extras test \
|
--extras test \
|
||||||
|
|||||||
Vendored
-312
@@ -1,315 +1,3 @@
|
|||||||
matrix-synapse-py3 (1.85.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.85.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Thu, 01 Jun 2023 09:16:18 -0700
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.85.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.85.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 30 May 2023 13:56:54 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.84.1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.84.1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 26 May 2023 16:15:30 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.84.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.84.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 23 May 2023 10:57:22 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.84.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.84.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 16 May 2023 11:12:02 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.83.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.83.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 09 May 2023 18:13:37 +0200
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.83.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.83.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 02 May 2023 15:56:38 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.82.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.82.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 25 Apr 2023 11:56:06 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.82.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.82.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 18 Apr 2023 09:47:30 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.81.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.81.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 11 Apr 2023 14:18:35 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.81.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.81.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Thu, 06 Apr 2023 16:07:54 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.81.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.81.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 04 Apr 2023 14:29:03 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.80.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.80.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 28 Mar 2023 11:10:33 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.80.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.80.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Wed, 22 Mar 2023 08:30:16 -0700
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.80.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.80.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 21 Mar 2023 10:56:08 -0700
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.79.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.79.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 14 Mar 2023 16:14:50 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.79.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.79.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Mon, 13 Mar 2023 12:54:21 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.79.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.79.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 07 Mar 2023 12:03:49 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.78.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.78.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 28 Feb 2023 08:56:03 -0800
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.78.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* Add `matrix-org-archive-keyring` package as recommended.
|
|
||||||
* New Synapse release 1.78.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 21 Feb 2023 14:29:19 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.77.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.77.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 14 Feb 2023 12:59:02 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.77.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.77.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 10 Feb 2023 12:44:21 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.77.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.77.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 07 Feb 2023 13:45:14 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.76.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.76.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 31 Jan 2023 08:21:47 -0800
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.76.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.76.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 27 Jan 2023 11:17:57 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.76.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* Use Poetry 1.3.2 to manage the bundled virtualenv included with this package.
|
|
||||||
* New Synapse release 1.76.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Wed, 25 Jan 2023 16:21:16 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.75.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.75.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 17 Jan 2023 11:36:02 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.75.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.75.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Thu, 12 Jan 2023 10:30:15 -0800
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.75.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.75.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 10 Jan 2023 12:18:27 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.74.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.74.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 20 Dec 2022 16:07:38 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.74.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New dependency on libicu-dev to provide improved results for user
|
|
||||||
search.
|
|
||||||
* New Synapse release 1.74.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 13 Dec 2022 13:30:01 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.73.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.73.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 06 Dec 2022 11:48:56 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.73.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.73.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Thu, 01 Dec 2022 10:02:19 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.73.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.73.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 29 Nov 2022 12:28:13 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.72.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.72.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 22 Nov 2022 10:57:30 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.72.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.72.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Wed, 16 Nov 2022 15:10:59 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.71.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.71.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 08 Nov 2022 10:38:10 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.71.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.71.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 04 Nov 2022 12:00:33 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.71.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.71.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 01 Nov 2022 12:10:17 +0000
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.70.1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.70.1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 28 Oct 2022 12:10:21 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.70.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.70.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Wed, 26 Oct 2022 11:11:50 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.70.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.70.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 25 Oct 2022 10:59:47 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.70.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.70.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Wed, 19 Oct 2022 14:11:57 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.69.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.69.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Mon, 17 Oct 2022 11:31:03 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.69.0~rc4) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.69.0rc4.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 14 Oct 2022 15:04:47 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.69.0~rc3) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.69.0rc3.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Wed, 12 Oct 2022 13:24:04 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.69.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.69.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Thu, 06 Oct 2022 14:45:00 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.69.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* The man page for the hash_password script has been updated to reflect
|
|
||||||
the correct default value of 'bcrypt_rounds'.
|
|
||||||
* New Synapse release 1.69.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 04 Oct 2022 11:17:16 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.68.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.68.0.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 27 Sep 2022 12:02:09 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.68.0~rc2) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.68.0rc2.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Fri, 23 Sep 2022 09:40:10 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.68.0~rc1) stable; urgency=medium
|
|
||||||
|
|
||||||
* New Synapse release 1.68.0rc1.
|
|
||||||
|
|
||||||
-- Synapse Packaging team <packages@matrix.org> Tue, 20 Sep 2022 11:18:20 +0100
|
|
||||||
|
|
||||||
matrix-synapse-py3 (1.67.0) stable; urgency=medium
|
matrix-synapse-py3 (1.67.0) stable; urgency=medium
|
||||||
|
|
||||||
* New Synapse release 1.67.0.
|
* New Synapse release 1.67.0.
|
||||||
|
|||||||
Vendored
-3
@@ -8,8 +8,6 @@ Build-Depends:
|
|||||||
dh-virtualenv (>= 1.1),
|
dh-virtualenv (>= 1.1),
|
||||||
libsystemd-dev,
|
libsystemd-dev,
|
||||||
libpq-dev,
|
libpq-dev,
|
||||||
libicu-dev,
|
|
||||||
pkg-config,
|
|
||||||
lsb-release,
|
lsb-release,
|
||||||
python3-dev,
|
python3-dev,
|
||||||
python3,
|
python3,
|
||||||
@@ -37,7 +35,6 @@ Depends:
|
|||||||
# so we put perl:Depends in Suggests rather than Depends.
|
# so we put perl:Depends in Suggests rather than Depends.
|
||||||
Recommends:
|
Recommends:
|
||||||
${shlibs1:Recommends},
|
${shlibs1:Recommends},
|
||||||
matrix-org-archive-keyring,
|
|
||||||
Suggests:
|
Suggests:
|
||||||
sqlite3,
|
sqlite3,
|
||||||
${perl:Depends},
|
${perl:Depends},
|
||||||
|
|||||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
.P
|
.P
|
||||||
\fBhash_password\fR takes a password as an parameter either on the command line or the \fBSTDIN\fR if not supplied\.
|
\fBhash_password\fR takes a password as an parameter either on the command line or the \fBSTDIN\fR if not supplied\.
|
||||||
.P
|
.P
|
||||||
It accepts an YAML file which can be used to specify parameters like the number of rounds for bcrypt and password_config section having the pepper value used for the hashing\. By default \fBbcrypt_rounds\fR is set to \fB12\fR\.
|
It accepts an YAML file which can be used to specify parameters like the number of rounds for bcrypt and password_config section having the pepper value used for the hashing\. By default \fBbcrypt_rounds\fR is set to \fB10\fR\.
|
||||||
.P
|
.P
|
||||||
The hashed password is written on the \fBSTDOUT\fR\.
|
The hashed password is written on the \fBSTDOUT\fR\.
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
|
|||||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ or the `STDIN` if not supplied.
|
|||||||
|
|
||||||
It accepts an YAML file which can be used to specify parameters like the
|
It accepts an YAML file which can be used to specify parameters like the
|
||||||
number of rounds for bcrypt and password_config section having the pepper
|
number of rounds for bcrypt and password_config section having the pepper
|
||||||
value used for the hashing. By default `bcrypt_rounds` is set to **12**.
|
value used for the hashing. By default `bcrypt_rounds` is set to **10**.
|
||||||
|
|
||||||
The hashed password is written on the `STDOUT`.
|
The hashed password is written on the `STDOUT`.
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -46,7 +46,7 @@ for port in 8080 8081 8082; do
|
|||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
# Warning, this heredoc depends on the interaction of tabs and spaces.
|
# Warning, this heredoc depends on the interaction of tabs and spaces.
|
||||||
# Please don't accidentally bork me with your fancy settings.
|
# Please don't accidentaly bork me with your fancy settings.
|
||||||
listeners=$(cat <<-PORTLISTENERS
|
listeners=$(cat <<-PORTLISTENERS
|
||||||
# Configure server to listen on both $https_port and $port
|
# Configure server to listen on both $https_port and $port
|
||||||
# This overides some of the default settings above
|
# This overides some of the default settings above
|
||||||
@@ -80,8 +80,12 @@ for port in 8080 8081 8082; do
|
|||||||
echo "tls_certificate_path: \"$DIR/$port/localhost:$port.tls.crt\""
|
echo "tls_certificate_path: \"$DIR/$port/localhost:$port.tls.crt\""
|
||||||
echo "tls_private_key_path: \"$DIR/$port/localhost:$port.tls.key\""
|
echo "tls_private_key_path: \"$DIR/$port/localhost:$port.tls.key\""
|
||||||
|
|
||||||
# Request keys directly from servers contacted over federation
|
# Ignore keys from the trusted keys server
|
||||||
echo 'trusted_key_servers: []'
|
echo '# Ignore keys from the trusted keys server'
|
||||||
|
echo 'trusted_key_servers:'
|
||||||
|
echo ' - server_name: "matrix.org"'
|
||||||
|
echo ' accept_keys_insecurely: true'
|
||||||
|
echo ''
|
||||||
|
|
||||||
# Allow the servers to communicate over localhost.
|
# Allow the servers to communicate over localhost.
|
||||||
allow_list=$(cat <<-ALLOW_LIST
|
allow_list=$(cat <<-ALLOW_LIST
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
# Minimal makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line, and also
|
|
||||||
# from the environment for the first two.
|
|
||||||
SPHINXOPTS ?=
|
|
||||||
SPHINXBUILD ?= sphinx-build
|
|
||||||
SOURCEDIR = .
|
|
||||||
BUILDDIR = _build
|
|
||||||
|
|
||||||
# Put it first so that "make" without argument is like "make help".
|
|
||||||
help:
|
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
||||||
|
|
||||||
.PHONY: help Makefile
|
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
||||||
%: Makefile
|
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
# Configuration file for the Sphinx documentation builder.
|
|
||||||
#
|
|
||||||
# For the full list of built-in configuration values, see the documentation:
|
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
||||||
|
|
||||||
project = "Synapse development"
|
|
||||||
copyright = "2023, The Matrix.org Foundation C.I.C."
|
|
||||||
author = "The Synapse Maintainers and Community"
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
||||||
|
|
||||||
extensions = [
|
|
||||||
"autodoc2",
|
|
||||||
"myst_parser",
|
|
||||||
]
|
|
||||||
|
|
||||||
templates_path = ["_templates"]
|
|
||||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Autodoc2 ----------------------------------------------------
|
|
||||||
|
|
||||||
autodoc2_docstring_parser_regexes = [
|
|
||||||
# this will render all docstrings as 'MyST' Markdown
|
|
||||||
(r".*", "myst"),
|
|
||||||
]
|
|
||||||
|
|
||||||
autodoc2_packages = [
|
|
||||||
{
|
|
||||||
"path": "../synapse",
|
|
||||||
# Don't render documentation for everything as a matter of course
|
|
||||||
"auto_mode": False,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for MyST (Markdown) ---------------------------------------------
|
|
||||||
|
|
||||||
# myst_heading_anchors = 2
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output -------------------------------------------------
|
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
||||||
|
|
||||||
html_theme = "furo"
|
|
||||||
html_static_path = ["_static"]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
.. Synapse Developer Documentation documentation master file, created by
|
|
||||||
sphinx-quickstart on Mon Mar 13 08:59:51 2023.
|
|
||||||
You can adapt this file completely to your liking, but it should at least
|
|
||||||
contain the root `toctree` directive.
|
|
||||||
|
|
||||||
Welcome to the Synapse Developer Documentation!
|
|
||||||
===========================================================
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
:caption: Contents:
|
|
||||||
|
|
||||||
modules/federation_sender
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
|
||||||
==================
|
|
||||||
|
|
||||||
* :ref:`genindex`
|
|
||||||
* :ref:`modindex`
|
|
||||||
* :ref:`search`
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
Federation Sender
|
|
||||||
=================
|
|
||||||
|
|
||||||
```{autodoc2-docstring} synapse.federation.sender
|
|
||||||
```
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user