Skip to content

Support BigInt field in front-end for dependency proxy size

Michael Trainor requested to merge tmike-graphql-dpsize-front into master

What does this MR do and why?

Closes #412974 (closed)

PostgreSQL stores the size of dependency proxy blobs and manifests as bigint, so a new GraphQL field has been introduced that handles the larger numbers (encoded as a string). !121959 (merged)

Front-end changes were needed to support the new field that returns a string value of the dependency proxy total size.

The getDependencyProxyTotalSizeQuery GraphQL query is changed to only return the new BigInt field dependencyProxyTotalSizeBytes, as the Int field dependencyProxyTotalSizeInBytes is deprecated as of 16.1.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
before_mr121959 after_mr121959-2

How to set up and validate locally

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

I've found it's easier to change the size for a dependency_proxy_manifests record that is already cached, than to cache over 2.2GB of images.

  1. Create Group
  2. Cache image to dependency proxy for Group
  3. Change the size in dependency_proxy_manifests for the Group to > 2147483648
  4. Navigate to the Group's Usage Quota > Storage page

There should be no 500 error from the getDependencyProxyTotalSizeQuery, UI elements should load, and the total size should be displayed

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 Michael Trainor

Merge request reports