Skip to content
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

[Kibana][Dev tools] Large number handling #186952

Closed
redcinelli opened this issue Jun 26, 2024 · 3 comments
Closed

[Kibana][Dev tools] Large number handling #186952

redcinelli opened this issue Jun 26, 2024 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@redcinelli
Copy link

Kibana version:
8.14.1

Elasticsearch version:
8.14.1

Browser version:
Version 1.67.123 Chromium: 126.0.6478.126 (Official Build) (x86_64)

Original install method (e.g. download page, yum, from source, etc.):
Elastic Cloud

Describe the bug:

When in the dev tools I am playing with large number they get rounded.

Steps to reproduce:

  1. Copy the snippet into your dev tools
PUT 78587377/_bulk
{ "index" : {"_id": 2} }
{
  "myid": "2",
  "ts_id": 1703462528114626562
}
{ "index" : {"_id": 0} }
{
  "myid": "0",
  "ts_id": 1703462528114626560
}
{ "index" : {"_id": 1} }
{
  "myid": "1",
  "ts_id": 1703462528114626561
}
  1. CTRL + i try to auto indent the code
  2. Be surprised, your ts_id have been rounded
PUT 78587377/_bulk
{"index":{"_id":2}}
{"myid":"2","ts_id":1703462528114626600}
{"index":{"_id":0}}
{"myid":"0","ts_id":1703462528114626600}
{"index":{"_id":1}}
{"myid":"1","ts_id":1703462528114626600}
  1. Perform the following search query:
GET /78587377/_search
{
  "size": 3,
  "sort": [ { 
     "ts_id": {"order": "desc"}
  }],
  "_source": "ts_id",
  "fields": [
    "ts_id"
  ]
}

_source will contain the right values, but fields and sort will not.
Performing the same query via a terminal, does not show the same issue, enhance, it believe all big number handling in the dev tools is a bit broken.

Work around

This does not happen when the number is a string.
But as soon as you get number, they get rounded up.

Expected behavior:

I guess not to be rounded

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@redcinelli redcinelli added the bug Fixes for quality problems that affect the customer experience label Jun 26, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 26, 2024
@jsanz jsanz added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Jun 26, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jun 26, 2024
@jsanz
Copy link
Member

jsanz commented Jun 26, 2024

Leaving to @elastic/kibana-management to confirm but this seems related to #40183 and the overall lack of support in JavaScript for 64bit integers

@alisonelizabeth
Copy link
Contributor

Thanks @jsanz! Yes, I believe this is related to #40183.

@redcinelli I'm going to close this in favor of that issue. Please add any additional context there - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

4 participants