Skip to content

InfluxDB client: Start / Stop times are ignored in FLUX queries on 11.0 and 11.1 #89948

Closed
@PeterHasse

Description

What happened?

All our FLUX dashboards stopped working when upgrading from the 11 preview release to 11.1. Downgrading to 10.4.5 resolved the issue. From the Grafana Log output it looks like Grafana is ignoring the selected start and stop time and uses 1970 instead, see log below:

Jul 02 12:48:48 monitoring grafana[1411]: logger=tsdb.influx_flux endpoint=queryData pluginId=influxdb dsName=InfluxDB dsUID=Ckrwhbn4k uname=admin t=2024-07-02T12:48:48.002535688Z level=warn msg="Flux query failed" err="invalid: error in building plan while starting program: cannot query an empty range" query="customTagValues = (bucket, tag, predicate=(r) => true, start=1970-01-01T00:00:00Z, stop=1970-01-01T00:00:00Z) =>\n from(bucket: bucket)\n |> range(start: start, stop: stop)\n |> filter(fn: predicate)\n |> keep(columns: [tag])\n |> group()\n |> distinct(column: tag)\n\ncustomTagValues(bucket: \"Aladin_November\", tag: \"device\")" Jul 02 12:48:48 monitoring grafana[1411]: logger=tsdb.influx_flux endpoint=queryData pluginId=influxdb dsName=InfluxDB dsUID=Ckrwhbn4k uname=admin t=2024-07-02T12:48:48.002687311Z level=warn msg="Flux query failed" err="invalid: error in building plan while starting program: cannot query an empty range" query="customTagValues = (bucket, tag, predicate=(r) => true, start=1970-01-01T00:00:00Z, stop=1970-01-01T00:00:00Z) =>\n from(bucket: bucket)\n |> range(start: start, stop: stop)\n |> filter(fn: predicate)\n |> keep(columns: [tag])\n |> group()\n |> distinct(column: tag)\n\ncustomTagValues(bucket: \"Aladin_November\", tag: \"measurement_name\")"

It does not make a difference if a custom time frame is selected or e.g. last 5 min. Up / Downgrading reproducible triggers / solves the issue

What did you expect to happen?

Successful data query

Did this work before?

yes, with Grafana 10.4.5 it works as expected

How do we reproduce it?

1.Add Flux data source
2. add a dashboard
3. add a query

Is the bug inside a dashboard panel?

no

Environment (with versions)?

Grafana: 11.1.0
OS: Ubuntu 22.04.4
Browser: Chromium

Grafana platform?

A package manager (APT, YUM, BREW, etc.)

Datasource(s)?

InfluxDB Flux

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions