| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Activate `pytest`'s `logcli` setting to better read the client lifecycle during testing.
Add `log()` function to KazooTestHarness class so that it is possible to log like crazy when something is not working
Display the ZK client port in logs when starting a ZK server (useful for test "debug")
Be able to get more than the last 100 lines of ZK logs (can be useful, believe me)
|
|
|
|
|
| |
Now performing a ZK cluster nuking at the end of each test case since keeping the same ZK state from test cases to test cases actually led to some tests randomly failing.
Added `client_cluster_health` ZK client in the `setup_zookeeper()` step that is there to "guarantee" the cluster is up and running, without even considering the configuration that will be used by the test itself.
|
|
|
|
|
| |
Fixed the `test_read_only` test based on what is done in the official Java client, we were missing some things and that led the test to fail from time to time (see comments in the code for full story).
Also renamed `test__connection.py` to `test_connection.py`, where it belongs.
|
|
|
| |
There is no need to perform the non-working `codecov` step via `tox` since we now have a Github Actions step that performs it.
|
|
|
| |
This fixes the `coverage` configuration that is wrongly giving a test coverage for the `tests` and `testing` folders and ends up "blocking" PR because of `codecov`.
|
|\
| |
| | |
chore(core): Fix documentation build
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case of AUTH_FAILED in the zk-loop thread it will call
client._session_callback which will reset the queue.
However another thread can add to this queue CloseInstance event, and
if the _session_callback() will be called after CloseInstance was added
to the queue, then stop() will never return (and zk-loop will endlessly
spin).
Here is how it looks like with addititional logging:
39: [ Thread-3 (zk_loop) ] INFO: client.py:568: _session_callback: Zookeeper session closed, state: AUTH_FAILED
39: [ MainThread ] Level 5: client.py:721: stop: Sending CloseInstance
39: [ Thread-3 (zk_loop) ] Level 5: client.py:403: _reset: Reseting the client
39: [ Thread-3 (zk_loop) ] Level 5: connection.py:625: _connect_attempt: Connecting
39: [ Thread-3 (zk_loop) ] Level 5: connection.py:625: _connect_attempt: Connecting
You can find details in this gist [1].
[1]: https://gist.github.com/azat/bc7aaea1c32a4f1ea75ad646d26280e9
|
|
|
|
|
| |
It's now part of the Python stdlib since `3.3`.
So no need to specify it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit python would produce these warnings when using
kazoo with ssl:
/path/to/venv/lib/python3.11/site-packages/kazoo/handlers/utils.py:225: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
The reason for this is that ssl.PROTOCOL_SSLv23 is an alias for
ssl.PROTOCOL_TLS and ssl.PROTOCOL_TLS is deprecated since Python 3.10.
ssl.PROTOCOL_TLS was replaced with ssl.PROTOCOL_TLS_CLIENT and
ssl.PROTOCOL_TLS_SERVER. In kazoo's case we switch to
ssl.PROTOCOL_TLS_CLIENT as kazoo is acting as an ssl client to zookeeper
servers.
There are a few things to note. PROTOCOL_TLS_CLIENT enables
context.check_hostname. We explicitly set this to False as this is
required to set ssl.CHECK_NONE which kazoo supports, and not everyone
may be using SSL certs with proper hostnames configured. For example if
making connections to an IP address rather than a name and the certs
don't have IP addrs in their altnames. This ensures backward
compatibility with these use cases. Changing this should be done in a
separate change and should likely be made configurable like
verify_certs.
Finally, while we are at it we replace ssl.CERT_OPTIONAL with
ssl.CERT_REQUIRED as they are equivalent in a client context. This
allows us to delete some code.
Python documents all of these behaviors as being present since Python
3.6. Kazoo requires Python 3.7 or newer which should make this safe.
|
|
|
|
| |
Github reports 105 on the project homepage, details:
https://github.com/python-zk/kazoo/graphs/contributors
|
|
|
|
|
|
|
| |
We've seemed pretty happy with GitHub actions, and now that
Travis is owned by PE their product seems to have gone downhill
so even if we were looking for an alternative, I don't think Travis would
be it. Regardless, this backup will still remain in git history, so no point
in duplicating version control via `.bak` files.
|
|
|
| |
The method used here follows the same pattern that SQLAlchemy has been using to add types. For an example, see https://github.com/sqlalchemy/sqlalchemy/pull/9039/files and note the removal of the `# mypy: ignore-errors` comment to incrementally add types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2...v3)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
|
|
|
| |
I noticed some of our GitHub action workflows are throwing deprecation warnings...
Let's have Dependbot open PR's to bump them whenever they're outdated.
We could also enable it for watching our Python deps, but that may be more controversial, so that can be done as a follow-on PR if there's interest.
|
|
|
|
| |
tox-wheel is a deprecated package. tox 4.x includes wheel support.
|
|\
| |
| | |
refactor: Remove vestiges of python2 support
|
| |
| |
| |
| |
| | |
The locks have been moved from `gevent.coros` to `gevent.lock`
since version 1.2 ([see changelog](https://www.gevent.org/changelog_1_2.html#a1-oct-27-2016))
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
| |
os.path.join will do Windows path joining on Windows resulting in bad zookeeper paths
|
|
|
| |
Closes #605
|
|
|
| |
This is to reflect the updated CI pipeline used for the repo
|
|\
| |
| | |
chore(core): Introduce black code formatter
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
* chore: 2.9.0 release and changelog
* chore(ci): override egg_info value when releasing
|
|
|
|
|
|
|
|
| |
Remove the redundant `wheel` dependency, as it is added by the backend
automatically. Listing it explicitly in the documentation was
a historical mistake and has been fixed since, see:
https://github.com/pypa/setuptools/commit/f7d30a9529378cf69054b5176249e5457aaf640a
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Testing libs have been upgraded.
The used java classpath now considers more .jar possible locations.
test_connection.py tests is now done first, trying to make it less flaky.
conftest.py has been added to give a way to display ZK cluster logs.
Because of ZK 3.6 and 3.7 changes, configurations related to local session has been added.
Disable GA fail-fast because of the flakiness
|
|
|
| |
closes #644 #662 #663
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lock must only consider contenders with a sequence number lower than
it's own sequence number as also stated in the Zookeeper recipe
description for shared locks[0].
This wasn't working correctly as the ReadLock also considered WriteLocks
with a higher sequence number as contenders. This can lead to a deadlock
as described in #649.
[0]: https://zookeeper.apache.org/doc/r3.7.0/recipes.html#Shared+Locks
Closes #649
|
|
|
|
|
|
|
| |
threading,gevent,eventlet (#656)
Co-authored-by: lawrentwang <lawrentwang@tencent.com>
Solve the select limitation on a maximum file handler value and dynamic choose the best poller in the system.
|
|\
| |
| | |
fix(recipe): fix deprecation warning from threading.Event
|
|/
|
|
|
|
|
| |
reasoning:
- `is_set` is supported since Python2.6 (https://docs.python.org/2.7/library/threading.html)
- Starting from Python3.5 docs the `isSet` spelling is not even mentioned anymore (https://docs.python.org/3.5/library/threading.html)
- Python3.10 will give a deprecation warning when the `isSet` spelling is used (https://docs.python.org/3.10/library/threading.html)
|
| |
|
|\
| |
| | |
chore(ci): Replace Travis with Github Actions
|
|/ |
|
|\
| |
| | |
docs: fix simple typo, untill -> until
|
| |\
| |/
|/| |
|
| |
| |
| | |
DNS resolution errors were previously not retriable, this commit allows it by changing the value returned when the DNS resolution fails.
|
|/
|
|
|
|
| |
There is a small typo in kazoo/recipe/queue.py.
Should read `until` rather than `untill`.
|