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

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into erikj/py312_asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Dec 4, 2023
2 parents da78e0b + 0aa4d3b commit 85151a3
Show file tree
Hide file tree
Showing 76 changed files with 912 additions and 3,072 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-pr-netlify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
path: book

- name: 📤 Deploy to Netlify
uses: matrix-org/netlify-pr-preview@v2
uses: matrix-org/netlify-pr-preview@v3
with:
path: book
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/docs-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@ on:
- docs/**
- book.toml
- .github/workflows/docs-pr.yaml
- scripts-dev/schema_versions.py

jobs:
pages:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch all history so that the schema_versions script works.
fetch-depth: 0

- name: Setup mdbook
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
with:
mdbook-version: '0.4.17'

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- run: "pip install 'packaging>=20.0' 'GitPython>=3.1.20'"

- 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
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,22 @@ jobs:
- pre
steps:
- uses: actions/checkout@v4
with:
# Fetch all history so that the schema_versions script works.
fetch-depth: 0

- name: Setup mdbook
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
with:
mdbook-version: '0.4.17'

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- run: "pip install 'packaging>=20.0' 'GitPython>=3.1.20'"

- 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
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/fix_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# A helper workflow to automatically fixup any linting errors on a PR. Must be
# triggered manually.

name: Attempt to automatically fix linting errors

on:
workflow_dispatch:

jobs:
fixup:
name: Fix up
runs-on: ubuntu-latest

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

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
# We use nightly so that `fmt` correctly groups together imports, and
# clippy correctly fixes up the benchmarks.
toolchain: nightly-2022-12-01
components: rustfmt
- uses: Swatinem/rust-cache@v2

- name: Setup Poetry
uses: matrix-org/setup-python-poetry@v1
with:
install-project: "false"

- name: Import order (isort)
continue-on-error: true
run: poetry run isort .

- name: Code style (black)
continue-on-error: true
run: poetry run black .

- name: Semantic checks (ruff)
continue-on-error: true
run: poetry run ruff --fix .

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

- run: cargo fmt
continue-on-error: true

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Attempt to fix linting"
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Synapse 1.97.0rc1 (2023-11-21)
# Synapse 1.97.0 (2023-11-28)

Synapse will soon be forked by Element under an AGPLv3.0 licence (with CLA, for
proprietary dual licensing). You can read more about this here:
Expand All @@ -10,6 +10,12 @@ The Matrix.org Foundation copy of the project will be archived. Any changes need
by server administrators will be communicated via our usual announcements channels,
but we are striving to make this as seamless as possible.


No significant changes since 1.97.0rc1.


# Synapse 1.97.0rc1 (2023-11-21)

### Features

- Add support for asynchronous uploads as defined by [MSC2246](https://github.com/matrix-org/matrix-spec-proposals/pull/2246). Contributed by @sumnerevans at @beeper. ([\#15503](https://github.com/matrix-org/synapse/issues/15503))
Expand Down
5 changes: 4 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ additional-css = [
"docs/website_files/indent-section-headers.css",
]
additional-js = ["docs/website_files/table-of-contents.js"]
theme = "docs/website_files/theme"
theme = "docs/website_files/theme"

[preprocessor.schema_versions]
command = "./scripts-dev/schema_versions.py"
1 change: 1 addition & 0 deletions changelog.d/15207.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds on_user_login ModuleAPI callback allowing to execute custom code after (on) Auth.
1 change: 1 addition & 0 deletions changelog.d/16522.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clean-up unused tables.
1 change: 1 addition & 0 deletions changelog.d/16636.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support MSC4069: Inhibit profile propagation.
1 change: 1 addition & 0 deletions changelog.d/16661.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add schema rollback information to documentation.
1 change: 1 addition & 0 deletions changelog.d/16667.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database load of pruning old `user_ips`.
1 change: 1 addition & 0 deletions changelog.d/16668.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce DB load when forget on leave setting is disabled.
1 change: 1 addition & 0 deletions changelog.d/16677.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ignore `encryption_enabled_by_default_for_room_type` setting when creating server notices room, since the notices will be send unencrypted anyway.
1 change: 1 addition & 0 deletions changelog.d/16695.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix poetry version typo in [contributors' guide](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html).
1 change: 1 addition & 0 deletions changelog.d/16697.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove old full schema dumps which are no longer used.
1 change: 1 addition & 0 deletions changelog.d/16699.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add an autojoin setting for the notices room so users get joined directly instead of receiving an invite.
1 change: 1 addition & 0 deletions changelog.d/16700.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch the example UNIX socket paths to /run. Add HAProxy example configuration for UNIX sockets.
1 change: 1 addition & 0 deletions changelog.d/16701.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Follow redirects when downloading media over federation (per [MSC3860](https://github.com/matrix-org/matrix-spec-proposals/pull/3860)).
1 change: 1 addition & 0 deletions changelog.d/16702.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Raise poetry-core upper bound to <=1.8.1. This allows contributors to import Synapse after `poetry install`ing with Poetry 1.6 and above. Contributed by Mo Balaa.
1 change: 1 addition & 0 deletions changelog.d/16704.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a workflow to try and automatically fixup linting in a PR.
1 change: 1 addition & 0 deletions changelog.d/16707.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Synapse now declares support for Matrix v1.7, v1.8, and v1.9.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.97.0) stable; urgency=medium

* New Synapse release 1.97.0.

-- Synapse Packaging team <[email protected]> Tue, 28 Nov 2023 14:08:58 +0000

matrix-synapse-py3 (1.97.0~rc1) stable; urgency=medium

* New Synapse release 1.97.0rc1.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/contributing_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Of their installation methods, we recommend

```shell
pip install --user pipx
pipx install poetry==1.5.2 # Problems with Poetry 1.6, see https://github.com/matrix-org/synapse/issues/16147
pipx install poetry==1.5.1 # Problems with Poetry 1.6, see https://github.com/matrix-org/synapse/issues/16147
```

but see poetry's [installation instructions](https://python-poetry.org/docs/#installation)
Expand Down
13 changes: 13 additions & 0 deletions docs/modules/account_validity_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@ operations to keep track of them. (e.g. add them to a database table). The user
represented by their Matrix user ID.

If multiple modules implement this callback, Synapse runs them all in order.

### `on_user_login`

_First introduced in Synapse v1.98.0_

```python
async def on_user_login(user_id: str, auth_provider_type: str, auth_provider_id: str) -> None
```

Called after successfully login or registration of a user for cases when module needs to perform extra operations after auth.
represented by their Matrix user ID.

If multiple modules implement this callback, Synapse runs them all in order.
6 changes: 5 additions & 1 deletion docs/reverse_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ frontend matrix-federation
backend matrix
server matrix 127.0.0.1:8008
```

Example configuration, if using a UNIX socket. The configuration lines regarding the frontends do not need to be modified.
```
backend matrix
server matrix unix@/run/synapse/main_public.sock
```

[Delegation](delegate.md) example:
```
Expand Down
3 changes: 3 additions & 0 deletions docs/server_notices.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ server_notices:
system_mxid_display_name: "Server Notices"
system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
room_name: "Server Notices"
auto_join: true
```
The only compulsory setting is `system_mxid_localpart`, which defines the user
Expand All @@ -55,6 +56,8 @@ room which will be created.
`system_mxid_display_name` and `system_mxid_avatar_url` can be used to set the
displayname and avatar of the Server Notices user.

`auto_join` will autojoin users to the notices room instead of sending an invite.

## Sending notices

To send server notices to users you can use the
Expand Down
9 changes: 9 additions & 0 deletions docs/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ process, for example:
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
```
Generally Synapse database schemas are compatible across multiple versions, once
a version of Synapse is deployed you may not be able to rollback automatically.
The following table gives the version ranges and the earliest version they can
be rolled back to. E.g. Synapse versions v1.58.0 through v1.61.1 can be rolled
back safely to v1.57.0, but starting with v1.62.0 it is only safe to rollback to
v1.61.0.
<!-- REPLACE_WITH_SCHEMA_VERSIONS -->
# Upgrading to v1.93.0
## Minimum supported Rust version
Expand Down
17 changes: 10 additions & 7 deletions docs/usage/configuration/config_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ listeners:
# Note that x_forwarded will default to true, when using a UNIX socket. Please see
# https://matrix-org.github.io/synapse/latest/reverse_proxy.html.
#
- path: /var/run/synapse/main_public.sock
- path: /run/synapse/main_public.sock
type: http
resources:
- names: [client, federation]
Expand Down Expand Up @@ -3815,6 +3815,8 @@ Sub-options for this setting include:
* `system_mxid_display_name`: set the display name of the "notices" user
* `system_mxid_avatar_url`: set the avatar for the "notices" user
* `room_name`: set the room name of the server notices room
* `auto_join`: boolean. If true, the user will be automatically joined to the room instead of being invited.
Defaults to false. _Added in Synapse 1.98.0._

Example configuration:
```yaml
Expand All @@ -3823,6 +3825,7 @@ server_notices:
system_mxid_display_name: "Server Notices"
system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
room_name: "Server Notices"
auto_join: true
```
---
### `enable_room_list_search`
Expand Down Expand Up @@ -4215,9 +4218,9 @@ Example configuration(#2, for UNIX sockets):
```yaml
instance_map:
main:
path: /var/run/synapse/main_replication.sock
path: /run/synapse/main_replication.sock
worker1:
path: /var/run/synapse/worker1_replication.sock
path: /run/synapse/worker1_replication.sock
```
---
### `stream_writers`
Expand Down Expand Up @@ -4403,13 +4406,13 @@ Example configuration(#2, using UNIX sockets with a `replication` listener):
```yaml
worker_listeners:
- type: http
path: /var/run/synapse/worker_public.sock
path: /run/synapse/worker_replication.sock
resources:
- names: [client, federation]
- names: [replication]
- type: http
path: /var/run/synapse/worker_replication.sock
path: /run/synapse/worker_public.sock
resources:
- names: [replication]
- names: [client, federation]
```
---
### `worker_manhole`
Expand Down
Loading

0 comments on commit 85151a3

Please sign in to comment.