Closed maxnovawind closed 6 months ago
thanks for the report @maxnovawind, we are going to investigate this issue.
Thank you @maxnovawind, I could reproduce the issue.
There's a race condition between the async construction of a query builder aware of the timestamp field (fetched from index metadata) and the fetching of terms. On refresh, the terms query may be built before the timefield is set, leading to this error.
That's indeed a bug, it should happen only on refresh, you can work around it by navigating to another page.
@fmassot: this can be fixed with a small refactoring of how the datasource handles its querybuilder, PR on the way
@maxnovawind I just published a 0.4.0 beta version.
Thank you @fmassot @ddelemeny I will try the new version.
Context:
It seems that variables are sometimes lost when refreshing (F5) a dashboard with predefined query variables.
This is my settings in grafana:
By checking the browser inspector, it appears to be related to a call with
_elastic/_msearch
:{"size":0,"query":{"bool":{"filter":[{"range":{"":{"gte":"1706814729878","lte":"1706836329878"}}}]}},"aggs":{"1":{"terms":{"field":"attributes.environment","size":500,"order":{"_key":"asc"}}}}}
As we can see, the
timestamp_nanos
field is empty, causing a bad request when attempting to retrieve different possible values for this field.Environment:
Grafana version: v10.1.2, v10.3.1