Skip to content

Check project onboarded before getting usage data

What does this MR do and why?

Adds an additional check to the backend when looking up a projects product analytics usage data.

If the project has not been onboarded with product analytics, do not make a request to the analytics-configurator.

This helps speed up the endpoint, and avoids unnecessary database does not exist errors from being thrown in the configurator.

Screenshots or screen recordings

No visual changes.

How to set up and validate locally

  1. Requires GitLab Ultimate.
  2. Follow these instructions to set up Product Analytics in your GDK.
  3. Enable product analytics
  4. Set up a group containing a product analytics onboarded project, and another project which is not using product analytics
  5. tail your analytics-configurator docker logs
  6. Visit a group -> Settings -> Usage Quota
  7. Verify that the configurator only receives usage quota requests for the onboarded projects, and does not throw database-does-not-exist errors for the others

MR acceptance checklist

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

Related to #432826 (closed)

Edited by Elwyn Benson

Merge request reports