Add support for gevent - #6372
Conversation
* Bump pip and setuptools and switch from setup.py to pip install * Add gevent to requirements, bumps for compatibility and regenerate requirement files. * Display which components fail unit tests. * Add checks for eventlet code in monkey patch
|
looks like you have some failing unit tests |
- Took upstream's CI image bumps (py3.10, mongo 8.2, rabbitmq 4.2) in .circleci/config.yml - Merged Makefile: kept setuptools_scm/python -m build (needed for gevent's setuptools pin), took upstream's $(PYBIN) consistency - fixed-requirements.txt: kept gevent/eventlet/greenlet/gunicorn pins, dropped unused flex, picked up importlib_resources/importlib_metadata - Regenerated all per-component requirements.txt via make requirements - Regenerated lockfiles/st2.lock via pants generate-lockfiles --resolve=st2 - st2client httpclient.py: resolved shlex.quote alias naming - test_service_setup_log_level_filtering.py: kept concurrency.sleep() abstraction, took upstream's SIGTERM/8s timeout flakiness fix
| gevent = None | ||
|
|
||
| CONCURRENCY_LIBRARY = "eventlet" | ||
| CONCURRENCY_LIBRARY = os.environ.get("ST2_CONCURRENCY_LIBRARY", "eventlet") |
There was a problem hiding this comment.
@nzlosh @guzzijones right now I have the utility as an envvar in order to swap between eventlet/gevent, with defaulting to eventlent.
Now that all the tests are passing (existing functionality using eventlet), I will change that to gevent to be the default (whole purpose of this PR).
But any feedback or alternate ideas on how to manage this vs what this is doing now?
There was a problem hiding this comment.
Selection of the concurrency library should be in st2.conf not an environment variable. I'd be inclined to use the system section and have concurrency_library as a string type.
There was a problem hiding this comment.
yes please add it as a conf variable instead. I am not opposed to completely dropping eventlet.
|
can we just switch to gevent. why have a variable? |
No description provided.