PSA: Irreversible changes to (new) IDs in our API
We recently migrated our back-end database from PostgreSQL to CockroachDB in order to prepare ourselves for a cloud native back-end infrastructure.
This change by itself wouldn't usually come with any breaking changes, but in this case it has. All IDs for new resources available in the API are now 64-bit integers as opposed to incrementing IDs like previously. This means that if you are using any types less than an i64 or u64 in your code base you need to update your code to support bigger integers.
If you are proxying the GmodStore API to a JavaScript front-end you will need to cast IDs to strings in order to read them, as JavaScript does not support 64-bit integers. BigInt exists, but it will not work when reading values from an API.
It's unclear how many creators are affected by this as only new IDs are affected. We suspect it primarily affects anyone who makes any datatype assumptions for version IDs, like when uploading versions, generating a download link or similar. It may also affect you if you display reviews on your own site.
Unfortunately there was nothing we could do to prevent this from happening as CockroachDB does not have auto incremental IDs due to the sharded nature of data stored in CockroachDB.
Example formats:
Example ID of an old addon: 565
Example ID of a newly created addon/version/review/etc: 693194541050822657
Programming languages we know are not affected
- PHP
- Python 3
Programming languages we know may be affected
- Rust
- C# / C++
- Node.js / JavaScript
- Lua
Please let us know if you are unable to read the integers properly in Node.js / JavaScript, we might have to add a string field for all IDs.