Skip to content

Add Google Artifact Registry count to Service Ping

What does this MR do and why?

Add the new counter of the projects that have active Google Artifact Registry integration to Service Ping.

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.

How to set up and validate locally

Execute the following commands in the rails console:

  1. Make sure that all required criteria for the integration are met

    Feature.enable(:google_cloud_support_feature_flag) # to set the FF
    ::Gitlab::Saas.feature_available?(:google_cloud_support) # should return true. More about how to simulate the SaaS instance locally https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance
  2. Verify the integration Google Artifact Registry google_cloud_platform_artifact_registry is listed among the available integrations

    Integration.available_integration_names(include_dev: false, include_disabled: true)
  3. Verify that the metric returns 0

    Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values, cached: false)['counts']['projects_google_cloud_platform_artifact_registry_active']

    The counter should return 0

  4. Create a new Google Artifact Registry integration

    FactoryBot.create(:google_cloud_platform_artifact_registry_integration)
  5. Verify that the metric is updated

    Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values, cached: false)['counts']['projects_google_cloud_platform_artifact_registry_active']

    The counter should return 1

Related to #441693 (closed)

Edited by Dzmitry Meshcharakou

Merge request reports