tooz doesn't use upper-constraints so we get the newest version of all
dependencies. It seems one of these, etcd3, is incompatible with recent
versions of protobuf.
Failed to import test module: tooz.tests.drivers.test_etcd3
Traceback (most recent call last):
File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/home/zuul/src/opendev.org/openstack/tooz/tooz/tests/drivers/test_etcd3.py", line 22, in <module>
import tooz.drivers.etcd3 as etcd3_driver
File "/home/zuul/src/opendev.org/openstack/tooz/tooz/drivers/etcd3.py", line 18, in <module>
import etcd3
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/__init__.py", line 3, in <module>
import etcd3.etcdrpc as etcdrpc
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/etcdrpc/__init__.py", line 1, in <module>
from .rpc_pb2 import *
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/etcdrpc/rpc_pb2.py", line 16, in <module>
from etcd3.etcdrpc import kv_pb2 as kv__pb2
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/etcdrpc/kv_pb2.py", line 36, in <module>
type=None),
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
The etcd3 dependency is only used for the etcd3 driver which was
deprecated in change Iff0cd3b51cfc45ecbddc831c55267e80e9c79cac. The
protobuf dependency is only used for etcd3. We can't outright remove the
etcd3 driver yet as it hasn't been long enough since we deprecated it.
That will happen soon enough though and until then we can simply cap
protobuf to an older version that is compatible with the most recent
etcd3 release.
While we're here, we also sync the lower boundaries in the docs
requirments and add some comments indicating where they come from/what
they're for.
Change-Id: I8d6647118be22b0ce55e01b7e5451612ebe30e73
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
(cherry picked from commit e3de0e634a)
(cherry picked from commit 73dbe0e6fc)
this is followup to Iaab5ce609c0dcf7085f5dd43efbd37eb4b88f17b
actually retry for specified number of retries instead of raising
error on first ConnectionError
Change-Id: Ibca3f568b65dfea252da4b67f6d5105ba7f1ecb1
(cherry picked from commit 47c4d56e44)
(cherry picked from commit 11526e594c)
Sometimes, connections get closed by the server. This change
adds retrying to the code.
Conflict:
requirements.txt
NOTE(hberaud): This conflict is due to the cap of tenacity during wallaby
to unblock the gate. This requirement cap won't be an issue for victoria
and for previous stable branches.
fe9c430455
Change-Id: Iaab5ce609c0dcf7085f5dd43efbd37eb4b88f17b
(cherry picked from commit a025b4d4ee)
(cherry picked from commit 62d5d17a5d)
etcd3gw 0.2.6 was blacklisted in openstack/requirements [0], because
that version has a bug [1].
tooz does not use openstack/requirements' upper constraints, so the
same blacklisting needs to be introduced here in setup.cfg.
[0] Icb6873d8c5d3a3624c0ac3d76fc9125c5d8134b2
[1] https://github.com/dims/etcd3-gateway/issues/41
Change-Id: I22b955419014dd34c63e406c488e0636ffe9013b
Closes-Bug: #1891314
(cherry picked from commit 3f0759091c)
Current behaviour leds to AttributeError because py3 don't have decode
attribut for the string objects. So it's better to use safe_decode from
oslo_utils.encodeutils for that purpose
Change-Id: I22ce4212381511e2b2631a97057d6da938024b99
In this version a Connection is no longer a context manager. Fix
it by simply getting a Cursor out of it (locks don't seem to
interact with transactions, at least according to MariaDB docs).
Change-Id: I5ea06ebd2b976465ff82f10a74e140f30e9e803f
Also fixes tox env for py38-consul tests
Update zuul script to use consul 1.7.4 (2020) vs 0.6.3 (2016)
Adds ACL tokens to all session management calls.
Change-Id: Iaddf21f14c434129541e7c9ec7134e0661f7be52
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I6254b8b17eea752a5b1d6031c89de47ecc865a49
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I4ef04d18b3a6da5cbf3193330957db7846a7bc8d
When running Consul with ACLs enabled, the best practice is to
default deny all. In order to support applying a policy to the
tooz coordination KV store path, passing through an ACL is needed.
Closes-Bug: #1752205
Change-Id: I98fc96468b21368ce66365e3fc38c495b1f2918a
This repo has been using train tests and thus was missed by the bot to
update from ussuri to victoria, update manually. also, update other jobs
to use now py38.
See also the PTI in governance [1].
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: Ie1ef901d7b52800912365cfeae96b0e66108e1fc
A test was failing due to L67 in tooz/drivers/mysql.py using `is`
instead of `==`.
Change-Id: I2baa101499f170ece99ccff368103b58f31ca79a
Closes-Bug: 1875749
Add file to the reno documentation build to show release notes for
stable/ussuri.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.
Change-Id: I5e9b7258593e10ff1323ab408acaf2f075fdc111
Sem-Ver: feature
The etcd3 and etcd3gw drivers parse CA, key and cert options from
the coordination URL, and pass them on to the backend clients. The
etcd3gw driver implements the "etcd3+https" scheme.
Change-Id: I78d8ca0583f883f7f746791f82fbcc116458ce2c
Since tooz project has chosen to *NOT* consume upper-constraints.txt
there is no need for the requirements check job, so let's drop it.
Change-Id: I372cf0c9c9b1ff3d4b83cd84997f780e5de9709a
The RedisDriver coordinator _stop() method removes the lock from the
_acquired_locks set before calling the release() method on the lock,
so the release() method should not check to see if the lock is in the
set, since it never will be.
This was preventing the coordinator's _stop() method from releasing
the locks, so they had to timeout before another group member could
take over as leader.
Change-Id: Ie23d88f1a05983d7465f18a329cabc23d789a628
Closes-Bug: 1815330
os-testr is only needed to provide the "subunit-trace" command which
is used in the tools/pretty_tox.sh script. And pretty_tox.sh is not
needed. "stestr" can be used directly in tox.ini. So drop
tools/pretty_tox.sh .
Change-Id: I6a18183f092689c8c9d283c19914da9baa59cc32
Add file to the reno documentation build to show release notes for
stable/train.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.
Change-Id: I42bd5786c06043c21010ef7260184b5d9d4de00f
Sem-Ver: feature
The backend driver of etcd3gw doesn't update membership lease
on heartbeat, this patch aligns the implementation with etcd3
driver.
Change-Id: I2a6a11d59c4c82124f4d42391176031656e26528
Closes-Bug: #1839691
It appears that tooz used log.warning which is a method
instead of an integer required by tenacity.
Change-Id: I0dd40f578ff0fc7bd1cd64c7889de2148ae6b06c
Closes-Bug: #1837693