Skip to content

Make Gitlab::UsageData.uncached_data private

Alina Mihaila requested to merge am-use-only-data-usage_data-method into master

What does this MR do and why?

Related MR !77629 (merged)

Make the Gitlab::UsageData.uncached_data private.

This way we will use only data(force_refresh: force_refresh) method as an API for generating the Service Ping payload.

This refactor will help with !77629 (merged), hopefully, would help with transitioning from usage of UsageData to new service ServicePingMetrics

There should not be any change in the logic of generating service ping.

  • uncached_data method is private now
  • Method that is used is Gitlab::UsageData.data
  • Update tests
  • Update usage of uncached_data
  • This way UsageData class has only one method to generate the service ping payload and considers the cache option
  • Update UsageDataNonSqlMetrics and UsageDataQueries

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

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 Alina Mihaila

Merge request reports