-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade SQLAlchemy to >= 2.0.22 #20443
Upgrade SQLAlchemy to >= 2.0.22 #20443
Comments
Issue UpdateThe latest SQLAlchemy version is UTs ExecutionWhen installing SQLAlchemy version used(unittest-env-3.10) fdalmau@wazuhFW:~/git/wazuh(enhancement/20443-sqlalchemy-update)$ pip3 show sqlalchemy
Name: SQLAlchemy
Version: 2.0.23
Summary: Database Abstraction Library
Home-page: https://www.sqlalchemy.org
Author: Mike Bayer
Author-email: mike_mp@zzzcomputing.com
License: MIT
Location: /home/fdalmau/venv/unittest-env-3.10/lib/python3.10/site-packages
Requires: greenlet, typing-extensions
Required-by: API$ pytest api/api/
====================================================================== test session starts ======================================================================
platform linux -- Python 3.10.13, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/fdalmau/git/wazuh/api/api
configfile: pytest.ini
plugins: cov-3.0.0, aiohttp-1.0.4, trio-0.7.0, anyio-3.6.2, metadata-2.0.2, tavern-1.23.5, asyncio-0.18.1, html-2.1.1
asyncio: mode=auto
collected 560 items
api/api/controllers/test/test_active_response_controller.py . [ 0%]
api/api/controllers/test/test_agent_controller.py ............................................ [ 8%]
api/api/controllers/test/test_cdb_list_controller.py ...... [ 9%]
api/api/controllers/test/test_ciscat_controller.py . [ 9%]
api/api/controllers/test/test_cluster_controller.py ........................ [ 13%]
api/api/controllers/test/test_decoder_controller.py ....... [ 14%]
api/api/controllers/test/test_default_controller.py . [ 15%]
api/api/controllers/test/test_event_controller.py . [ 15%]
api/api/controllers/test/test_experimental_controller.py ............... [ 17%]
api/api/controllers/test/test_manager_controller.py .................. [ 21%]
api/api/controllers/test/test_mitre_controller.py ....... [ 22%]
api/api/controllers/test/test_overview_controller.py . [ 22%]
api/api/controllers/test/test_rootcheck_controller.py .... [ 23%]
api/api/controllers/test/test_rule_controller.py ........ [ 24%]
api/api/controllers/test/test_sca_controller.py .. [ 25%]
api/api/controllers/test/test_security_controller.py ................................................... [ 34%]
api/api/controllers/test/test_syscheck_controller.py .... [ 34%]
api/api/controllers/test/test_syscollector_controller.py ......... [ 36%]
api/api/controllers/test/test_task_controller.py . [ 36%]
api/api/controllers/test/test_vulnerability_controller.py .... [ 37%]
api/api/models/test/test_model.py .............................. [ 42%]
api/api/test/test_alogging.py ...................... [ 46%]
api/api/test/test_authentication.py ........... [ 48%]
api/api/test/test_configuration.py ............................................. [ 56%]
api/api/test/test_encoder.py ... [ 57%]
api/api/test/test_middlewares.py ............... [ 59%]
api/api/test/test_uri_parser.py ... [ 60%]
api/api/test/test_util.py .............................................. [ 68%]
api/api/test/test_validator.py .......................................................................................................................... [ 90%]
...................................................... [100%]
===================================================================== 560 passed in 13.97s ====================================================================== Framework$ pytest framework/
====================================================================== test session starts ======================================================================
platform linux -- Python 3.10.13, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/fdalmau/git/wazuh/framework
configfile: pytest.ini
plugins: cov-3.0.0, aiohttp-1.0.4, trio-0.7.0, anyio-3.6.2, metadata-2.0.2, tavern-1.23.5, asyncio-0.18.1, html-2.1.1
asyncio: mode=auto
collected 2194 items
framework/scripts/tests/test_agent_groups.py .............. [ 0%]
framework/scripts/tests/test_agent_upgrade.py ............... [ 1%]
framework/scripts/tests/test_cluster_control.py ...... [ 1%]
framework/scripts/tests/test_rbac_control.py ......... [ 2%]
framework/scripts/tests/test_wazuh_clusterd.py ....... [ 2%]
framework/scripts/tests/test_wazuh_logtest.py ...................... [ 3%]
framework/wazuh/core/cluster/dapi/tests/test_dapi.py ................................ [ 4%]
framework/wazuh/core/cluster/tests/test_client.py ................ [ 5%]
framework/wazuh/core/cluster/tests/test_cluster.py ................................... [ 7%]
framework/wazuh/core/cluster/tests/test_common.py .................................................................................... [ 10%]
framework/wazuh/core/cluster/tests/test_control.py ...... [ 11%]
framework/wazuh/core/cluster/tests/test_local_client.py .............. [ 11%]
framework/wazuh/core/cluster/tests/test_local_server.py ........................ [ 12%]
framework/wazuh/core/cluster/tests/test_master.py ............................................... [ 15%]
framework/wazuh/core/cluster/tests/test_server.py ............................. [ 16%]
framework/wazuh/core/cluster/tests/test_utils.py ............ [ 16%]
framework/wazuh/core/cluster/tests/test_worker.py .................................. [ 18%]
framework/wazuh/core/tests/test_active_response.py .................... [ 19%]
framework/wazuh/core/tests/test_agent.py ................................................................................................................ [ 24%]
..................................... [ 26%]
framework/wazuh/core/tests/test_cdb_list.py ...................................... [ 27%]
framework/wazuh/core/tests/test_common.py ......... [ 28%]
framework/wazuh/core/tests/test_configuration.py ....................................................................... [ 31%]
framework/wazuh/core/tests/test_decoder.py ................ [ 32%]
framework/wazuh/core/tests/test_exception.py .......... [ 32%]
framework/wazuh/core/tests/test_input_validator.py ... [ 32%]
framework/wazuh/core/tests/test_logtest.py .. [ 32%]
framework/wazuh/core/tests/test_manager.py ................ [ 33%]
framework/wazuh/core/tests/test_mitre.py ............. [ 34%]
framework/wazuh/core/tests/test_pyDaemonModule.py ..... [ 34%]
framework/wazuh/core/tests/test_results.py ........................................ [ 36%]
framework/wazuh/core/tests/test_rootcheck.py ............. [ 36%]
framework/wazuh/core/tests/test_rule.py ....................... [ 38%]
framework/wazuh/core/tests/test_sca.py ............................. [ 39%]
framework/wazuh/core/tests/test_security.py ............. [ 39%]
framework/wazuh/core/tests/test_stats.py ................. [ 40%]
framework/wazuh/core/tests/test_syscheck.py ....... [ 41%]
framework/wazuh/core/tests/test_syscollector.py ... [ 41%]
framework/wazuh/core/tests/test_task.py ........ [ 41%]
framework/wazuh/core/tests/test_utils.py ................................................................................................................ [ 46%]
......................................................................................................................................................... [ 53%]
............... [ 54%]
framework/wazuh/core/tests/test_vulnerability.py .. [ 54%]
framework/wazuh/core/tests/test_wazuh_queue.py ....................... [ 55%]
framework/wazuh/core/tests/test_wazuh_socket.py .................... [ 56%]
framework/wazuh/core/tests/test_wdb.py ............................... [ 57%]
framework/wazuh/core/tests/test_wlogging.py ............ [ 58%]
framework/wazuh/rbac/tests/test_auth_context.py .. [ 58%]
framework/wazuh/rbac/tests/test_decorators.py ........................................................................................................... [ 63%]
.. [ 63%]
framework/wazuh/rbac/tests/test_default_configuration.py ......................................................... [ 65%]
framework/wazuh/rbac/tests/test_orm.py .............................................................. [ 68%]
framework/wazuh/rbac/tests/test_preprocessor.py ........... [ 69%]
framework/wazuh/tests/test_active_response.py ............ [ 69%]
framework/wazuh/tests/test_agent.py ..................................................................................................................... [ 75%]
............ [ 75%]
framework/wazuh/tests/test_cdb_list.py ..................................................... [ 78%]
framework/wazuh/tests/test_ciscat.py ................................. [ 79%]
framework/wazuh/tests/test_cluster.py .......... [ 80%]
framework/wazuh/tests/test_decoder.py .......................................................... [ 82%]
framework/wazuh/tests/test_event.py .... [ 82%]
framework/wazuh/tests/test_logtest.py ...... [ 83%]
framework/wazuh/tests/test_manager.py .................................... [ 84%]
framework/wazuh/tests/test_mitre.py ....... [ 85%]
framework/wazuh/tests/test_rootcheck.py .................................................. [ 87%]
framework/wazuh/tests/test_rule.py .......................................................................... [ 90%]
framework/wazuh/tests/test_sca.py ........... [ 91%]
framework/wazuh/tests/test_security.py ....................................................................... [ 94%]
framework/wazuh/tests/test_stats.py ............... [ 95%]
framework/wazuh/tests/test_syscheck.py ......................... [ 96%]
framework/wazuh/tests/test_syscollector.py ............ [ 96%]
framework/wazuh/tests/test_task.py ............................ [ 98%]
framework/wazuh/tests/test_vulnerability.py ........................................ [100%]
=============================================================== 2194 passed in 652.36s (0:10:52) ================================================================ |
Wazuh embedded Python interpreterThe SQLAlchemy dependency has been updated in the embedded interpreter, not showing any errors during the installation both in the
|
API Integration TestsTest reportTest results
|
Description
During the investigation of a warning in the RBAC unit tests in #20260, I've found that the reason behind it was a bug in SQLAlchemy's source code.
There's an issue where under some garbage collection/exception scenarios the connection pool's cleanup routine would fail because of an unexpected state. This was fixed in the following commit which was introduced in the
2.0.22
version.We are currently using
2.0.0
, so we should upgrade to that version or a newer one.Checks
The following elements have been updated or reviewed (should also be checked if no modification is required):
api/test/integration/mapping/_test_mapping.py
).The text was updated successfully, but these errors were encountered: