-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow room creator to send MSC2716 related events in existing room versions #10566
Allow room creator to send MSC2716 related events in existing room versions #10566
Commits on Aug 10, 2021
-
Allow room creator to send MSC2716 related events in existing room ve…
…rsions Discussed at matrix-org/matrix-spec-proposals#2716 Restoring `get_create_event_for_room_txn` from, 44bb3f0
Configuration menu - View commit details
-
Copy full SHA for 6481502 - Browse repository at this point
Copy the full SHA 6481502View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13d0929 - Browse repository at this point
Copy the full SHA 13d0929View commit details -
Configuration menu - View commit details
-
Copy full SHA for 259303a - Browse repository at this point
Copy the full SHA 259303aView commit details
Commits on Aug 20, 2021
-
Populate rooms.creator column for easy lookup
> From some [out of band discussion](https://matrix.to/#/!UytJQHLQYfvYWsGrGY:jki.re/$p2fKESoFst038x6pOOmsY0C49S2gLKMr0jhNMz_JJz0?via=jki.re&via=matrix.org), my plan is to use `rooms.creator`. But currently, we don't fill in `creator` for remote rooms when a user is invited to a room for example. So we need to add some code to fill in `creator` wherever we add to the `rooms` table. And also add a background update to fill in the rows missing `creator` (we can use the same logic that `get_create_event_for_room_txn` is doing by looking in the state events to get the `creator`). > > #10566 (comment)
Configuration menu - View commit details
-
Copy full SHA for 16a41dd - Browse repository at this point
Copy the full SHA 16a41ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for fffce99 - Browse repository at this point
Copy the full SHA fffce99View commit details -
Configuration menu - View commit details
-
Copy full SHA for aafa069 - Browse repository at this point
Copy the full SHA aafa069View commit details
Commits on Aug 21, 2021
-
Configuration menu - View commit details
-
Copy full SHA for fedd250 - Browse repository at this point
Copy the full SHA fedd250View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a2db20 - Browse repository at this point
Copy the full SHA 8a2db20View commit details
Commits on Aug 25, 2021
-
Populate rooms.creator field for easy lookup
Part of #10566 - Fill in creator whenever we insert into the rooms table - Add background update to backfill any missing creator values
Configuration menu - View commit details
-
Copy full SHA for 2b177b7 - Browse repository at this point
Copy the full SHA 2b177b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee406df - Browse repository at this point
Copy the full SHA ee406dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f8e22b - Browse repository at this point
Copy the full SHA 9f8e22bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 759e78c - Browse repository at this point
Copy the full SHA 759e78cView commit details -
Merge branch 'madlittlemods/populate-rooms-creator-field' into madlit…
…tlemods/room-creator-allowed-to-msc2716-events
Configuration menu - View commit details
-
Copy full SHA for 71c20f7 - Browse repository at this point
Copy the full SHA 71c20f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b828ab - Browse repository at this point
Copy the full SHA 9b828abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c9b5a6 - Browse repository at this point
Copy the full SHA 3c9b5a6View commit details
Commits on Aug 31, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9a600ff - Browse repository at this point
Copy the full SHA 9a600ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 79b4991 - Browse repository at this point
Copy the full SHA 79b4991View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25db289 - Browse repository at this point
Copy the full SHA 25db289View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41e72c2 - Browse repository at this point
Copy the full SHA 41e72c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a3c015 - Browse repository at this point
Copy the full SHA 9a3c015View commit details -
Fix ambiguity iterating over cursor instead of list
Fix `psycopg2.ProgrammingError: no results to fetch` error when tests run with Postgres. ``` SYNAPSE_POSTGRES=1 SYNAPSE_TEST_LOG_LEVEL=INFO python -m twisted.trial tests.storage.databases.main.test_room ``` --- We use `txn.fetchall` because it will return the results as a list or an empty list when there are no results. Docs: > `cursor` objects are iterable, so, instead of calling explicitly fetchone() in a loop, the object itself can be used: > > https://www.psycopg.org/docs/cursor.html#cursor-iterable And I'm guessing iterating over a raw cursor does something weird when there are no results. --- Test CI failure: https://github.com/matrix-org/synapse/pull/10697/checks?check_run_id=3468916530 ``` tests.test_visibility.FilterEventsForServerTestCase.test_large_room =============================================================================== [FAIL] Traceback (most recent call last): File "/home/runner/work/synapse/synapse/tests/storage/databases/main/test_room.py", line 85, in test_background_populate_rooms_creator_column self.get_success( File "/home/runner/work/synapse/synapse/tests/unittest.py", line 500, in get_success return self.successResultOf(d) File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/trial/_synctest.py", line 700, in successResultOf self.fail( twisted.trial.unittest.FailTest: Success result expected on <Deferred at 0x7f4022f3eb50 current result: None>, found failure result instead: Traceback (most recent call last): File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/internet/defer.py", line 701, in errback self._startRunCallbacks(fail) File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/internet/defer.py", line 764, in _startRunCallbacks self._runCallbacks() File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/internet/defer.py", line 858, in _runCallbacks current.result = callback( # type: ignore[misc] File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/internet/defer.py", line 1751, in gotResult current_context.run(_inlineCallbacks, r, gen, status) --- <exception caught here> --- File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/internet/defer.py", line 1657, in _inlineCallbacks result = current_context.run( File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/python/failure.py", line 500, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/home/runner/work/synapse/synapse/synapse/storage/background_updates.py", line 224, in do_next_background_update await self._do_background_update(desired_duration_ms) File "/home/runner/work/synapse/synapse/synapse/storage/background_updates.py", line 261, in _do_background_update items_updated = await update_handler(progress, batch_size) File "/home/runner/work/synapse/synapse/synapse/storage/databases/main/room.py", line 1399, in _background_populate_rooms_creator_column end = await self.db_pool.runInteraction( File "/home/runner/work/synapse/synapse/synapse/storage/database.py", line 686, in runInteraction result = await self.runWithConnection( File "/home/runner/work/synapse/synapse/synapse/storage/database.py", line 791, in runWithConnection return await make_deferred_yieldable( File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/internet/defer.py", line 858, in _runCallbacks current.result = callback( # type: ignore[misc] File "/home/runner/work/synapse/synapse/tests/server.py", line 425, in <lambda> d.addCallback(lambda x: function(*args, **kwargs)) File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/enterprise/adbapi.py", line 293, in _runWithConnection compat.reraise(excValue, excTraceback) File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/python/deprecate.py", line 298, in deprecatedFunction return function(*args, **kwargs) File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/python/compat.py", line 404, in reraise raise exception.with_traceback(traceback) File "/home/runner/work/synapse/synapse/.tox/py/lib/python3.9/site-packages/twisted/enterprise/adbapi.py", line 284, in _runWithConnection result = func(conn, *args, **kw) File "/home/runner/work/synapse/synapse/synapse/storage/database.py", line 786, in inner_func return func(db_conn, *args, **kwargs) File "/home/runner/work/synapse/synapse/synapse/storage/database.py", line 554, in new_transaction r = func(cursor, *args, **kwargs) File "/home/runner/work/synapse/synapse/synapse/storage/databases/main/room.py", line 1375, in _background_populate_rooms_creator_column_txn for room_id, event_json in txn: psycopg2.ProgrammingError: no results to fetch ```
Configuration menu - View commit details
-
Copy full SHA for 9a887a4 - Browse repository at this point
Copy the full SHA 9a887a4View commit details -
Move code not under the MSC2716 room version underneath an experiment…
…al config option See #10566 (comment)
Configuration menu - View commit details
-
Copy full SHA for 6f9cb41 - Browse repository at this point
Copy the full SHA 6f9cb41View commit details
Commits on Sep 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ad29e96 - Browse repository at this point
Copy the full SHA ad29e96View commit details -
Configuration menu - View commit details
-
Copy full SHA for 462ab25 - Browse repository at this point
Copy the full SHA 462ab25View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3581d3 - Browse repository at this point
Copy the full SHA a3581d3View commit details -
Merge branch 'madlittlemods/populate-rooms-creator-field' into madlit…
…tlemods/room-creator-allowed-to-msc2716-events
Configuration menu - View commit details
-
Copy full SHA for 20196c8 - Browse repository at this point
Copy the full SHA 20196c8View commit details -
Merge branch 'develop' into madlittlemods/room-creator-allowed-to-msc…
…2716-events Conflicts: synapse/handlers/federation.py
Configuration menu - View commit details
-
Copy full SHA for 725cf22 - Browse repository at this point
Copy the full SHA 725cf22View commit details -
Configuration menu - View commit details
-
Copy full SHA for e047e42 - Browse repository at this point
Copy the full SHA e047e42View commit details