Unable to create a Watch with a Range query on a Long field using the max value for Java's Long #87723
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Watcher
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
triage_needed
Kibana version:
7.10.0
Elasticsearch version:
7.10.0
Server OS version:
Elastic Cloud
Browser version:
Chrome 87.0.4280.88
Browser OS version:
Original install method (e.g. download page, yum, from source, etc.):
Describe the bug:
I'm trying to create several Watches in Kibana based on a templated Watch definition (everything will be in the Watch's "metadata"). Each watch will use a range query on a Long field that uses slightly different upper/lower bounds. The range query looks like this:
For one of these watches, I'd like to use the following values for the range:
"gte": 10000000000000
"lt": 9223372036854775807
, where 9223372036854775807 is (2^63)-1 which is Java's Long.MAX_VALUEIt seems that in order to use 9223372036854775807 I have to make it a String in the metadata:
The bug here is that I need to quote the 9223372036854775807 value to be able to save or simulate the watch even though this should be a value allowed by Elasticsearch. Furthermore, performing this range query works fine using DevTools which indicates different handling between the Watcher page and the DevTools page.
Steps to reproduce:
Try to create a watch that uses a range query with the above Long values. This will fail unless the 9223372036854775807 is wrapped in quotes.
Expected behavior:
Since 9223372036854775807 is a valid value for a Long field in Elasticsearch, I would expect that the Watcher UI would allow this to be passed in. At a minimum it would be nice to display an error describing the issue and that quotes are required.
Screenshots (if relevant):
N/A
Errors in browser console (if relevant):
None
Provide logs and/or server output (if relevant):
Any additional context:
The text was updated successfully, but these errors were encountered: