Skip to content

Exclude container_registry_size from storage_size

Vijay Hawoldar requested to merge vij-remove-container-reg-storage-size into master

What does this MR do and why?

This MR will exclude container_registry_size from being included in the ProjectStatistics#storage_size total.

This is because it was added by mistake. We should not include the container registry size in the Project's storage size because it will be bubbled up into the RootStorageStatistics#storage_size here, which is not applicable due to the way in which the container registry storage sizes are calculated.

Refs https://gitlab.com/gitlab-org/gitlab/-/issues/358389#note_933418552 and #354480 (closed)

Note: this column is not yet updated as the update method is behind a disabled feature flag, :container_registry_project_statistics so there is no impact when making this change.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Find a ProjectStatistics record and check it's storage_size:
     ps = ProjectStatistics.last
     ps.storage_size
  2. Update the container registry size and confirm storage size has not changed:
     ps.update(container_registry_size: 99999999)
    
     ps.storage_size

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