Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add missing worker types to start_for_complement
Browse files Browse the repository at this point in the history
We were missing some possible worker types from the list that is used
in CI and complement.sh. This will likely cause CI to be slower, but
comes with the benefit of more complete test coverage.

'account_data' being missing from this list caused CI to not catch
#14869.
  • Loading branch information
anoadragon453 committed Jan 19, 2023
1 parent 9187fd9 commit 4842bda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docker/complement/conf/start_for_complement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ if [[ -n "$SYNAPSE_COMPLEMENT_USE_WORKERS" ]]; then
# -n True if the length of string is non-zero.
# -z True if the length of string is zero.
if [[ -z "$SYNAPSE_WORKER_TYPES" ]]; then
# This list corresponds to the keys of the WORKERS_CONFIG dict in
# synapse/docker/configure_workers_and_start.py
export SYNAPSE_WORKER_TYPES="\
event_persister, \
event_persister, \
Expand All @@ -64,7 +66,12 @@ if [[ -n "$SYNAPSE_COMPLEMENT_USE_WORKERS" ]]; then
synchrotron, \
client_reader, \
appservice, \
pusher"
pusher, \
account_data, \
presence, \
receipts, \
to_device, \
typing"

fi
log "Workers requested: $SYNAPSE_WORKER_TYPES"
Expand Down
5 changes: 5 additions & 0 deletions docker/configure_workers_and_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
# Stream Writers require "client" and "replication" listeners because they
# have to attach by instance_map to the master process and have client endpoints.
WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
# NOTE: Any new entries added to this list should also be added to the
# SYNAPSE_WORKER_TYPES environment variable in
# docker/complement/conf/start_for_complement.sh in order to include
# those workers in the worker-mode Complement runs in CI, and when
# using scripts-dev/complement.sh locally.
"pusher": {
"app": "synapse.app.generic_worker",
"listener_resources": [],
Expand Down

0 comments on commit 4842bda

Please sign in to comment.