Closed rocketeerbkw closed 6 months ago
Is Float the better one to use, since we use it for storage bytes? https://github.com/uselagoon/lagoon/blob/main/services/api/src/typeDefs.js#L947
Is Float the better one to use, since we use it for storage bytes? https://github.com/uselagoon/lagoon/blob/main/services/api/src/typeDefs.js#L947
I checked the graphql spec and it doesn't specify what the max size of a float is. There's a random comment on a SO question that says it's 52 or 128 bits.... but no source was provided.
I would expect the storage calculator and restore sizes to be mostly equivalent, so if it works for storage I suppose it should be fine for restores.
Describe the bug
The GraphQL type for the
restoreSize
field is set asInt
which only allows signed 32-bit integers. Since the size is recorded in bytes, this can be larger than theInt
type. In this case the api will error with:Int cannot represent non 32-bit signed integer value
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The api stores and retrieves restore size without errors.
Additional context
Introduced in https://github.com/uselagoon/lagoon/pull/3599.