From 93efa91bbdc5a50cad4f99c4e99286340ab94ce8 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Thu, 19 Aug 2021 15:44:37 +0200 Subject: [PATCH] Release 2.1.1 (#2039) * Update release notes * Bump version * Improve unit-test coverage --- docs/releases.rst | 36 ++++++++++++++++++++++++++++++++++++ patroni/version.py | 2 +- tests/test_consul.py | 5 +++-- tests/test_ha.py | 4 ++-- 4 files changed, 42 insertions(+), 5 deletions(-) diff --git a/docs/releases.rst b/docs/releases.rst index 65d265e3..dc68c524 100644 --- a/docs/releases.rst +++ b/docs/releases.rst @@ -3,6 +3,42 @@ Release notes ============= +Version 2.1.1 +------------- + +**New features** + +- Support for ETCD SRV name suffix (David Pavlicek) + + Etcd allows to differentiate between multiple Etcd clusters under the same domain and from now on Patroni also supports it. + +- Enrich history with the new leader (huiyalin525) + + It adds the new column to the ``patronictl history`` output. + +- Make the CA bundle configurable for in-cluster Kubernetes config (Aron Parsons) + + By default Patroni is using ``/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`` and this new feature allows specifying the custom ``kubernetes.cacert``. + +- Support dynamically registering/deregistering as a Consul service and changing tags (Tommy Li) + + Previously it required Patroni restart. + +**Bugfixes** + +- Avoid unnecessary reload of REST API (Alexander Kukushkin) + + The previous release added a feature of reloading REST API certificates if changed on disk. Unfortunately, the reload was happening unconditionally right after the start. + +- Don't resolve cluster members when ``etcd.use_proxies`` is set (Alexander) + + When starting up Patroni checks the healthiness of Etcd cluster by querying the list of members. In addition to that, it also tried to resolve their hostnames, which is not necessary when working with Etcd via proxy and was causing unnecessary warnings. + +- Skip rows with NULL values in the ``pg_stat_replication`` (Alexander) + + It seems that the ``pg_stat_replication`` view could contain NULL values in the ``replay_lsn``, ``flush_lsn``, or ``write_lsn`` fields even when ``state = 'streaming'``. + + Version 2.1.0 ------------- diff --git a/patroni/version.py b/patroni/version.py index a33997dd..55fa725b 100644 --- a/patroni/version.py +++ b/patroni/version.py @@ -1 +1 @@ -__version__ = '2.1.0' +__version__ = '2.1.1' diff --git a/tests/test_consul.py b/tests/test_consul.py index bd503c75..769ef6ab 100644 --- a/tests/test_consul.py +++ b/tests/test_consul.py @@ -130,8 +130,9 @@ class TestConsul(unittest.TestCase): @patch.object(consul.Consul.KV, 'put', Mock(side_effect=[True, ConsulException, InvalidSession])) def test_touch_member(self): self.c.refresh_session = Mock(return_value=False) - self.c.touch_member({'conn_url': 'postgres://replicator:rep-pass@127.0.0.1:5433/postgres', - 'api_url': 'http://127.0.0.1:8009/patroni'}) + with patch.object(Consul, 'update_service', Mock(side_effect=Exception)): + self.c.touch_member({'conn_url': 'postgres://replicator:rep-pass@127.0.0.1:5433/postgres', + 'api_url': 'http://127.0.0.1:8009/patroni'}) self.c._register_service = True self.c.refresh_session = Mock(return_value=True) for _ in range(0, 4): diff --git a/tests/test_ha.py b/tests/test_ha.py index 9f1f0402..6d0b2d64 100644 --- a/tests/test_ha.py +++ b/tests/test_ha.py @@ -35,8 +35,8 @@ def false(*args, **kwargs): def get_cluster(initialize, leader, members, failover, sync, cluster_config=None): t = datetime.datetime.now().isoformat() - history = TimelineHistory(1, '[[1,67197376,"no recovery target specified","' + t + '"]]', - [(1, 67197376, 'no recovery target specified', t)]) + history = TimelineHistory(1, '[[1,67197376,"no recovery target specified","' + t + '","foo"]]', + [(1, 67197376, 'no recovery target specified', t, 'foo')]) cluster_config = cluster_config or ClusterConfig(1, {'check_timeline': True}, 1) return Cluster(initialize, cluster_config, leader, 10, members, failover, sync, history, None)