Closed Bruno-DaSilva closed 2 years ago
I took a look in my dev console to see what's going on. I notice that there are TWO /api/ds/query
endpoint requests being sent out - one of them returns results and one of them does not. If the zero-result query fails then the panel renders, if it succeeds then it shows no data.
The two requests are identical except for the payload:
{
"queries": [
{
"refId": "A",
"expr": "sum by (queue) (avg_over_time(rabbitmq_queue_messages{queue=~\"...\"}[5m:]))",
"editorMode": "code",
"range": true,
"legendFormat": "__auto",
"datasource": {
"uid": "vSyGdhP7z",
"type": "prometheus"
},
"queryType": "timeSeriesQuery",
"exemplar": false,
"requestId": "undefinedA",
"utcOffsetSec": -14400,
"interval": "",
"datasourceId": 30,
"intervalMs": 31536000000,
"maxDataPoints": 0
}
],
"range": {
"from": "2022-07-27T12:00:00.000Z",
"to": "2022-07-27T20:45:59.000Z",
"raw": {
"from": "2022-07-27T12:00:00.000Z",
"to": "2022-07-27T20:45:59.000Z"
}
},
"from": "1658923200000",
"to": "1658954759000"
}
{
"queries": [
{
"refId": "A",
"expr": "sum by (queue) (avg_over_time(rabbitmq_queue_messages{queue=~\"...\"}[5m:]))",
"editorMode": "code",
"range": true,
"legendFormat": "__auto",
"datasource": {
"uid": "vSyGdhP7z",
"type": "prometheus"
},
"queryType": "timeSeriesQuery",
"exemplar": false,
"requestId": "undefinedA",
"utcOffsetSec": -14400,
"interval": "",
"datasourceId": 30,
"intervalMs": 30000,
"maxDataPoints": 809
}
],
"range": {
"from": "2022-07-27T12:00:00.000Z",
"to": "2022-07-27T20:45:59.000Z",
"raw": {
"from": "2022-07-27T12:00:00.000Z",
"to": "2022-07-27T20:45:59.000Z"
}
},
"from": "1658923200000",
"to": "1658954759000"
}
And here's an example of the no data query failing and the panel rendering
Thanks for a great bug report, we'll look into this!
@Bruno-DaSilva What a great report, thank you so much. We'll take a look and see if we can figure out what's going on here. cc @idk-92
@Bruno-DaSilva Thanks for the awesome write up! This should be resolved with the next release.
@Bruno-DaSilva if you don't mind closing out this issue if things look good on your end!
Can confirm, looks like it's working. Thanks all!
Describe the bug On load of an incident page, queries show as blank. Very occasionally they will render correctly. If you edit the query and save it, it renders correctly until you refresh again.
To Reproduce Steps to reproduce the behavior:
Expected behavior The query panel shows the saved query as a graph.
Screenshots
Relevant system information Browser: Google Chrome 103.0.5060.134 Grafana: v9.0.5 (1b595e434) Incident: 1.0.0-beta29 Browser timezone: EDT (UTC-4) Organization timezone: America/Toronto (UTC-4)