From 4d6f7c0fc9a5407c14a2cabdc7f80c5fd2e7395e Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:12:11 +0100 Subject: Route auth'd fed media requests to media repo in Complement tests (#17422) --- changelog.d/17422.misc | 1 + docker/configure_workers_and_start.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/17422.misc diff --git a/changelog.d/17422.misc b/changelog.d/17422.misc new file mode 100644 index 0000000000..1f53e3c579 --- /dev/null +++ b/changelog.d/17422.misc @@ -0,0 +1 @@ +Route authenticated federation media requests to media repository workers in Complement tests. \ No newline at end of file diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py index b6690f3404..15d8d7b558 100755 --- a/docker/configure_workers_and_start.py +++ b/docker/configure_workers_and_start.py @@ -126,6 +126,7 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = { "^/_synapse/admin/v1/media/.*$", "^/_synapse/admin/v1/quarantine_media/.*$", "^/_matrix/client/v1/media/.*$", + "^/_matrix/federation/v1/media/.*$", ], # The first configured media worker will run the media background jobs "shared_extra_conf": { -- cgit 1.4.1 From 62d8b0361b604979d87f7b27559b9116e95f3da6 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:41:51 +0100 Subject: Note the new federated media worker endpoints in the worker docs & upgrade notes (#17421) --- changelog.d/17421.doc | 1 + docs/upgrade.md | 5 +++-- docs/workers.md | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog.d/17421.doc diff --git a/changelog.d/17421.doc b/changelog.d/17421.doc new file mode 100644 index 0000000000..e6a495e5d6 --- /dev/null +++ b/changelog.d/17421.doc @@ -0,0 +1 @@ +Document the new federation media worker endpoints in the [upgrade notes](https://element-hq.github.io/synapse/v1.111/upgrade.html) and [worker docs](https://element-hq.github.io/synapse/v1.111/workers.html). \ No newline at end of file diff --git a/docs/upgrade.md b/docs/upgrade.md index cf53f56b06..52b1adbe90 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -119,13 +119,14 @@ stacking them up. You can monitor the currently running background updates with # Upgrading to v1.111.0 -## New worker endpoints for authenticated client media +## New worker endpoints for authenticated client and federation media [Media repository workers](./workers.md#synapseappmedia_repository) handling -Media APIs can now handle the following endpoint pattern: +Media APIs can now handle the following endpoint patterns: ``` ^/_matrix/client/v1/media/.*$ +^/_matrix/federation/v1/media/.*$ ``` Please update your reverse proxy configuration. diff --git a/docs/workers.md b/docs/workers.md index 22fde488a9..fbf539fa7e 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -740,6 +740,7 @@ Handles the media repository. It can handle all endpoints starting with: /_matrix/media/ /_matrix/client/v1/media/ + /_matrix/federation/v1/media/ ... and the following regular expressions matching media-specific administration APIs: -- cgit 1.4.1 From 22fbc5be5482beaefc98a16c92f0e5b0dad84151 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 9 Jul 2024 18:29:32 +0100 Subject: Fix new media APIs when using synapse.app.media_repository (#17420) Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- changelog.d/17420.bugfix | 1 + synapse/federation/transport/server/__init__.py | 2 +- synapse/rest/__init__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/17420.bugfix diff --git a/changelog.d/17420.bugfix b/changelog.d/17420.bugfix new file mode 100644 index 0000000000..343f9b9331 --- /dev/null +++ b/changelog.d/17420.bugfix @@ -0,0 +1 @@ +Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints. diff --git a/synapse/federation/transport/server/__init__.py b/synapse/federation/transport/server/__init__.py index 5f997040d0..72599bb204 100644 --- a/synapse/federation/transport/server/__init__.py +++ b/synapse/federation/transport/server/__init__.py @@ -321,7 +321,7 @@ def register_servlets( servletclass == FederationMediaDownloadServlet or servletclass == FederationMediaThumbnailServlet ): - if not hs.config.server.enable_media_repo: + if not hs.config.media.can_load_media_repo: continue servletclass( diff --git a/synapse/rest/__init__.py b/synapse/rest/__init__.py index c94d454a28..1aa9ea3877 100644 --- a/synapse/rest/__init__.py +++ b/synapse/rest/__init__.py @@ -145,7 +145,7 @@ class ClientRestResource(JsonResource): password_policy.register_servlets(hs, client_resource) knock.register_servlets(hs, client_resource) appservice_ping.register_servlets(hs, client_resource) - if hs.config.server.enable_media_repo: + if hs.config.media.can_load_media_repo: from synapse.rest.client import media media.register_servlets(hs, client_resource) -- cgit 1.4.1 From e0ff850cb7e245e09a3ed7aacf064846732a9a2d Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 10 Jul 2024 10:47:35 +0200 Subject: 1.111.0rc2 --- CHANGES.md | 17 +++++++++++++++++ changelog.d/17420.bugfix | 1 - changelog.d/17421.doc | 1 - changelog.d/17422.misc | 1 - debian/changelog | 6 ++++++ pyproject.toml | 2 +- 6 files changed, 24 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/17420.bugfix delete mode 100644 changelog.d/17421.doc delete mode 100644 changelog.d/17422.misc diff --git a/CHANGES.md b/CHANGES.md index cbd8f1062e..8279960b5b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,20 @@ +# Synapse 1.111.0rc2 (2024-07-10) + +### Bugfixes + +- Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints. ([\#17420](https://github.com/element-hq/synapse/issues/17420)) + +### Improved Documentation + +- Document the new federation media worker endpoints in the [upgrade notes](https://element-hq.github.io/synapse/v1.111/upgrade.html) and [worker docs](https://element-hq.github.io/synapse/v1.111/workers.html). ([\#17421](https://github.com/element-hq/synapse/issues/17421)) + +### Internal Changes + +- Route authenticated federation media requests to media repository workers in Complement tests. ([\#17422](https://github.com/element-hq/synapse/issues/17422)) + + + + # Synapse 1.111.0rc1 (2024-07-09) ### Features diff --git a/changelog.d/17420.bugfix b/changelog.d/17420.bugfix deleted file mode 100644 index 343f9b9331..0000000000 --- a/changelog.d/17420.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints. diff --git a/changelog.d/17421.doc b/changelog.d/17421.doc deleted file mode 100644 index e6a495e5d6..0000000000 --- a/changelog.d/17421.doc +++ /dev/null @@ -1 +0,0 @@ -Document the new federation media worker endpoints in the [upgrade notes](https://element-hq.github.io/synapse/v1.111/upgrade.html) and [worker docs](https://element-hq.github.io/synapse/v1.111/workers.html). \ No newline at end of file diff --git a/changelog.d/17422.misc b/changelog.d/17422.misc deleted file mode 100644 index 1f53e3c579..0000000000 --- a/changelog.d/17422.misc +++ /dev/null @@ -1 +0,0 @@ -Route authenticated federation media requests to media repository workers in Complement tests. \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 5fc9e10a29..0f3dcc64e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +matrix-synapse-py3 (1.111.0~rc2) stable; urgency=medium + + * New synapse release 1.111.0rc2. + + -- Synapse Packaging team Wed, 10 Jul 2024 08:46:54 +0000 + matrix-synapse-py3 (1.111.0~rc1) stable; urgency=medium * New synapse release 1.111.0rc1. diff --git a/pyproject.toml b/pyproject.toml index 0b1f03bb81..41de90f9f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,7 +97,7 @@ module-name = "synapse.synapse_rust" [tool.poetry] name = "matrix-synapse" -version = "1.111.0rc1" +version = "1.111.0rc2" description = "Homeserver for the Matrix decentralised comms protocol" authors = ["Matrix.org Team and Contributors "] license = "AGPL-3.0-or-later" -- cgit 1.4.1