Closed TimShilov closed 5 months ago
I can't reproduce this issue with Grafana 9 and 10. Which version of Grafana are you using ?
Hello @devnied .
I'm using a self-hosted Grafana v10.2.2 (161e3cac5075540918e3a39004f2364ad104d5bb)
at the moment.
Thanks, and which version of the plugin ?
The plugin is 1.4.1
.
@devnied, I'm experiencing this as well, but it happens specifically when I select a "Time Series" Query Type and the query returns no data. If I switch back to "Table," the error does not occur.
I'm on grafana 9.1.0 with v1.4.1 of the plugin as well - haven't tried the new v1.5.0 yet.
This seems to be the case for @TimShilov as well since I see Could not convert long frame to wide frame
in his log snippet, and that error originates here in the plugin code where it handles the TimeSeries type query. Tracing back a bit further, this occurs because the plugin SDK function data.LongToWide
hands back the error, "can not convert to wide series, input fields have no rows".
Confirming the observed behavior on plugin version 1.5.0 and self-hosted Grafana 10.3.1.
In my understanding, the error only occurs for time series which are build from narrow tables (long tables, EAV tables). It seems to be caused by the pivoting operation which tries to group be label column values but fails due to the empty result set.
Hey, the problem is that when:
frame, err = data.LongToWide(frame, nil)
returns err the frame is set to nil
, then we're calling frame.Fields
The linked PR should resolve this issue.
The plugin crashes when query returns no results. Is there a way to prevent that? I'm using the plugin to monitor Snowflake tasks and when everything's good the result has no rows which causes plugin error.
Here are the logs: