Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package matrix-synapse for openSUSE:Factory 
checked in at 2021-09-23 23:03:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/matrix-synapse (Old)
 and      /work/SRC/openSUSE:Factory/.matrix-synapse.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "matrix-synapse"

Thu Sep 23 23:03:57 2021 rev:44 rq:921053 version:1.43.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/matrix-synapse/matrix-synapse.changes    
2021-09-08 21:37:45.057968167 +0200
+++ /work/SRC/openSUSE:Factory/.matrix-synapse.new.1899/matrix-synapse.changes  
2021-09-23 23:04:08.324326830 +0200
@@ -1,0 +2,107 @@
+Tue Sep 21 13:41:59 UTC 2021 - Marcus Rueckert <mrueck...@suse.de>
+
+- Update to 1.43.0
+  This release drops support for the deprecated, unstable API for
+  MSC2858, as well as the undocumented experimental.msc2858_enabled
+  config option. Client authors should update their clients to use
+  the stable API, available since Synapse 1.30.
+
+  - Features
+    - Allow room creators to send historical events specified by
+      MSC2716 in existing room versions. (#10566)
+    - Add config option to use non-default manhole password and
+      keys. (#10643)
+    - Skip final GC at shutdown to improve restart performance.
+      (#10712)
+    - Allow configuration of the oEmbed URLs used for URL previews.
+      (#10714, #10759)
+    - Prefer room version 9 for restricted rooms per the room
+      version capabilities API. (#10772)
+  - Bugfixes
+    - Added opentracing logging to help debug #9424. (#10828)
+    - Fix a long-standing bug where room avatars were not included
+      in email notifications. (#10658)
+    - Fix a bug where the ordering algorithm was skipping the
+      origin_server_ts step in the spaces summary resulting in
+      unstable room orderings. (#10730)
+    - Fix edge case when persisting events into a room where there
+      are multiple events we previously hadn't calculated auth
+      chains for (and hadn't marked as needing to be calculated).
+      (#10743)
+    - Fix a bug which prevented calls to /createRoom that included
+      the room_alias_name parameter from being handled by worker
+      processes. (#10757)
+    - Fix a bug which prevented user registration via SSO to
+      require consent tracking for SSO mapping providers that don't
+      prompt for Matrix ID selection. Contributed by @AndrewFerr.
+      (#10733)
+    - Only return the stripped state events for the m.space.child
+      events in a room for the spaces summary from MSC2946.
+      (#10760)
+    - Properly handle room upgrades of spaces. (#10774)
+    - Fix a bug which generated invalid homeserver config when the
+      frontend_proxy worker type was passed to the Synapse
+      Worker-based Complement image. (#10783)
+  - Improved Documentation
+    - Minor fix to the media_repository developer documentation.
+      Contributed by @cuttingedge1109. (#10556)
+    - Update the documentation to note that the /spaces and
+      /hierarchy endpoints can be routed to workers. (#10648)
+    - Clarify admin API documentation on undoing room deletions.
+      (#10735)
+    - Split up the modules documentation and add examples for
+      module developers. (#10758)
+    - Correct 2 typographical errors in the Log Contexts
+      documentation. (#10795)
+    - Fix a wording mistake in the sample configuration.
+      Contributed by @BramvdnHeuvel:nltrix.net. (#10804)
+  - Deprecations and Removals
+    - Remove the unstable MSC2858 API, including the undocumented
+      experimental.msc2858_enabled config option. The unstable API
+      has been deprecated since Synapse 1.35. Client authors should
+      update their clients to use the stable API introduced in
+      Synapse 1.30 if they have not already done so. (#10693)
+  - Internal Changes
+    - Add OpenTracing logging to help debug stuck messages (as
+      described by issue #9424). (#10704)
+    - Add type annotations to the synapse.util package. (#10601)
+    - Ensure rooms.creator field is always populated for easy
+      lookup in MSC2716 usage later. (#10697)
+    - Add missing type hints to REST servlets. (#10707, #10728,
+      #10736)
+    - Do not include rooms with unknown room versions in the spaces
+      summary results. (#10727)
+    - Additional error checking for the preset field when creating
+      a room. (#10738)
+    - Clean up some of the federation event authentication code for
+      clarity. (#10744, #10745, #10746, #10771, #10773, #10781)
+    - Add an index to presence_stream to hopefully speed up
+      startups a little. (#10748)
+    - Refactor event size checking code to simplify searching the
+      codebase for the origins of certain error strings that are
+      occasionally emitted. (#10750)
+    - Move tests relating to rooms having encryption out of the
+      user directory tests. (#10752)
+    - Use attrs internally for the URL preview code & update
+      documentation. (#10753)
+    - Minor speed ups when joining large rooms over federation.
+      (#10754, #10755, #10756, #10780, #10784)
+    - Add a constant for m.federate. (#10775)
+    - Add a script to update the Debian changelog in a Docker
+      container for systems that are not Debian-based. (#10778)
+    - Change the format of authenticated users in logs when a user
+      is being puppeted by and admin user. (#10779)
+    - Remove fixed and flakey tests from the Sytest blacklist.
+      (#10788)
+    - Improve internal details of the user directory code. (#10789)
+    - Use direct references to config flags. (#10798)
+    - Ensure the Rust reporter passes type checking with
+      jaeger-client 4.7's type annotations. (#10799)
+
+-------------------------------------------------------------------
+Tue Sep 21 11:34:59 UTC 2021 - Marcus Rueckert <mrueck...@suse.de>
+
+- disable 10719-Fix-instert-of-duplicate-key-into-event_json.patch
+  until upstream decided if they want to accept it
+
+-------------------------------------------------------------------
@@ -98,0 +206,5 @@
+
+-------------------------------------------------------------------
+Thu Sep  2 09:52:14 UTC 2021 - Jan Zerebecki <jan.s...@zerebecki.de>
+
+- Add 10719-Fix-instert-of-duplicate-key-into-event_json.patch 

Old:
----
  matrix-synapse-1.42.0.obscpio

New:
----
  10719-Fix-instert-of-duplicate-key-into-event_json.patch
  matrix-synapse-1.43.0.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ matrix-synapse-test.spec ++++++
--- /var/tmp/diff_new_pack.xjLplV/_old  2021-09-23 23:04:09.400327633 +0200
+++ /var/tmp/diff_new_pack.xjLplV/_new  2021-09-23 23:04:09.404327635 +0200
@@ -27,7 +27,7 @@
 
 %define         pkgname matrix-synapse
 Name:           %{pkgname}-test
-Version:        1.42.0
+Version:        1.43.0
 Release:        0
 Summary:        Test package for %{pkgname}
 License:        Apache-2.0

++++++ matrix-synapse.spec ++++++
--- /var/tmp/diff_new_pack.xjLplV/_old  2021-09-23 23:04:09.428327653 +0200
+++ /var/tmp/diff_new_pack.xjLplV/_new  2021-09-23 23:04:09.432327656 +0200
@@ -47,7 +47,7 @@
 %define         pkgname matrix-synapse
 %define         eggname matrix_synapse
 Name:           %{pkgname}
-Version:        1.42.0
+Version:        1.43.0
 Release:        0
 Summary:        Matrix protocol reference homeserver
 License:        Apache-2.0
@@ -65,6 +65,9 @@
 Source99:       series
 Patch:          matrix-synapse-1.4.1-paths.patch
 Patch1:         dont-bump-cryptography-with-system-openssl.patch
+# https://github.com/matrix-org/synapse/pull/10719
+# disable by marking as source until we get a decision upstream
+Source100:      10719-Fix-instert-of-duplicate-key-into-event_json.patch
 BuildRequires:  %{use_python}-base >= 3.5
 BuildRequires:  %{use_python}-setuptools
 BuildRequires:  fdupes
@@ -73,7 +76,7 @@
 BuildRequires:  sysuser-shadow
 BuildRequires:  sysuser-tools
 BuildRequires:  unzip
-%{?systemd_requires}
+%{?systemd_ordering}
 %{sysusers_requires}
 %requires_eq    %{use_python}-base
 # NOTE: Keep this is in the same order as synapse/python_dependencie.py.

++++++ 10719-Fix-instert-of-duplicate-key-into-event_json.patch ++++++
>From d8917666d6198873bca140c3c511ae230ee698ec Mon Sep 17 00:00:00 2001
From: Jan Zerebecki <jan.s...@zerebecki.de>
Date: Mon, 30 Aug 2021 17:31:31 +0200
Subject: [PATCH] Fix instert of duplicate key into event_json

When an incoming event id is present in event_json but not in events
synapse fails trying to insert it with "psycopg2.errors.UniqueViolation:
duplicate key value violates unique constraints", because it is only
filtered based on those that are in events.

I don't know why those become out of sync, but this happening was
reported by others before.

Fix this by using an upsert (which inserts or updates existing records)
instead of a normal insert.

Please verify that this is the safe and correct thing to do before
merging this. Verify e.g. that it doesn't allow breaking history
integrity or something like it. As I don't know enough to understand
what this change entails.

Fixes: https://github.com/matrix-org/synapse/issues/10718
Signed-off-by: Jan Zerebecki <jan.s...@zerebecki.de>
---
 changelog.d/10719.bugfix                 |  1 +
 synapse/storage/databases/main/events.py | 22 +++++++++++-----------
 2 files changed, 12 insertions(+), 11 deletions(-)
 create mode 100644 changelog.d/10719.bugfix

diff --git a/changelog.d/10719.bugfix b/changelog.d/10719.bugfix
new file mode 100644
index 00000000000..d928f74f6bf
--- /dev/null
+++ b/changelog.d/10719.bugfix
@@ -0,0 +1 @@
+Fix instert failure because of duplicate key when an incoming event id is 
present in the table event_json but not in events.
diff --git a/synapse/storage/databases/main/events.py 
b/synapse/storage/databases/main/events.py
index 40b53274fb3..830af72d5e6 100644
--- a/synapse/storage/databases/main/events.py
+++ b/synapse/storage/databases/main/events.py
@@ -1334,19 +1334,19 @@ def get_internal_metadata(event):
 
             return im
 
-        self.db_pool.simple_insert_many_txn(
+        self.db_pool.simple_upsert_many_txn(
             txn,
             table="event_json",
-            values=[
-                {
-                    "event_id": event.event_id,
-                    "room_id": event.room_id,
-                    "internal_metadata": json_encoder.encode(
-                        get_internal_metadata(event)
-                    ),
-                    "json": json_encoder.encode(event_dict(event)),
-                    "format_version": event.format_version,
-                }
+            key_names=["event_id"],
+            key_values=[[event.event_id] for event, _ in events_and_contexts],
+            value_names=["room_id", "internal_metadata", "json", 
"format_version"],
+            value_values=[
+                [
+                    event.room_id,
+                    json_encoder.encode(get_internal_metadata(event)),
+                    json_encoder.encode(event_dict(event)),
+                    event.format_version,
+                ]
                 for event, _ in events_and_contexts
             ],
         )
++++++ _service ++++++
--- /var/tmp/diff_new_pack.xjLplV/_old  2021-09-23 23:04:09.476327688 +0200
+++ /var/tmp/diff_new_pack.xjLplV/_new  2021-09-23 23:04:09.480327692 +0200
@@ -4,11 +4,11 @@
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="url">https://github.com/matrix-org/synapse.git</param>
     <param name="scm">git</param>
-    <param name="revision">v1.42.0</param>
+    <param name="revision">v1.43.0</param>
     <param name="versionrewrite-pattern">v(.*)</param>
     <param name="versionrewrite-replacement">\1</param>
     <!--
-    <param name="revision">v1.43.0rc1</param>
+    <param name="revision">v1.44.0rc1</param>
     <param name="versionrewrite-pattern">v([\.\d]+)(rc.*)</param>
     <param name="versionrewrite-replacement">\1~\2</param>
     -->

++++++ matrix-synapse-1.42.0.obscpio -> matrix-synapse-1.43.0.obscpio ++++++
/work/SRC/openSUSE:Factory/matrix-synapse/matrix-synapse-1.42.0.obscpio 
/work/SRC/openSUSE:Factory/.matrix-synapse.new.1899/matrix-synapse-1.43.0.obscpio
 differ: char 49, line 1

++++++ matrix-synapse.obsinfo ++++++
--- /var/tmp/diff_new_pack.xjLplV/_old  2021-09-23 23:04:09.540327737 +0200
+++ /var/tmp/diff_new_pack.xjLplV/_new  2021-09-23 23:04:09.544327740 +0200
@@ -1,5 +1,5 @@
 name: matrix-synapse
-version: 1.42.0
-mtime: 1631029176
-commit: e7b78dcc4a6bf8fdb71782640932da8dff7cc5ed
+version: 1.43.0
+mtime: 1632223487
+commit: 9ffa787eb243c98a6ca1ecd9eac4a6b5dac2bef0
 

Reply via email to