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

Commit 34e84fe

Browse files
authored
Tweaks to workers-under-complement (#12637)
* Bump the HS startup timeout * Log prefixes for more processes * Bump the overall timeout
1 parent bf0c3ca commit 34e84fe

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

changelog.d/12637.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Minor improvements to the scripts for running Synapse in worker mode under Complement.

docker/conf-workers/supervisord.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ user=root
99
files = /etc/supervisor/conf.d/*.conf
1010

1111
[program:nginx]
12-
command=/usr/sbin/nginx -g "daemon off;"
12+
command=/usr/local/bin/prefix-log /usr/sbin/nginx -g "daemon off;"
1313
priority=500
1414
stdout_logfile=/dev/stdout
1515
stdout_logfile_maxbytes=0
@@ -19,7 +19,7 @@ username=www-data
1919
autorestart=true
2020

2121
[program:redis]
22-
command=/usr/bin/redis-server /etc/redis/redis.conf --daemonize no
22+
command=/usr/local/bin/prefix-log /usr/bin/redis-server /etc/redis/redis.conf --daemonize no
2323
priority=1
2424
stdout_logfile=/dev/stdout
2525
stdout_logfile_maxbytes=0
@@ -29,7 +29,7 @@ username=redis
2929
autorestart=true
3030

3131
[program:synapse_main]
32-
command=/usr/local/bin/python -m synapse.app.homeserver --config-path="{{ main_config_path }}" --config-path=/conf/workers/shared.yaml
32+
command=/usr/local/bin/prefix-log /usr/local/bin/python -m synapse.app.homeserver --config-path="{{ main_config_path }}" --config-path=/conf/workers/shared.yaml
3333
priority=10
3434
# Log startup failures to supervisord's stdout/err
3535
# Regular synapse logs will still go in the configured data directory

scripts-dev/complement.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ fi
4343
# Build the base Synapse image from the local checkout
4444
docker build -t matrixdotorg/synapse -f "docker/Dockerfile" .
4545

46+
extra_test_args=()
47+
4648
# If we're using workers, modify the docker files slightly.
4749
if [[ -n "$WORKERS" ]]; then
4850
# Build the workers docker image (from the base Synapse image).
@@ -52,7 +54,14 @@ if [[ -n "$WORKERS" ]]; then
5254
COMPLEMENT_DOCKERFILE=SynapseWorkers.Dockerfile
5355

5456
# And provide some more configuration to complement.
55-
export COMPLEMENT_SPAWN_HS_TIMEOUT_SECS=60
57+
58+
# It can take quite a while to spin up a worker-mode Synapse for the first
59+
# time (the main problem is that we start 14 python processes for each test,
60+
# and complement likes to do two of them in parallel).
61+
export COMPLEMENT_SPAWN_HS_TIMEOUT_SECS=120
62+
63+
# ... and it takes longer than 10m to run the whole suite.
64+
extra_test_args+=("-timeout=60m")
5665
else
5766
export COMPLEMENT_BASE_IMAGE=complement-synapse
5867
COMPLEMENT_DOCKERFILE=Dockerfile
@@ -64,4 +73,4 @@ docker build -t $COMPLEMENT_BASE_IMAGE -f "docker/complement/$COMPLEMENT_DOCKERF
6473
# Run the tests!
6574
echo "Images built; running complement"
6675
cd "$COMPLEMENT_DIR"
67-
go test -v -tags synapse_blacklist,msc2716,msc3030,faster_joins -count=1 "$@" ./tests/...
76+
go test -v -tags synapse_blacklist,msc2716,msc3030,faster_joins -count=1 "${extra_test_args[@]}" "$@" ./tests/...

0 commit comments

Comments
 (0)