diff --git a/.github/workflows/beeper-ci.yml b/.github/workflows/beeper-ci.yml index 546219183361..abc88f914777 100644 --- a/.github/workflows/beeper-ci.yml +++ b/.github/workflows/beeper-ci.yml @@ -82,9 +82,11 @@ jobs: sudo apt-get install -qqy libolm3 libolm-dev go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest - name: Run Complement - run: ./scripts-dev/complement.sh + run: ./scripts-dev/complement.sh -timeout 2h env: COMPLEMENT_DIR: complement + WORKERS: 1 + POSTGRES: 1 # Builds diff --git a/docker/complement/conf/start_for_complement.sh b/docker/complement/conf/start_for_complement.sh index 5560ab8b95a8..8c8f12ac92e6 100755 --- a/docker/complement/conf/start_for_complement.sh +++ b/docker/complement/conf/start_for_complement.sh @@ -69,7 +69,8 @@ if [[ -n "$SYNAPSE_COMPLEMENT_USE_WORKERS" ]]; then fi log "Workers requested: $SYNAPSE_WORKER_TYPES" # Improve startup times by using a launcher based on fork() - export SYNAPSE_USE_EXPERIMENTAL_FORKING_LAUNCHER=1 + # NOTE: does not work with Beeper changes (external_sharded_cache) + # export SYNAPSE_USE_EXPERIMENTAL_FORKING_LAUNCHER=1 else # Empty string here means 'main process only' export SYNAPSE_WORKER_TYPES="" diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index 25914340515f..8c8c221a66c5 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -431,7 +431,7 @@ async def dispatch_push_event( rejected push keys otherwise. If this array is empty, the push fully succeeded. """ - priority = "low" + priority = "high" # Beeper: always use high priority notifications if ( event.type == EventTypes.Encrypted or tweaks.get("highlight") diff --git a/synapse/replication/tcp/external_sharded_cache.py b/synapse/replication/tcp/external_sharded_cache.py index 87f01e3d0fe2..15eba348378e 100644 --- a/synapse/replication/tcp/external_sharded_cache.py +++ b/synapse/replication/tcp/external_sharded_cache.py @@ -26,7 +26,6 @@ from synapse.logging import opentracing from synapse.logging.context import make_deferred_yieldable, run_in_background -from synapse.replication.tcp.redis import lazyConnection from synapse.util import unwrapFirstError if TYPE_CHECKING: @@ -82,6 +81,9 @@ def __init__(self, hs: "HomeServer"): self._reactor = hs.get_reactor() if hs.config.redis.redis_enabled and hs.config.redis.cache_shard_hosts: + # Only import this if we're going to use it, as it can raise an AttributeError when using the forking launcher + from synapse.replication.tcp.redis import lazyConnection + for shard in hs.config.redis.cache_shard_hosts: logger.info( "Connecting to redis (host=%r port=%r) for external cache",