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
Test data in api/prometheus/v1/api_test.go overflows on 32-bit archs #1132
Comments
Does Circle CI support testing on 32-bit arch? If so, and it is enabled in the config, that would catch such oversights in future. Alternatively, add a test on amd64 which runs with |
@kakkoyun Would you be open to accepting a change to change all fields in the |
Hello 👋 Looks like there was no activity on this issue for the last 3 months. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 |
It is still reproducible, as the underlying cause has not been addressed. |
Closing for now as promised, let us know if you need this to be reopened! 🤗 |
Bad bot. Don't close this. It is not resolved yet. |
Is there any plan to address this? We still have to patch it in Debian so that tests will pass on 32-bit. |
The millisecond-resolution Unix timestamps (i.e., JavaScript-style) in the new TSDBHeadStats struct introduced by #925 will overflow on 32-bit archs
A typical / recent Unix timestamp in millisecond resolution is approximately 760 times larger than a signed 32-bit int can hold.
The struct would need to be modified to use explicit int64 types, or if it is intended to be consumed by JavaScript clients, then it should really match the data type that timestamps are in the JavaScript world - i.e., float64 (JavaScript "number").
Test failure:
It seems that unit tests are only being performed on 64-bit archs, allowing assumptions like this to slip past.
The text was updated successfully, but these errors were encountered: