From 3c7f89624679e2d59a524a9070ba82915cc2f3d5 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 20 Jan 2024 11:10:34 +0200 Subject: [PATCH] Prevent generic workers being combined with any of the other types Until now, the validation check would only get tripped up if generic workers are used, combined with at least one EACH other type of specialized workers. This means that someone doing this: ``` matrix_synapse_workers_preset: one-of-each matrix_synapse_workers_client_reader_workers_count: 5 ``` .. would not have triggered this safety check. Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3100 --- roles/custom/matrix-synapse/tasks/validate_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-synapse/tasks/validate_config.yml b/roles/custom/matrix-synapse/tasks/validate_config.yml index fdf208e8d..2f1a5e1c0 100644 --- a/roles/custom/matrix-synapse/tasks/validate_config.yml +++ b/roles/custom/matrix-synapse/tasks/validate_config.yml @@ -51,7 +51,7 @@ ansible.builtin.fail: msg: >- Generic workers should not be mixed with the new specialized worker types (room workers, sync workers, client readers, and federation readers) - when: matrix_synapse_workers_generic_workers_count | int > 0 and matrix_synapse_workers_room_workers_count | int > 0 and matrix_synapse_workers_sync_workers_count | int > 0 and matrix_synapse_workers_client_reader_workers_count | int > 0 and matrix_synapse_workers_federation_reader_workers_count | int > 0 + when: matrix_synapse_workers_generic_workers_count | int > 0 and ((matrix_synapse_workers_room_workers_count | int + matrix_synapse_workers_sync_workers_count | int + matrix_synapse_workers_client_reader_workers_count | int + matrix_synapse_workers_federation_reader_workers_count | int) > 0) - name: (Deprecation) Catch and report renamed settings ansible.builtin.fail: