Commit 708b7016 authored by Matthias van de Meent's avatar Matthias van de Meent

Use FLOAT_TYPE for possibly large fields.

This does update the schema, but does not require large updates in the frontend, as opposed to Types::BigInt which would require string -> number casting. 
GraphQL-induced type casting should prevent type issues according to https://spec.graphql.org/June2018/#sec-Float

The values allowed in this type should suffice for the foreseeable future.

Also  updated the changelog to document this limitation.
parent 27550e2f
......@@ -6,20 +6,20 @@ module Types
authorize :read_statistics
field :commit_count, GraphQL::Types::BigInt, null: false,
field :commit_count, GraphQL::FLOAT_TYPE, null: false,
description: 'Commit count of the project'
field :storage_size, GraphQL::Types::BigInt, null: false,
field :storage_size, GraphQL::FLOAT_TYPE, null: false,
description: 'Storage size of the project'
field :repository_size, GraphQL::Types::BigInt, null: false,
field :repository_size, GraphQL::FLOAT_TYPE, null: false,
description: 'Repository size of the project'
field :lfs_objects_size, GraphQL::Types::BigInt, null: false,
field :lfs_objects_size, GraphQL::FLOAT_TYPE, null: false,
description: 'Large File Storage (LFS) object size of the project'
field :build_artifacts_size, GraphQL::Types::BigInt, null: false,
field :build_artifacts_size, GraphQL::FLOAT_TYPE, null: false,
description: 'Build artifacts size of the project'
field :packages_size, GraphQL::Types::BigInt, null: false,
field :packages_size, GraphQL::FLOAT_TYPE, null: false,
description: 'Packages size of the project'
field :wiki_size, GraphQL::Types::BigInt, null: true,
field :wiki_size, GraphQL::FLOAT_TYPE, null: true,
description: 'Wiki size of the project'
end
end
......@@ -6,11 +6,11 @@ module Types
authorize :read_statistics
field :storage_size, GraphQL::Types::BigInt, null: false, description: 'The total storage in bytes'
field :repository_size, GraphQL::Types::BigInt, null: false, description: 'The Git repository size in bytes'
field :lfs_objects_size, GraphQL::Types::BigInt, null: false, description: 'The LFS objects size in bytes'
field :build_artifacts_size, GraphQL::Types::BigInt, null: false, description: 'The CI artifacts size in bytes'
field :packages_size, GraphQL::Types::BigInt, null: false, description: 'The packages size in bytes'
field :wiki_size, GraphQL::Types::BigInt, null: false, description: 'The wiki size in bytes'
field :storage_size, GraphQL::FLOAT_TYPE, null: false, description: 'The total storage in bytes'
field :repository_size, GraphQL::FLOAT_TYPE, null: false, description: 'The Git repository size in bytes'
field :lfs_objects_size, GraphQL::FLOAT_TYPE, null: false, description: 'The LFS objects size in bytes'
field :build_artifacts_size, GraphQL::FLOAT_TYPE, null: false, description: 'The CI artifacts size in bytes'
field :packages_size, GraphQL::FLOAT_TYPE, null: false, description: 'The packages size in bytes'
field :wiki_size, GraphQL::FLOAT_TYPE, null: false, description: 'The wiki size in bytes'
end
end
---
title: >
#42671: Project and group storage statistics now support values larger than 4GiB
#42671: Project and group storage statistics now support values up to 8 PiB (up from 4GiB)
merge_request: 23131
author: Matthias van de Meent
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment