Skip to content

Move Groups::UpdateStatistics service/worker from EE

Vijay Hawoldar requested to merge vij-move-statistics-worker into master

What does this MR do and why?

This MR moves the Groups::UpdateStatisticsService and Groups::UpdateStatisticsWorker from EE to CE.

We need to do this so that they can be used to in CE models (DependencyProxy::Blobs and DependencyProxy::Manifests) to trigger the same statistics updates which will happen in !79358 (merged) as part of https://gitlab.com/gitlab-org/gitlab/-/issues/348172

Additional background

The NamespaceStatistics model and associated services/workers (being changed in this MR) were originally added into EE only as the only statistic being stored at the namespace level was an EE-level feature (group wikis). This will no longer be the case going forward as we look to expose more statistics to our customers, including non-EE stats such as DepedencyProxy size.

The NamespaceStatistics model was moved from EE -> CE in !79657 (merged)

How to set up and validate locally

  1. Ensure the worker still queues successfully:
      Groups::UpdateStatisticsWorker.perform_async(some_group.id)
  2. Ensure the service still works:
      Groups::UpdateStatisticsService.new(group, statistics: []).execute

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vijay Hawoldar

Merge request reports

Loading