Split PodLogsService per backend
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
andElasticsearchService
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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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 🤖