-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always treat id as string, never a number (in JS) #1405
Comments
Additional info from ☝️ May 22, 2017 5:31 PM...
|
Aside, I believe the REST API always does this anyway for the same reason. |
Right now, the REST API is sending numbers in the JSON, not strings :( .. but @abellotti mentioned a plan to make API send cids instead of those numbers. (Alberto, is there anything ..trackable we can link from here?) |
just added this: https://www.pivotaltracker.com/story/show/146613947 Thanks, |
Oh wow that's super surprising...I brought this up very early on in the development of the API 😕 |
(PR: ManageIQ/manageiq#15430 ) |
(Also related: #3243, but that PR gives me a 500 right now.) |
Right now, some places treat entity ids as numbers, some as strings.
And that would be fine if the max region number were 9006. But unfortunately that's not the case, @tzumainn recently encountered an id looking like
58015000000000001
(so, region = 58015), which is bigger than9007199254740991
(Number.MAX_SAFE_INTEGER
in JS (ref)).Thus, if we need to support regions over 9006, the UI needs to treat every id as a string, never a number.
Furthermore, we'll need the API to never send a number and always convert to a string.
The text was updated successfully, but these errors were encountered: