mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-16 02:20:20 -04:00
Merge remote-tracking branch 'upstream/release-v1.69'
This commit is contained in:
commit
b4881b2b37
8 changed files with 68 additions and 13 deletions
|
@ -10,6 +10,7 @@
|
||||||
!poetry.lock
|
!poetry.lock
|
||||||
!requirements.txt
|
!requirements.txt
|
||||||
!Cargo.lock
|
!Cargo.lock
|
||||||
|
!Cargo.toml
|
||||||
!build_rust.py
|
!build_rust.py
|
||||||
|
|
||||||
rust/target
|
rust/target
|
||||||
|
|
19
CHANGES.md
19
CHANGES.md
|
@ -1,4 +1,4 @@
|
||||||
Synapse 1.69.0rc2 (2022-10-06)
|
Synapse 1.69.0rc3 (2022-10-12)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Please note that legacy Prometheus metric names are now deprecated and will be removed in Synapse 1.73.0.
|
Please note that legacy Prometheus metric names are now deprecated and will be removed in Synapse 1.73.0.
|
||||||
|
@ -6,6 +6,23 @@ Server administrators should update their dashboards and alerting rules to avoid
|
||||||
See the [upgrade notes](https://matrix-org.github.io/synapse/v1.69/upgrade.html#upgrading-to-v1690) for more details.
|
See the [upgrade notes](https://matrix-org.github.io/synapse/v1.69/upgrade.html#upgrading-to-v1690) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix an issue with Docker images causing the Rust dependencies to not be pinned correctly. Introduced in v1.68.0 ([\#14129](https://github.com/matrix-org/synapse/issues/14129))
|
||||||
|
- Fix a bug introduced in Synapse 1.69.0rc1 which would cause registration replication requests to fail if the worker sending the request is not running Synapse 1.69. ([\#14135](https://github.com/matrix-org/synapse/issues/14135))
|
||||||
|
- Fix error in background update when rotating existing notifications. Introduced in v1.69.0rc2. ([\#14138](https://github.com/matrix-org/synapse/issues/14138))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Rename the `url_preview` extra to `url-preview`, for compatability with poetry-core 1.3.0 and [PEP 685](https://peps.python.org/pep-0685/). From-source installations using this extra will need to install using the new name. ([\#14085](https://github.com/matrix-org/synapse/issues/14085))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.69.0rc2 (2022-10-06)
|
||||||
|
==============================
|
||||||
|
|
||||||
Deprecations and Removals
|
Deprecations and Removals
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
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
|
matrix-synapse-py3 (1.69.0~rc2) stable; urgency=medium
|
||||||
|
|
||||||
* New Synapse release 1.69.0rc2.
|
* New Synapse release 1.69.0rc2.
|
||||||
|
|
|
@ -121,7 +121,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
COPY synapse /synapse/synapse/
|
COPY synapse /synapse/synapse/
|
||||||
COPY rust /synapse/rust/
|
COPY rust /synapse/rust/
|
||||||
# ... and what we need to `pip install`.
|
# ... and what we need to `pip install`.
|
||||||
COPY pyproject.toml README.rst build_rust.py /synapse/
|
COPY pyproject.toml README.rst build_rust.py Cargo.toml Cargo.lock /synapse/
|
||||||
|
|
||||||
# Repeat of earlier build argument declaration, as this is a new build stage.
|
# Repeat of earlier build argument declaration, as this is a new build stage.
|
||||||
ARG TEST_ONLY_IGNORE_POETRY_LOCKFILE
|
ARG TEST_ONLY_IGNORE_POETRY_LOCKFILE
|
||||||
|
|
|
@ -57,7 +57,7 @@ manifest-path = "rust/Cargo.toml"
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "matrix-synapse"
|
name = "matrix-synapse"
|
||||||
version = "1.69.0rc2"
|
version = "1.69.0rc3"
|
||||||
description = "Homeserver for the Matrix decentralised comms protocol"
|
description = "Homeserver for the Matrix decentralised comms protocol"
|
||||||
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
@ -219,7 +219,7 @@ oidc = ["authlib"]
|
||||||
# `systemd.journal.JournalHandler`, as is documented in
|
# `systemd.journal.JournalHandler`, as is documented in
|
||||||
# `contrib/systemd/log_config.yaml`.
|
# `contrib/systemd/log_config.yaml`.
|
||||||
systemd = ["systemd-python"]
|
systemd = ["systemd-python"]
|
||||||
url_preview = ["lxml"]
|
url-preview = ["lxml"]
|
||||||
sentry = ["sentry-sdk"]
|
sentry = ["sentry-sdk"]
|
||||||
opentracing = ["jaeger-client", "opentracing"]
|
opentracing = ["jaeger-client", "opentracing"]
|
||||||
jwt = ["authlib"]
|
jwt = ["authlib"]
|
||||||
|
@ -250,7 +250,7 @@ all = [
|
||||||
"pysaml2",
|
"pysaml2",
|
||||||
# oidc and jwt
|
# oidc and jwt
|
||||||
"authlib",
|
"authlib",
|
||||||
# url_preview
|
# url-preview
|
||||||
"lxml",
|
"lxml",
|
||||||
# sentry
|
# sentry
|
||||||
"sentry-sdk",
|
"sentry-sdk",
|
||||||
|
@ -307,7 +307,12 @@ twine = "*"
|
||||||
towncrier = ">=18.6.0rc1"
|
towncrier = ">=18.6.0rc1"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core==1.2.0", "setuptools_rust==1.5.2"]
|
# The upper bounds here are defensive, intended to prevent situations like
|
||||||
|
# #13849 and #14079 where we see buildtime or runtime errors caused by build
|
||||||
|
# system changes.
|
||||||
|
# We are happy to raise these upper bounds upon request,
|
||||||
|
# provided we check that it's safe to do so (i.e. that CI passes).
|
||||||
|
requires = ["poetry-core>=1.0.0,<=1.3.1", "setuptools_rust>=1.3,<=1.5.2"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ class ContentRepositoryConfig(Config):
|
||||||
)
|
)
|
||||||
self.url_preview_enabled = config.get("url_preview_enabled", False)
|
self.url_preview_enabled = config.get("url_preview_enabled", False)
|
||||||
if self.url_preview_enabled:
|
if self.url_preview_enabled:
|
||||||
check_requirements("url_preview")
|
check_requirements("url-preview")
|
||||||
|
|
||||||
proxy_env = getproxies_environment()
|
proxy_env = getproxies_environment()
|
||||||
if "url_preview_ip_range_blacklist" not in config:
|
if "url_preview_ip_range_blacklist" not in config:
|
||||||
|
|
|
@ -39,6 +39,16 @@ class ReplicationRegisterServlet(ReplicationEndpoint):
|
||||||
self.store = hs.get_datastores().main
|
self.store = hs.get_datastores().main
|
||||||
self.registration_handler = hs.get_registration_handler()
|
self.registration_handler = hs.get_registration_handler()
|
||||||
|
|
||||||
|
# Default value if the worker that sent the replication request did not include
|
||||||
|
# an 'approved' property.
|
||||||
|
if (
|
||||||
|
hs.config.experimental.msc3866.enabled
|
||||||
|
and hs.config.experimental.msc3866.require_approval_for_new_accounts
|
||||||
|
):
|
||||||
|
self._approval_default = False
|
||||||
|
else:
|
||||||
|
self._approval_default = True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def _serialize_payload( # type: ignore[override]
|
async def _serialize_payload( # type: ignore[override]
|
||||||
user_id: str,
|
user_id: str,
|
||||||
|
@ -92,6 +102,12 @@ class ReplicationRegisterServlet(ReplicationEndpoint):
|
||||||
|
|
||||||
await self.registration_handler.check_registration_ratelimit(content["address"])
|
await self.registration_handler.check_registration_ratelimit(content["address"])
|
||||||
|
|
||||||
|
# Always default admin users to approved (since it means they were created by
|
||||||
|
# an admin).
|
||||||
|
approved_default = self._approval_default
|
||||||
|
if content["admin"]:
|
||||||
|
approved_default = True
|
||||||
|
|
||||||
await self.registration_handler.register_with_store(
|
await self.registration_handler.register_with_store(
|
||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
password_hash=content["password_hash"],
|
password_hash=content["password_hash"],
|
||||||
|
@ -103,7 +119,7 @@ class ReplicationRegisterServlet(ReplicationEndpoint):
|
||||||
user_type=content["user_type"],
|
user_type=content["user_type"],
|
||||||
address=content["address"],
|
address=content["address"],
|
||||||
shadow_banned=content["shadow_banned"],
|
shadow_banned=content["shadow_banned"],
|
||||||
approved=content["approved"],
|
approved=content.get("approved", approved_default),
|
||||||
)
|
)
|
||||||
|
|
||||||
return 200, {}
|
return 200, {}
|
||||||
|
|
|
@ -1104,11 +1104,13 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
|
||||||
)
|
)
|
||||||
|
|
||||||
# First ensure that the existing rows have an updated thread_id field.
|
# First ensure that the existing rows have an updated thread_id field.
|
||||||
self.db_pool.simple_update_txn(
|
txn.execute(
|
||||||
txn,
|
"""
|
||||||
table="event_push_summary",
|
UPDATE event_push_summary
|
||||||
keyvalues={"room_id": room_id, "user_id": user_id, "thread_id": None},
|
SET thread_id = ?
|
||||||
updatevalues={"thread_id": "main"},
|
WHERE room_id = ? AND user_id = ? AND thread_id is NULL
|
||||||
|
""",
|
||||||
|
("main", room_id, user_id),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Replace the previous summary with the new counts.
|
# Replace the previous summary with the new counts.
|
||||||
|
@ -1272,6 +1274,14 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
|
||||||
logger.info("Rotating notifications, handling %d rows", len(summaries))
|
logger.info("Rotating notifications, handling %d rows", len(summaries))
|
||||||
|
|
||||||
# Ensure that any updated threads have an updated thread_id.
|
# Ensure that any updated threads have an updated thread_id.
|
||||||
|
txn.execute_batch(
|
||||||
|
"""
|
||||||
|
UPDATE event_push_summary
|
||||||
|
SET thread_id = ?
|
||||||
|
WHERE room_id = ? AND user_id = ? AND thread_id is NULL
|
||||||
|
""",
|
||||||
|
[("main", room_id, user_id) for user_id, room_id in summaries],
|
||||||
|
)
|
||||||
self.db_pool.simple_update_many_txn(
|
self.db_pool.simple_update_many_txn(
|
||||||
txn,
|
txn,
|
||||||
table="event_push_summary",
|
table="event_push_summary",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue