Skip to content

Add dependency_proxy_size to GraphQL type

Vijay Hawoldar requested to merge vij-expose-root-dp-stats into master

What does this MR do and why?

As part of https://gitlab.com/gitlab-org/gitlab/-/issues/348172 we have added dependency_proxy_size to Namespaces::RootStorageStatistics.

This MR exposes that column via the GraphQL type for the model, so that the frontend can use it to display storage statistics for DependencyProxy to our users.

How to set up and validate locally

  1. Ensure you have a Namespaces::RootStorageStatistics record with a dependency_proxy_size value
    rss = Namespace::RootStorageStatistics.find_or_create_by!(namespace_id: root_namespace_id)
    rss.update(dependency_proxy_size: 1234567)
  2. Query for that value in GraphQL at http://gdk.host/-/graphql-explorer
    query {
      namespace(fullPath: "path-to-root-namespace-used-above") {
        rootStorageStatistics {
          dependencyProxySize
        }
      }
    }

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