Skip to content

Refactor service classes

What does this MR do and why?

This MR refactors the service classes Ci::Runners::GetUsageByProjectService and Ci::Runners::GetUsageService (which share very similar implementations), in order to extract a base class which will make it easier to extend these classes in the future, e.g. for #440605 (closed).

It probably makes sense to review this MR commit-by-commit.

Part of #440605 (closed) and #463079 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

n/a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

There shouldn't be any changes in functionality, as shown by the unchanged tests.

Edited by Pedro Pombeiro

Merge request reports