Description
Internally, most database identifiers are sized as 64-bits. Some appear to have initially been sized as 32-bit and were adjusted, requiring breaking changes in the API. See databaseId being deprecated for fullDatabaseId..
I'm not sure that we correctly use int64 types for all database IDs and it's possible the CLI has an overflow somewhere. We should go through our structures that represent API responses and validate this.
More Context
One of the challenges here is that we need to look at both GQL and REST endpoint usage. While GQL provides some kind of type safety, it's also not consistent in that sometimes databaseId is an Int and sometimes it's a BigInt. Fortunately, these really are different types (rather than different ranges over numbers), they can't be confused when actually parsing JSON e.g.:
json: cannot unmarshal number into Go struct field PullRequest.Data.Repository.PullRequests.Nodes.DatabaseID of type string
For REST, we should just assume that all integers are 64-bit.
Independently, I also came up with the same idea that Mislav had, that we should lint for this: #3432 (review) and some work was done here #3466
Description
Internally, most database identifiers are sized as 64-bits. Some appear to have initially been sized as 32-bit and were adjusted, requiring breaking changes in the API. See
databaseIdbeing deprecated forfullDatabaseId..I'm not sure that we correctly use
int64types for all database IDs and it's possible the CLI has an overflow somewhere. We should go through our structures that represent API responses and validate this.More Context
One of the challenges here is that we need to look at both GQL and REST endpoint usage. While GQL provides some kind of type safety, it's also not consistent in that sometimes
databaseIdis anIntand sometimes it's aBigInt. Fortunately, these really are different types (rather than different ranges over numbers), they can't be confused when actually parsing JSON e.g.:For REST, we should just assume that all integers are 64-bit.
Independently, I also came up with the same idea that Mislav had, that we should lint for this: #3432 (review) and some work was done here #3466