Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking dashboards after version upgrade 3=>4 #730

Closed
m1cha3lf opened this issue Feb 24, 2024 · 4 comments · Fixed by #734
Closed

breaking dashboards after version upgrade 3=>4 #730

m1cha3lf opened this issue Feb 24, 2024 · 4 comments · Fixed by #734
Assignees
Labels
datasource/ClickHouse type/bug Something isn't working

Comments

@m1cha3lf
Copy link

What happened:

All dashboards break after upgrading the plugin from 3 => 4

What you expected to happen:

Everything should stay the same or improve

How to reproduce it (as minimally and precisely as possible):

I was able to break it down to the missing selector Format in QueryBuilder.

In version 3 i add a new graph as timeseries and define this query

select toStartOfMinute(dt) as dt,
       count(*),
       errorcode    as code

from default.test

where (dt >= $__fromTime AND dt <= $__toTime)

group by dt, code
order by dt asc

In Format i select "Time Series". The graph is correctly showing a timeseries including my group-by data.

In version 4 the Format selector is missing. The time series graph is always ignoring the group-by data and only showing a wired graph with count() information.

I did check the JSON model of the dashboard and i see that it was marked as "queryType": "table" .

If i change manually the JSON model to timeseries it works again.

How can I make a timeseries graph with group-by work again in plugin version 4?

Anything else we need to know?:

Version 4:
Screenshot 2024-02-24 at 09 13 40

Version 3:
Screenshot 2024-02-24 at 09 12 29

Environment:

  • Grafana version: OSS version and Cloud behave the same
  • Plugin version: 3-4
  • OS Grafana is installed on:
  • User OS & Browser: Firefox / Chrome Mac OSx
  • Others:
@SpencerTorres
Copy link
Collaborator

Hello! Thank you for the issue report.

This sounds like an issue with the query migration logic from v3 to v4.

Can you share the panel/query json of the original (broken) query? Also include the fixed version if you have one.

Thanks!

@SpencerTorres SpencerTorres self-assigned this Feb 24, 2024
@m1cha3lf
Copy link
Author

Hi Spencer,

actually it happens on new dashboards as well.

i have created one new dashboard with plugin version 3 and one with 4. The results are the same as in my initial post

Attached the exported JSON

V3
v3.json
Screenshot 2024-02-24 at 10 37 51

V4
v4.json
Screenshot 2024-02-24 at 10 31 07

I hope that helps. Otherwise i can setup a grafana cloud instance and share access

Thanks a lot for checking this issue!

@SpencerTorres
Copy link
Collaborator

So it looks like the migration script is working correctly. When updating v4 all of my testing showed that there was no change to the panel data within dashboard view when editing the format.

This query proved me wrong. Even though the panel type can be manually selected, the format value does have an effect on how the data is presented.

To fix this, I have re-enabled the queryType/format selector in dashboard view so that you can select the preferred data format. This will show the data as it is in your v3 screenshot.

Thank you for submitting this issue, hopefully we can get this deployed soon for you. 👍

@edin008
Copy link

edin008 commented Mar 2, 2024

I had the same issue. Maybe this info will help in future debugging.
My workaround was to cast number format to string so that group by frequency worked correctly,

Example not ok (frequency in number format, group by does not work):
image
image

Example ok (frequency in string format, group by works)
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource/ClickHouse type/bug Something isn't working
Projects
Archived in project
3 participants