Skip to content
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

Fix in remote_operations_handler.py functions #5155

Merged

Conversation

MARCOSD4
Copy link
Member

@MARCOSD4 MARCOSD4 commented Mar 26, 2024

Description

This PR aims to make the necessary changes in the code to avoid that the Vulnerability Detector E2E tests do not continuing if any error occurs during the setup of some of the agents, that is to say, if any error occurs during this phase, the execution must continue to allow the development of the rest of the agents. For this purpose, some functions of the remote_operations_handler.py script have been modified, since the problem was detected in them because, in the event of an error, they terminated the execution of the function using raise error. They have been modified so that they do not terminate the execution but simply report the error and continue the process.

The functions install_package, remove_package, and update_package have been modified, since although these last two are not currently executed during setup, they also produce the same error during the development of the body tasks and therefore if they fail for one system, the execution would not progress for the rest.

Testing performed

The upgrade_package_maintain_vulnerability test was run on the environment https://ci.wazuh.info/job/Wazuh_QA_environment/1038/ and the results are as follows:

image

report5097.zip

@MARCOSD4 MARCOSD4 self-assigned this Mar 26, 2024
@MARCOSD4 MARCOSD4 linked an issue Mar 26, 2024 that may be closed by this pull request
@MARCOSD4 MARCOSD4 marked this pull request as ready for review March 27, 2024 15:26
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job overall. However, there are a couple of issues that need to be addressed:

  • The current approach doesn't prevent the test case from running for endpoints that failed in the setup phase, leading to inefficient testing.
  • It's noted that these functions will undergo refactoring in the future to address code coupling.

Despite these concerns, we'll proceed with these changes for now. This will enable us to generate a comprehensive report for all endpoints, even in failure cases

@davidjiglesias davidjiglesias merged commit e16b21f into enhancement/vd-e2e-tests Apr 2, 2024
1 of 2 checks passed
@davidjiglesias davidjiglesias deleted the bug/5097-fix-setup-vd-e2e-tests branch April 2, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulnerability Detector E2E test does not continue if setup fails
3 participants