From 7ee2780af87a013c83fb5a8a5d0c7ab0767b3db8 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 10 Mar 2022 15:09:58 +0000 Subject: [PATCH] Deprecate the etcd3 driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The etcd3 driver depends on the python-etcd3 [1] library that is currently stale and no has no active maintenance [2] with a non-working CI that blocks all PRs. It's also currently blocking Tooz from supporting newer versions of tenacity [3] that a lot of projects is now pinning because newer version of tenacity dropped old legacy compatibility code that has been in there for years. We currently have etcd3gw as an alternative driver where the library the driver depends on is a deliverable that we maintain. [1] https://github.com/kragniz/python-etcd3 [2] https://github.com/kragniz/python-etcd3/issues/1719 [3] https://review.opendev.org/c/openstack/tooz/+/829412 Change-Id: Iff0cd3b51cfc45ecbddc831c55267e80e9c79cac --- .zuul.yaml | 20 ------------------- ...precate-etcd3-driver-551608037d79222b.yaml | 5 +++++ tooz/drivers/etcd3.py | 6 ++++++ 3 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/deprecate-etcd3-driver-551608037d79222b.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 8482d4c2..e435aa84 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -10,8 +10,6 @@ jobs: - tooz-tox-py38-etcd - tooz-tox-py36-etcd - - tooz-tox-py38-etcd3 - - tooz-tox-py36-etcd3 - tooz-tox-py38-etcd3gw - tooz-tox-py36-etcd3gw - tooz-tox-py38-zookeeper @@ -32,8 +30,6 @@ jobs: - tooz-tox-py38-etcd - tooz-tox-py36-etcd - - tooz-tox-py38-etcd3 - - tooz-tox-py36-etcd3 - tooz-tox-py38-etcd3gw - tooz-tox-py36-etcd3gw - tooz-tox-py38-zookeeper @@ -67,14 +63,6 @@ vars: tox_envlist: py38-etcd -- job: - name: tooz-tox-py38-etcd3 - parent: openstack-tox-py38 - description: | - Run tests using ``py38-etcd3`` environment. - vars: - tox_envlist: py38-etcd3 - - job: name: tooz-tox-py38-etcd3gw parent: openstack-tox-py38 @@ -151,14 +139,6 @@ vars: tox_envlist: py36-etcd -- job: - name: tooz-tox-py36-etcd3 - parent: openstack-tox-py36 - description: | - Run tests using ``py36-etcd3`` environment. - vars: - tox_envlist: py36-etcd3 - - job: name: tooz-tox-py36-etcd3gw parent: openstack-tox-py36 diff --git a/releasenotes/notes/deprecate-etcd3-driver-551608037d79222b.yaml b/releasenotes/notes/deprecate-etcd3-driver-551608037d79222b.yaml new file mode 100644 index 00000000..a929b97d --- /dev/null +++ b/releasenotes/notes/deprecate-etcd3-driver-551608037d79222b.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The etcd3 driver is deprecated, it will be removed in a future + release. No testing is performed on this driver. diff --git a/tooz/drivers/etcd3.py b/tooz/drivers/etcd3.py index 1b708ee3..f61852a9 100644 --- a/tooz/drivers/etcd3.py +++ b/tooz/drivers/etcd3.py @@ -25,6 +25,8 @@ from tooz import coordination from tooz import locking from tooz import utils +import warnings + @contextlib.contextmanager def _failure_translator(): @@ -143,6 +145,10 @@ class Etcd3Driver(coordination.CoordinationDriverCachedRunWatchers, def __init__(self, member_id, parsed_url, options): super(Etcd3Driver, self).__init__(member_id, parsed_url, options) + warnings.warn( + "The etcd3 tooz driver is deprecated, it will be removed in" + "a future release." + ) host = parsed_url.hostname or self.DEFAULT_HOST port = parsed_url.port or self.DEFAULT_PORT options = utils.collapse(options)