Skip to content
Snippets Groups Projects
  1. Apr 14, 2021
    • Jonathan de Jong's avatar
      Remove redundant "coding: utf-8" lines (#9786) · 4b965c86
      Jonathan de Jong authored
      
      Part of #9744
      
      Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
      
      `Signed-off-by: default avatarJonathan de Jong <jonathan@automatia.nl&gt;`>
      4b965c86
    • Andrew Morgan's avatar
      Add a dockerfile for running a set of Synapse worker processes (#9162) · 7e460ec2
      Andrew Morgan authored
      This PR adds a Dockerfile and some supporting files to the `docker/` directory. The Dockerfile's intention is to spin up a container with:
      
      * A Synapse main process.
      * Any desired worker processes, defined by a `SYNAPSE_WORKERS` environment variable supplied at runtime.
      * A redis for worker communication.
      * A nginx for routing traffic.
      * A supervisord to start all worker processes and monitor them if any go down.
      
      Note that **this is not currently intended to be used in production**. If you'd like to use Synapse workers with Docker, instead make use of the official image, with one worker per container. The purpose of this dockerfile is currently to allow testing Synapse in worker mode with the [Complement](https://github.com/matrix-org/complement/) test suite.
      
      `configure_workers_and_start.py` is where most of the magic happens in this PR. It reads from environment variables (documented in the file) and creates all necessary config files for the processes. It is the entrypoint of the Dockerfile, and thus is run any time the docker container is spun up, recreating all config files in case you want to use a different set of workers. One can specify which workers they'd like to use by setting the `SYNAPSE_WORKERS` environment variable (as a comma-separated list of arbitrary worker names) or by setting it to `*` for all worker processes. We will be using the latter in CI.
      
      Huge thanks to @MatMaul for helping get this all working :tada: This PR is paired with its equivalent on the Complement side: https://github.com/matrix-org/complement/pull/62.
      
      Note, for the purpose of testing this PR before it's merged: You'll need to (re)build the base Synapse docker image for everything to work (`matrixdotorg/synapse:latest`). Then build the worker-based docker image on top (`matrixdotorg/synapse:workers`). 
      7e460ec2
    • Andrew Morgan's avatar
      Add note to docker docs explaining platform support (#9801) · f16c6cf5
      Andrew Morgan authored
      Context is in https://github.com/matrix-org/synapse/issues/9764#issuecomment-818615894.
      
      I struggled to find a more official link for this. The problem occurs when using WSL1 instead of WSL2, which some Windows platforms (at least Server 2019) still don't have. Docker have updated their documentation to paint a much happier picture now given WSL2's support.
      
      The last sentence here can probably be removed once WSL1 is no longer around... though that will likely not be for a very long time.
      f16c6cf5
  2. Apr 13, 2021
  3. Apr 12, 2021
  4. Apr 09, 2021
  5. Apr 08, 2021
  6. Apr 06, 2021
    • Andrew Morgan's avatar
      Don't report anything from GaugeBucketCollector metrics until data is present (#8926) · 0d87c6bd
      Andrew Morgan authored
      This PR modifies `GaugeBucketCollector` to only report data once it has been updated, rather than initially reporting a value of 0. Fixes zero values being reported for some metrics on startup until a background job to update the metric's value runs later.
      0d87c6bd
    • Andrew Morgan's avatar
      Add a Synapse Module for configuring presence update routing (#9491) · 04819239
      Andrew Morgan authored
      At the moment, if you'd like to share presence between local or remote users, those users must be sharing a room together. This isn't always the most convenient or useful situation though.
      
      This PR adds a module to Synapse that will allow deployments to set up extra logic on where presence updates should be routed. The module must implement two methods, `get_users_for_states` and `get_interested_users`. These methods are given presence updates or user IDs and must return information that Synapse will use to grant passing presence updates around.
      
      A method is additionally added to `ModuleApi` which allows triggering a set of users to receive the current, online presence information for all users they are considered interested in. This is the equivalent of that user receiving presence information during an initial sync. 
      
      The goal of this module is to be fairly generic and useful for a variety of applications, with hard requirements being:
      
      * Sending state for a specific set or all known users to a defined set of local and remote users.
      * The ability to trigger an initial sync for specific users, so they receive all current state.
      04819239
    • Patrick Cloke's avatar
      Add type hints to expiring cache. (#9730) · 44bb8810
      Patrick Cloke authored
      44bb8810
    • Andrew Morgan's avatar
    • Richard van der Hoff's avatar
      Remove outdated constraint on remote_media_cache_thumbnails (#9725) · 0ef321ff
      Richard van der Hoff authored
      The `remote_media_cache_thumbnails_media_origin_media_id_thumbna_key`
      constraint is superceded by
      `remote_media_repository_thumbn_media_origin_id_width_height_met` (which adds
      `thumbnail_method` to the unique key).
      
      PR #7124 made an attempt to remove the old constraint, but got the name wrong,
      so it didn't work. Here we update the bg update and rerun it.
      
      Fixes #8649.
      0ef321ff
    • Erik Johnston's avatar
      Merge branch 'master' into develop · 5688a74c
      Erik Johnston authored
      5688a74c
    • Erik Johnston's avatar
      1.31.0 · 1d8863c6
      Erik Johnston authored
Loading