Skip to content

Split PodLogsService per backend

Adrien Kohlbecker requested to merge ak/refactor-service into master

What does this MR do?

This MR is the service part of the refactoring first identified here #39092 (closed). A separate MR is improving the controller side of things !23614 (closed)

  • Splits PodLogsService into three classes: BaseService, KubernetesService and ElasticsearchService to improve separation of concerns. Specifically, it is now the caller's responsibility to say which source to use, rather than a branch condition hidden well inside the code. Code specific to each platform is also rightfully separated.
  • Moves logging related code from Platform::Kubernetes into the service, for better encapsulation. Reactive caching computation is now the responsibility of each service, rather than the platform class.
  • Rewrites the tests for the entire service to test each individual method, instead of black box testing the execute method. This improves test coverage and readability of the tests.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports