From 23067d7ea71243c927829de82cb124c44ba33145 Mon Sep 17 00:00:00 2001 From: Israel Date: Thu, 4 Jan 2024 08:30:28 -0300 Subject: [PATCH] Close the doors for a possible future bug in the config generator (#3000) The `AbstractConfigGenerator._format_config` method was missing a comma in the declaration of a tuple. As a consequence it was concatenating the strings `ctl` and `citus` instead of creating two separate items in the tuple. There is currently no observed bug from that issue in the code because the template configuration created by the method `AbstractConfigGenerator.get_template_config` doesn't include either of `ctl` or `citus` keys. However, it is still important that we close the doors for possible future bugs that would come up if we ever attempt to use either of those keys in the template, for example. References: PAT-231. --- patroni/config_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/config_generator.py b/patroni/config_generator.py index c2b133c6..3593bea3 100644 --- a/patroni/config_generator.py +++ b/patroni/config_generator.py @@ -178,7 +178,7 @@ class AbstractConfigGenerator(abc.ABC): :yields: formatted lines or blocks that represent a text output of the YAML document. """ - for name in ('scope', 'namespace', 'name', 'log', 'restapi', 'ctl' 'citus', + for name in ('scope', 'namespace', 'name', 'log', 'restapi', 'ctl', 'citus', 'consul', 'etcd', 'etcd3', 'exhibitor', 'kubernetes', 'raft', 'zookeeper'): yield from self._format_config_section(name)