wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
63 stars 30 forks source link

DTT2 - Workflow engine - Findings and recommendations #5044

Open mhamra opened 3 months ago

mhamra commented 3 months ago
Target version Related issue Related PR/dev branch
4.9 #4989 https://github.com/wazuh/wazuh-qa/tree/4996-dtt1-iteration-3-workflow-engine-unit-tests
4.9 #4996 https://github.com/wazuh/wazuh-qa/tree/4989-dtt1-iteration-3-workflow-engine-module-release-workflow-module

Description

While developing the unit tests for DTT1 iteration 3 - Workflow engine, I had the opportunity to review the workflow engine source code thoroughly. I list the findings in this issue for discussion and triage of several requests that the team will assess to improve the code quality, endurance, and maintainability.

Code Style Remarks and Best Practices:

Exception handling Best Practices

Import statements

Suggestions and Ideas

Requested fixes - cosmetics and bugs

Design and Architecture

I propose creating a global configuration object from a yaml config file. In the current design, the worflow_engine.main.py entry point parses the command arguments and converts them to a dictionary passed directly to the WorkflowProcessor constructor. If a new parameter is defined in the future, the class constructor must be changed. The global configuration can be accessed for any class that should be globally parameterized in the future.

rauldpm commented 3 months ago

We will discuss this in the daily meeting of 2024/03/11 or 2024/03/13 -> Blocked internal

rauldpm commented 3 months ago

Move this issue to https://github.com/wazuh/wazuh-qa/issues/4495 as epic

fcaffieri commented 3 months ago

This issue will be include in DTT Tier 2