Skip to content
Snippets Groups Projects
  1. Apr 25, 2022
  2. Apr 22, 2022
  3. Apr 21, 2022
  4. Apr 20, 2022
  5. Apr 19, 2022
  6. Apr 14, 2022
  7. Apr 13, 2022
  8. Apr 12, 2022
  9. Apr 11, 2022
    • Patrick Cloke's avatar
    • Patrick Cloke's avatar
      Do not consider events by ignored users for bundled aggregations (#12235) · 772bad25
      Patrick Cloke authored
      Consider the requester's ignored users when calculating the
      bundled aggregations.
      
      See #12285 / 4df10d32
      for corresponding changes for the `/relations` endpoint.
      Unverified
      772bad25
    • David Robertson's avatar
      Disallow untyped defs in synapse._scripts (#12422) · 961ee75a
      David Robertson authored
      Of note: 
      
      * No untyped defs in `register_new_matrix_user`
      
      This one might be contraversial. `request_registration` has three
      dependency-injection arguments used for testing. I'm removing the
      injection of the `requests` module and using `unitest.mock.patch` in the
      test cases instead.
      
      Doing `reveal_type(requests)` and `reveal_type(requests.get)` before the
      change:
      
      ```
      synapse/_scripts/register_new_matrix_user.py:45: note: Revealed type is "Any"
      synapse/_scripts/register_new_matrix_user.py:46: note: Revealed type is "Any"
      ```
      
      And after:
      
      ```
      synapse/_scripts/register_new_matrix_user.py:44: note: Revealed type is "types.ModuleType"
      synapse/_scripts/register_new_matrix_user.py:45: note: Revealed type is "def (url: Union[builtins.str, builtins.bytes], params: Union[Union[_typeshed.SupportsItems[Union[builtins.str, builtins.bytes, builtins.int, builtins.float], Union[builtins.str, builtins.bytes, builtins.int, builtins.float, typing.Iterable[Union[builtins.str, builtins.bytes, builtins.int, builtins.float]], None]], Tuple[Union[builtins.str, builtins.bytes, builtins.int, builtins.float], Union[builtins.str, builtins.bytes, builtins.int, builtins.float, typing.Iterable[Union[builtins.str, builtins.bytes, builtins.int, builtins.float]], None]], typing.Iterable[Tuple[Union[builtins.str, builtins.bytes, builtins.int, builtins.float], Union[builtins.str, builtins.bytes, builtins.int, builtins.float, typing.Iterable[Union[builtins.str, builtins.bytes, builtins.int, builtins.float]], None]]], builtins.str, builtins.bytes], None] =, data: Union[Any, None] =, headers: Union[Any, None] =, cookies: Union[Any, None] =, files: Union[Any, None] =, auth: Union[Any, None] =, timeout: Union[Any, None] =, allow_redirects: builtins.bool =, proxies: Union[Any, None] =, hooks: Union[Any, None] =, stream: Union[Any, None] =, verify: Union[Any, None] =, cert: Union[Any, None] =, json: Union[Any, None] =) -> requests.models.Response"
      ```
      
      * Drive-by comment in `synapse.storage.types`
      
      * No untyped defs in `synapse_port_db`
      
      This was by far the most painful. I'm happy to break this up into
      smaller pieces for review if it's not managable as-is.
      Unverified
      961ee75a
    • reivilibre's avatar
  10. Apr 08, 2022
  11. Apr 07, 2022
  12. Apr 06, 2022
  13. Apr 05, 2022
  14. Apr 04, 2022
    • Erik Johnston's avatar
      Track device list updates per room. (#12321) · 5c9e39e6
      Erik Johnston authored
      This is a first step in dealing with #7721.
      
      The idea is basically that rather than calculating the full set of users a device list update needs to be sent to up front, we instead simply record the rooms the user was in at the time of the change. This will allow a few things:
      
      1. we can defer calculating the set of remote servers that need to be poked about the change; and
      2. during `/sync` and `/keys/changes` we can avoid also avoid calculating users who share rooms with other users, and instead just look at the rooms that have changed.
      
      However, care needs to be taken to correctly handle server downgrades. As such this PR writes to both `device_lists_changes_in_room` and the `device_lists_outbound_pokes` table synchronously. In a future release we can then bump the database schema compat version to `69` and then we can assume that the new `device_lists_changes_in_room` exists and is handled.
      
      There is a temporary option to disable writing to `device_lists_outbound_pokes` synchronously, allowing us to test the new code path does work (and by implication upgrading to a future release and downgrading to this one will work correctly).
      
      Note: Ideally we'd do the calculation of room to servers on a worker (e.g. the background worker), but currently only master can write to the `device_list_outbound_pokes` table.
      Unverified
      5c9e39e6
  15. Apr 01, 2022
  16. Mar 31, 2022
Loading