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 Configuration Parser For Size Units #447

Open
3 tasks
LucioDonda opened this issue Dec 19, 2024 · 0 comments
Open
3 tasks

Fix Configuration Parser For Size Units #447

LucioDonda opened this issue Dec 19, 2024 · 0 comments
Labels

Comments

@LucioDonda
Copy link
Member

Wazuh version Component Install type Install method Platform
5.0.0 Configration Parser Agent Sources -

Description

After the implementation #385 it was forced to implement a workaround on the configuration parser in order to correctly handle the size units.

LINK

        // This is a workaround for parsing size units
        if (std::string_view(key) == "batch_size")
        {
            should_parse_size = true;
        }

Initially it was implemented using size_t as the type but that was opening a possible conflict with using size_t as his own (e.g. while parsing threads).
Later another option was creating a custom type but that need to shared the header where it's defined in every module that uses it.
Another option was getting the output type and the parsing type from arguments of the template.

  • Design a solution that solves the previous issues.
  • Apply changes.
  • Correct and / or add any Unit Test needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants