Commit 379dcea0 authored by Nicolas Dular's avatar Nicolas Dular

Use FLOAT_TYPE for storage limit

INT would not be enough to cover storage limits we are dealing with
since it's send in bytes. It also gets stored as bigint in the
database.

We're using FLOAT_TYPE here since BIG_INT is not exposed as a type
in our GraphQL lib at this time and it would require us to convert
it to a string since INT bigger than 32 bit are not supported:
https://spec.graphql.org/June2018/#sec-Int
parent 7def0411
......@@ -27,7 +27,7 @@ module Types
description: 'Indicates if Large File Storage (LFS) is enabled for namespace'
field :request_access_enabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if users can request access to namespace'
field :storage_size_limit, GraphQL::INT_TYPE, null: true,
field :storage_size_limit, GraphQL::FLOAT_TYPE, null: true,
description: 'Total storage limit of the root namespace in bytes',
resolve: -> (obj, _args, _ctx) { Namespace::RootStorageSize.new(obj).limit }
......
---
title: Use FLOAT_TYPE for storage limit
merge_request: 35559
author:
type: fixed
......@@ -5236,7 +5236,7 @@ type Group {
"""
Total storage limit of the root namespace in bytes
"""
storageSizeLimit: Int
storageSizeLimit: Float
"""
The permission level required to create subgroups within the group
......@@ -8064,7 +8064,7 @@ type Namespace {
"""
Total storage limit of the root namespace in bytes
"""
storageSizeLimit: Int
storageSizeLimit: Float
"""
Visibility of the namespace
......
......@@ -14407,7 +14407,7 @@
],
"type": {
"kind": "SCALAR",
"name": "Int",
"name": "Float",
"ofType": null
},
"isDeprecated": false,
......@@ -24041,7 +24041,7 @@
],
"type": {
"kind": "SCALAR",
"name": "Int",
"name": "Float",
"ofType": null
},
"isDeprecated": false,
......@@ -804,7 +804,7 @@ Autogenerated return type of EpicTreeReorder
| `requireTwoFactorAuthentication` | Boolean | Indicates if all users in this group are required to set up two-factor authentication |
| `rootStorageStatistics` | RootStorageStatistics | Aggregated storage statistics of the namespace. Only available for root namespaces |
| `shareWithGroupLock` | Boolean | Indicates if sharing a project with another group within this group is prevented |
| `storageSizeLimit` | Int | Total storage limit of the root namespace in bytes |
| `storageSizeLimit` | Float | Total storage limit of the root namespace in bytes |
| `subgroupCreationLevel` | String | The permission level required to create subgroups within the group |
| `twoFactorGracePeriod` | Int | Time before two-factor authentication is enforced |
| `userPermissions` | GroupPermissions! | Permissions for the current user on the resource |
......@@ -1239,7 +1239,7 @@ Contains statistics about a milestone
| `path` | String! | Path of the namespace |
| `requestAccessEnabled` | Boolean | Indicates if users can request access to namespace |
| `rootStorageStatistics` | RootStorageStatistics | Aggregated storage statistics of the namespace. Only available for root namespaces |
| `storageSizeLimit` | Int | Total storage limit of the root namespace in bytes |
| `storageSizeLimit` | Float | Total storage limit of the root namespace in bytes |
| `visibility` | String | Visibility of the namespace |
## Note
......
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