influxdata / ui

UI for InfluxDB
89 stars 41 forks source link

Bug: Dynamic query zoom breaks when using dashboard variables #6863

Open msegado opened 4 months ago

msegado commented 4 months ago

About the bug

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Create a dashboard with (a) a dashboard variable, and (b) a graph using that variable in its query.
  2. Zoom into the graph to trigger a re-query of the data at finer granularity

Expected behavior:

The graph displays more granular data from the new query.

Actual behavior:

Visual Proof:

Here's a dashboard graph of some query results which depend on a dashboard variable, with the time range set to the 7 days: image

Here's what I see if I click-and-drag to zoom into the first ~5.5 hours of the graph; note the lack of time resolution in the data: image

In contrast, here's what I see if I manually update the time range (via the dropdown at the top right of the dashboard UI) to the same 5.5 hour window instead of using the zoom feature: image

The browser console displays a 400 error for a POST request to the /api/v2/query?orgID=... endpoint initiated by query.ts:61, and the response payload for that request contains the following JSON:

{
    "code": "invalid",
    "message": "error @5:40-5:41: record is missing label [redacted_variable_name]"
}

About your environment

Environment info:

Cloud version of Influx 2 (TSM), so no shell access to run the requested commands.