Polymer renders int64 integer type to a random number |
||
Issue descriptionbuild is a int64 type, and when used as variables in html template rendering, it is always rendered to another random number. For example, 8940798377940317952 -> 8941290266081829792, and this is causing all the build links to point to 404 on Findit flake detection page.
,
Jul 18
I think the reason is that: https://www.w3schools.com/js/js_numbers.asp: JavaScript Numbers are Always 64-bit Floating Point Unlike many other programming languages, JavaScript does not define different types of numbers, like integers, short, long, floating-point etc. JavaScript numbers are always stored as double precision floating point numbers, following the international IEEE 754 standard. This format stores numbers in 64 bits, where the number (the fraction) is stored in bits 0 to 51, the exponent in bits 52 to 62, and the sign in bit 63: Precision Integers (numbers without a period or exponent notation) are accurate up to 15 digits. That explains why large int64 numbers are converted to something random.
,
Jul 31
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/840575c3772d16beff13531c090ce98429dd4642 commit 840575c3772d16beff13531c090ce98429dd4642 Author: Yuke Liao <liaoyuke@chromium.org> Date: Tue Jul 31 01:31:04 2018 [Findit] Update comments of converting type if build ids. This CL updates the comments of converting the type of build ids before rendering HTML pages to reflect the true reasons. Bug: 864426 Change-Id: I13756ccc2c9fd6577b477708876eb45051b8dc86 Reviewed-on: https://chromium-review.googlesource.com/1141544 Reviewed-by: Chan Li <chanli@chromium.org> Commit-Queue: Yuke Liao <liaoyuke@chromium.org> [modify] https://crrev.com/840575c3772d16beff13531c090ce98429dd4642/appengine/findit/handlers/flake/detection/show_flake.py [modify] https://crrev.com/840575c3772d16beff13531c090ce98429dd4642/appengine/findit/handlers/flake/detection/test/show_flake_test.py |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jul 17