Deprecate the etcd3 driver

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
This commit is contained in:
Tobias Urdin 2022-03-10 15:09:58 +00:00 committed by Tobias Urdin
parent e88e601f92
commit 7ee2780af8
3 changed files with 11 additions and 20 deletions

View File

@ -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

View File

@ -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.

View File

@ -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)