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/recheck_if_d…
Browse files Browse the repository at this point in the history
…evice_is_cached
  • Loading branch information
erikjohnston committed Sep 7, 2023
2 parents e05ccb5 + 8940d1b commit 0676302
Show file tree
Hide file tree
Showing 103 changed files with 1,805 additions and 640 deletions.
61 changes: 61 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
# Synapse 1.91.2 (2023-09-06)

### Bugfixes

- Revert [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861) introspection cache, admin impersonation and account lock. ([\#16258](https://github.com/matrix-org/synapse/issues/16258))

# Synapse 1.92.0rc1 (2023-09-05)

### Features

- Add configuration setting for CAS protocol version. Contributed by Aurélien Grimpard. ([\#15816](https://github.com/matrix-org/synapse/issues/15816))
- Suppress notifications from message edits per [MSC3958](https://github.com/matrix-org/matrix-spec-proposals/pull/3958). ([\#16113](https://github.com/matrix-org/synapse/issues/16113))
- Experimental support for [MSC4041](https://github.com/matrix-org/matrix-spec-proposals/pull/4041): return a `Retry-After` header with `M_LIMIT_EXCEEDED` error responses. ([\#16136](https://github.com/matrix-org/synapse/issues/16136))
- Add `last_seen_ts` to the [admin users API](https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html). ([\#16218](https://github.com/matrix-org/synapse/issues/16218))
- Improve resource usage when sending data to a large number of remote hosts that are marked as "down". ([\#16223](https://github.com/matrix-org/synapse/issues/16223))

### Bugfixes

- Fix IPv6-related bugs on SMTP settings, adding groundwork to fix similar issues. Contributed by @evilham and @telmich (ungleich.ch). ([\#16155](https://github.com/matrix-org/synapse/issues/16155))
- Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `include_all_networks` as a string. ([\#16185](https://github.com/matrix-org/synapse/issues/16185))
- Fix inaccurate error message while attempting to ban or unban a user with the same or higher PL by spliting the conditional statements. Contributed by @leviosacz. ([\#16205](https://github.com/matrix-org/synapse/issues/16205))
- Fix a rare bug that broke looping calls, which could lead to e.g. linearly increasing memory usage. Introduced in v1.90.0. ([\#16210](https://github.com/matrix-org/synapse/issues/16210))
- Fix a long-standing bug where uploading images would fail if we could not generate thumbnails for them. ([\#16211](https://github.com/matrix-org/synapse/issues/16211))
- Fix a long-standing bug where we did not correctly back off from servers that had "gone" if they returned 4xx series error codes. ([\#16221](https://github.com/matrix-org/synapse/issues/16221))

### Improved Documentation

- Update links to the [matrix.org blog](https://matrix.org/blog/). ([\#16008](https://github.com/matrix-org/synapse/issues/16008))
- Document which [admin APIs](https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/index.html) are disabled when experimental [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861) support is enabled. ([\#16168](https://github.com/matrix-org/synapse/issues/16168))
- Document [`exclude_rooms_from_sync`](https://matrix-org.github.io/synapse/v1.92/usage/configuration/config_documentation.html#exclude_rooms_from_sync) configuration option. ([\#16178](https://github.com/matrix-org/synapse/issues/16178))

### Internal Changes

- Prepare unit tests for Python 3.12. ([\#16099](https://github.com/matrix-org/synapse/issues/16099))
- Fix nightly CI jobs. ([\#16121](https://github.com/matrix-org/synapse/issues/16121), [\#16213](https://github.com/matrix-org/synapse/issues/16213))
- Describe which rate limiter was hit in logs. ([\#16135](https://github.com/matrix-org/synapse/issues/16135))
- Simplify presence code when using workers. ([\#16170](https://github.com/matrix-org/synapse/issues/16170))
- Track per-device information in the presence code. ([\#16171](https://github.com/matrix-org/synapse/issues/16171), [\#16172](https://github.com/matrix-org/synapse/issues/16172))
- Stop using the `event_txn_id` table. ([\#16175](https://github.com/matrix-org/synapse/issues/16175))
- Use `AsyncMock` instead of custom code. ([\#16179](https://github.com/matrix-org/synapse/issues/16179), [\#16180](https://github.com/matrix-org/synapse/issues/16180))
- Improve error reporting of invalid data passed to `/_matrix/key/v2/query`. ([\#16183](https://github.com/matrix-org/synapse/issues/16183))
- Task scheduler: add replication notify for new task to launch ASAP. ([\#16184](https://github.com/matrix-org/synapse/issues/16184))
- Improve type hints. ([\#16186](https://github.com/matrix-org/synapse/issues/16186), [\#16188](https://github.com/matrix-org/synapse/issues/16188), [\#16201](https://github.com/matrix-org/synapse/issues/16201))
- Bump black version to 23.7.0. ([\#16187](https://github.com/matrix-org/synapse/issues/16187))
- Log the details of background update failures. ([\#16212](https://github.com/matrix-org/synapse/issues/16212))
- Cache device resync requests over replication. ([\#16241](https://github.com/matrix-org/synapse/issues/16241))

### Updates to locked dependencies

* Bump anyhow from 1.0.72 to 1.0.75. ([\#16141](https://github.com/matrix-org/synapse/issues/16141))
* Bump furo from 2023.7.26 to 2023.8.19. ([\#16238](https://github.com/matrix-org/synapse/issues/16238))
* Bump phonenumbers from 8.13.18 to 8.13.19. ([\#16237](https://github.com/matrix-org/synapse/issues/16237))
* Bump psycopg2 from 2.9.6 to 2.9.7. ([\#16196](https://github.com/matrix-org/synapse/issues/16196))
* Bump regex from 1.9.3 to 1.9.4. ([\#16195](https://github.com/matrix-org/synapse/issues/16195))
* Bump ruff from 0.0.277 to 0.0.286. ([\#16198](https://github.com/matrix-org/synapse/issues/16198))
* Bump sentry-sdk from 1.29.2 to 1.30.0. ([\#16236](https://github.com/matrix-org/synapse/issues/16236))
* Bump serde from 1.0.184 to 1.0.188. ([\#16194](https://github.com/matrix-org/synapse/issues/16194))
* Bump serde_json from 1.0.104 to 1.0.105. ([\#16140](https://github.com/matrix-org/synapse/issues/16140))
* Bump types-psycopg2 from 2.9.21.10 to 2.9.21.11. ([\#16200](https://github.com/matrix-org/synapse/issues/16200))
* Bump types-pyyaml from 6.0.12.10 to 6.0.12.11. ([\#16199](https://github.com/matrix-org/synapse/issues/16199))

# Synapse 1.91.1 (2023-09-04)

### Bugfixes
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion changelog.d/15816.feature

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/15997.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow modules to delete rooms.
1 change: 0 additions & 1 deletion changelog.d/16008.doc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16066.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where multi-device accounts could cause high load due to presence.
1 change: 1 addition & 0 deletions changelog.d/16090.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add GCC and GNU Make to the Nix flake development environment so that `ruff` can be compiled.
1 change: 0 additions & 1 deletion changelog.d/16099.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16113.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16121.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16135.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16136.feature

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16137.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support resolving homeservers using `matrix-fed` DNS SRV records from [MSC4040](https://github.com/matrix-org/matrix-spec-proposals/pull/4040).
1 change: 0 additions & 1 deletion changelog.d/16155.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16168.doc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16170.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where multi-device accounts could cause high load due to presence.
1 change: 0 additions & 1 deletion changelog.d/16170.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16171.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where multi-device accounts could cause high load due to presence.
1 change: 0 additions & 1 deletion changelog.d/16171.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16172.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where multi-device accounts could cause high load due to presence.
1 change: 0 additions & 1 deletion changelog.d/16172.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16174.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where multi-device accounts could cause high load due to presence.
1 change: 0 additions & 1 deletion changelog.d/16175.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16178.doc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16179.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16180.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16183.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16184.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16185.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16186.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16187.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16188.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16201.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16205.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16210.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16211.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16212.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16213.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16218.feature

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16219.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the ability to use `G` (GiB) and `T` (TiB) suffixes in configuration options that refer to numbers of bytes.
1 change: 0 additions & 1 deletion changelog.d/16220.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16221.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/16223.feature

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16227.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add span information to requests sent to appservices. Contributed by MTRNord.
1 change: 1 addition & 0 deletions changelog.d/16240.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete device messages asynchronously and in staged batches using the task scheduler.
1 change: 0 additions & 1 deletion changelog.d/16241.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/16251.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where appservices using MSC2409 to receive to_device messages, would only get messages for one user.
1 change: 1 addition & 0 deletions changelog.d/16255.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix incorrect docstring for `Ratelimiter`.
1 change: 1 addition & 0 deletions changelog.d/16257.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix long-standing bug where we kept re-requesting a remote server's key repeatedly, potentially causing delays in receiving events over federation.
1 change: 1 addition & 0 deletions changelog.d/16258.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Revert [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861) introspection cache, admin impersonation and account lock.
1 change: 1 addition & 0 deletions changelog.d/16260.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update rust to version 1.71.1 in the nix development environment.
1 change: 1 addition & 0 deletions changelog.d/16262.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the ability to enable/disable registrations when in the CAS flow. Contributed by Aurélien Grimpard.
1 change: 1 addition & 0 deletions changelog.d/16263.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add GCC and GNU Make to the Nix flake development environment so that `ruff` can be compiled.
1 change: 1 addition & 0 deletions changelog.d/16265.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow `/notifications` endpoint to be routed to workers.
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
matrix-synapse-py3 (1.91.2) stable; urgency=medium

* New synapse release 1.91.2.

-- Synapse Packaging team <packages@matrix.org> Wed, 06 Sep 2023 14:59:30 +0000

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

* New Synapse release 1.92.0rc1.

-- Synapse Packaging team <packages@matrix.org> Tue, 05 Sep 2023 11:21:43 +0100

matrix-synapse-py3 (1.91.1) stable; urgency=medium

* New Synapse release 1.91.1.
Expand Down
1 change: 1 addition & 0 deletions docker/configure_workers_and_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
"^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$",
"^/_matrix/client/(r0|v3|unstable)/capabilities$",
"^/_matrix/client/(r0|v3|unstable)/notifications$",
],
"shared_extra_conf": {},
"worker_extra_conf": "",
Expand Down
11 changes: 10 additions & 1 deletion docs/usage/configuration/config_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ messages from the database after 5 minutes, rather than 5 months.

In addition, configuration options referring to size use the following suffixes:

* `M` = MiB, or 1,048,576 bytes
* `K` = KiB, or 1024 bytes
* `M` = MiB, or 1,048,576 bytes
* `G` = GiB, or 1,073,741,824 bytes
* `T` = TiB, or 1,099,511,627,776 bytes

For example, setting `max_avatar_size: 10M` means that Synapse will not accept files larger than 10,485,760 bytes
for a user avatar.
Expand Down Expand Up @@ -3428,6 +3430,12 @@ Has the following sub-options:
and the values must match the given value. Alternately if the given value
is `None` then any value is allowed (the attribute just must exist).
All of the listed attributes must match for the login to be permitted.
* `enable_registration`: set to 'false' to disable automatic registration of new
users. This allows the CAS SSO flow to be limited to sign in only, rather than
automatically registering users that have a valid SSO login but do not have
a pre-registered account. Defaults to true.

*Added in Synapse 1.93.0.*

Example configuration:
```yaml
Expand All @@ -3439,6 +3447,7 @@ cas_config:
required_attributes:
userGroup: "staff"
department: None
enable_registration: true
```
---
### `sso`
Expand Down
1 change: 1 addition & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ information.
^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)
^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$
^/_matrix/client/(r0|v3|unstable)/capabilities$
^/_matrix/client/(r0|v3|unstable)/notifications$

# Encryption requests
^/_matrix/client/(r0|v3|unstable)/keys/query$
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,19 @@
#
# NOTE: We currently need to set the Rust version unnecessarily high
# in order to work around https://github.com/matrix-org/synapse/issues/15939
(rust-bin.stable."1.70.0".default.override {
(rust-bin.stable."1.71.1".default.override {
# Additionally install the "rust-src" extension to allow diving into the
# Rust source code in an IDE (rust-analyzer will also make use of it).
extensions = [ "rust-src" ];
})
# The rust-analyzer language server implementation.
rust-analyzer

# GCC includes a linker; needed for building `ruff`
gcc
# Needed for building `ruff`
gnumake

# Native dependencies for running Synapse.
icu
libffi
Expand Down Expand Up @@ -236,6 +241,19 @@
URI
YAMLLibYAML
]}";

# Clear the LD_LIBRARY_PATH environment variable on shell init.
#
# By default, devenv will set LD_LIBRARY_PATH to point to .devenv/profile/lib. This causes
# issues when we include `gcc` as a dependency to build C libraries, as the version of glibc
# that the development environment's cc compiler uses may differ from that of the system.
#
# When LD_LIBRARY_PATH is set, system tools will attempt to use the development environment's
# libraries. Which, when built against a different glibc version lead, to "version 'GLIBC_X.YY'
# not found" errors.
enterShell = ''
unset LD_LIBRARY_PATH
'';
}
];
};
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ manifest-path = "rust/Cargo.toml"

[tool.poetry]
name = "matrix-synapse"
version = "1.91.1"
version = "1.92.0rc1"
description = "Homeserver for the Matrix decentralised comms protocol"
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
license = "Apache-2.0"
Expand Down
12 changes: 12 additions & 0 deletions scripts-dev/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,17 @@ def _lookup(server_name: str) -> Tuple[str, int, str]:
raise ValueError("Invalid host:port '%s'" % (server_name,))
return out[0], port, out[0]

# Look up SRV for Matrix 1.8 `matrix-fed` service first
try:
srv = srvlookup.lookup("matrix-fed", "tcp", server_name)[0]
print(
f"SRV lookup on _matrix-fed._tcp.{server_name} gave {srv}",
file=sys.stderr,
)
return srv.host, srv.port, server_name
except Exception:
pass
# Fall back to deprecated `matrix` service
try:
srv = srvlookup.lookup("matrix", "tcp", server_name)[0]
print(
Expand All @@ -337,6 +348,7 @@ def _lookup(server_name: str) -> Tuple[str, int, str]:
)
return srv.host, srv.port, server_name
except Exception:
# Fall even further back to just port 8448
return server_name, 8448, server_name

@staticmethod
Expand Down
Loading

0 comments on commit 0676302

Please sign in to comment.