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 closerCore With behaviour #210

Merged
merged 9 commits into from
May 31, 2024
Merged

Conversation

belimawr
Copy link
Contributor

@belimawr belimawr commented May 30, 2024

What does this PR do?

This commit fixes the behaviour of closerCore.With when With is called or selective debug logging is used. It also adds tests to ensure it works as expected.

The tests are a modification of existing tests that calls the configuration functions like Beats does and ensures both closerCore and typedCore are used. The method calls get proxyed from one core to another, so both are tested together.

The race detector is also enabled on Linux and Mac. For Windows it requires CGO and the installation of GCC on the host, hence it's not enabled on this PR.

Why is it important?

It fixes some bugs introduced by #205

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

## Author's Checklist
## Related issues

This commit fixes the behaviour of `closerCore.With` and add tests to
ensure it works as expected.

The tests are a modification of existing tests that calls the
configuration functions like Beats does and ensures both closerCore
and typedCore are used. The method calls get proxyed from one core to
another, so both are tested together.
@belimawr belimawr added the Team:Elastic-Agent Label for the Agent team label May 30, 2024
@belimawr belimawr self-assigned this May 30, 2024
@belimawr belimawr requested a review from a team as a code owner May 30, 2024 15:59
@belimawr belimawr requested review from rdner, fearful-symmetry and leehinman and removed request for a team May 30, 2024 15:59
belimawr added 8 commits May 30, 2024 13:16
Close all loggers so the temporary folders can be removed on Windows.

All lint warnings are also fixed
Disable the race detector on Windows and remove the race bug
introduced to test the CI execution of the race detector.
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @belimawr

@belimawr belimawr merged commit d9dd081 into elastic:main May 31, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants