-
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
Investigate AIT errors for PUT /agents/upgrade_custom
test
#23463
Comments
Issue UpdateRelaunched the tests locally several times with the $ pytest test_agent_PUT_endpoints.tavern.yaml
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.8.10, pytest-7.3.1, pluggy-0.13.1
rootdir: /home/fdalmau/git/wazuh/api/test/integration
configfile: pytest.ini
plugins: aiohttp-1.0.4, trio-0.7.0, metadata-2.0.2, tavern-1.23.5, asyncio-0.18.1, html-2.1.1
asyncio: mode=auto
collected 10 items
test_agent_PUT_endpoints.tavern.yaml .......... [100%]
============================================================================================ warnings summary =============================================================================================
../../../../../venv/integrationtest-env/lib/python3.8/site-packages/_pytest/nodes.py:642
/home/fdalmau/venv/integrationtest-env/lib/python3.8/site-packages/_pytest/nodes.py:642: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to YamlFile is deprecated. Please use the (path: pathlib.Path) argument instead.
See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
return super().from_parent(parent=parent, fspath=fspath, path=path, **kw)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================== 10 passed, 1 warning in 1270.56s (0:21:10) ================================================================================ To double check, I relaunched the tests for the
Failed test execution
The
Left the environment up and checked that the status of the task for the agent
And after less than a minute, the task
The master node showed the following logs regarding the task:
ConclusionNo changes are directly related to this behavior between |
ReviewThe investigation was carried out on versions 4.7.4 and 4.7.5, resulting in the reproduction of the error only in the first one. The error appears to be caused by delays in the agent's upgrade tasks that does not complete before the test executes the request. I think we should try to avoid future failures by using the already created (but currently unused) |
Issue Update
|
Description
In #23447 (review) it was found that the
test_agent_PUT_endpoints.tavern.yaml::PUT /agents/{agent_id}/upgrade_custom
test is failing with the following error:Error
The changes introduced in said PR are not related to the endpoint and should not affect it, so the test was also run for
v4.7.4
resulting in the same failure.The origin may be related to the
PUT /agents/upgrade
test case, which was successful and involved the same agent and may have generated the unexpected behavior in the upgrade task that triggered the subsequent error.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: