Skip to content

Refactor the output component #2086

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

Draft
wants to merge 2 commits into
base: mauro/ROX-28981-rework-collector-iservice-protobuf
Choose a base branch
from

Conversation

Molter73
Copy link
Collaborator

Description

This is a follow up to #2063.

This PR is focused on re-organizing the newly created CollectorOutput component into its own namespace. It is also grouped together with the sensor formatter, since they are tightly couple at the moment, but this might change in the near future.

A formal IClient interface is introduced and implementers of if are grouped into their own namespaces, this should make it easier to implement new output types by simply adding a new client in a separate namespace and implementing the interface. Right now the IClient interface only accounts for processes, but it will be extended in the near future to take a const std::variant& in order for it to also handle network information. This should also make it more flexible for adding newer message types in the future.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why you did not do so. (Valid reasons include "CI is sufficient" or "No testable changes")
In addition to reviewing your code, reviewers must also review your testing instructions, and make sure they are sufficient.

For more details, ref the Confluence page about this section.

@Molter73 Molter73 force-pushed the mauro/ROX-28981-rework-collector-iservice-protobuf branch from f677d59 to 85cb9c6 Compare April 15, 2025 11:09
@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 26 lines in your changes missing coverage. Please review.

Project coverage is 27.02%. Comparing base (ffbe42c) to head (8341cda).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
collector/lib/output/Formatter.cpp 45.45% 6 Missing ⚠️
collector/lib/output/Output.cpp 33.33% 6 Missing ⚠️
collector/lib/output/grpc/Client.h 0.00% 6 Missing ⚠️
collector/lib/output/log/Client.h 0.00% 4 Missing ⚠️
collector/lib/output/grpc/Client.cpp 0.00% 3 Missing ⚠️
collector/lib/system-inspector/Service.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                                 Coverage Diff                                 @@
##           mauro/ROX-28981-rework-collector-iservice-protobuf    #2086   +/-   ##
===================================================================================
  Coverage                                               27.02%   27.02%           
===================================================================================
  Files                                                      98      100    +2     
  Lines                                                    6046     6046           
  Branches                                                 2701     2701           
===================================================================================
  Hits                                                     1634     1634           
  Misses                                                   3693     3693           
  Partials                                                  719      719           
Flag Coverage Δ
collector-unit-tests 27.02% <33.33%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Molter73 Molter73 force-pushed the mauro/refactor-output branch from d733fff to 908e931 Compare April 15, 2025 11:14
@Molter73 Molter73 force-pushed the mauro/ROX-28981-rework-collector-iservice-protobuf branch from 85cb9c6 to ffbe42c Compare April 15, 2025 13:12
@Molter73 Molter73 force-pushed the mauro/refactor-output branch from 908e931 to 8341cda Compare April 15, 2025 13:13
@Molter73 Molter73 force-pushed the mauro/ROX-28981-rework-collector-iservice-protobuf branch from ffbe42c to efc1c53 Compare April 23, 2025 13:38
@Molter73 Molter73 force-pushed the mauro/refactor-output branch from 8341cda to 14555ea Compare April 23, 2025 13:38
@Molter73 Molter73 force-pushed the mauro/ROX-28981-rework-collector-iservice-protobuf branch from efc1c53 to 6f05199 Compare April 23, 2025 15:29
@Molter73 Molter73 force-pushed the mauro/refactor-output branch from 14555ea to 0527c42 Compare April 23, 2025 15:29
Simplify naming for classes in the output namespace.
Create dedicated namespaces for gprc and log implementations of IClient.
@Molter73 Molter73 force-pushed the mauro/ROX-28981-rework-collector-iservice-protobuf branch from 6f05199 to 51fdfaa Compare April 23, 2025 16:33
@Molter73 Molter73 force-pushed the mauro/refactor-output branch from 0527c42 to 7d26ea8 Compare April 23, 2025 16:33
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.

2 participants