Add code owners metric to DevOps adoption page [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Merged Pavel Shutsin requested to merge 326008-add-codeowners-to-devops-adoption into master

What does this MR do?

Adds code owner metric to GraphQL API for DevOps adoption page

Feature flag reasoning

There are some performance concerns which are being discussed here, so the feature flag was introduced as an easy switch for the metric in case of big load. We'll remove the flag when discussion finishes.

Migration output

== 20210421081724 AddCodownersDevopsAdoptionSnapshot: reverting ===============
-- remove_column(:analytics_devops_adoption_snapshots, :codeowners_used_count, :integer)
   -> 0.0054s
-- remove_column(:analytics_devops_adoption_snapshots, :total_projects_count, :integer)
   -> 0.0020s
== 20210421081724 AddCodownersDevopsAdoptionSnapshot: reverted (0.0100s) ======

== 20210421081724 AddCodownersDevopsAdoptionSnapshot: migrating ===============
-- add_column(:analytics_devops_adoption_snapshots, :total_projects_count, :integer)
   -> 0.0075s
-- add_column(:analytics_devops_adoption_snapshots, :code_owners_used_count, :integer)
   -> 0.0027s
== 20210421081724 AddCodownersDevopsAdoptionSnapshot: migrated (0.0103s) ======

Does this MR meet the acceptance criteria?


Availability and Testing


If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #326008 (closed)

Edited by Matthias Käppler