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

Dashboards: Numerical ascending sort of query variable values is broken #97881

Open
atsaloli opened this issue Dec 12, 2024 · 1 comment · May be fixed by grafana/scenes#1015
Open

Dashboards: Numerical ascending sort of query variable values is broken #97881

atsaloli opened this issue Dec 12, 2024 · 1 comment · May be fixed by grafana/scenes#1015

Comments

@atsaloli
Copy link

What happened?

Numerical ascending sort of values for a query-type variable is broken in 11.4.

Example:
Image

My query is:

select 50 as row_count 
union all select 500 
union all select 100 
union all select 1000

What did you expect to happen?

I expected the values to be sorted numerically:

  • 50
  • 100
  • 500
  • 1000

Did this work before?

Works fine in Grafana 8.5

How do we reproduce it?

  1. Create a new dashboard
  2. Add a variable of type "query" with a datasource of "clickhouse" and query of:
select 50 as row_count 
union all  select 500 
union all select 100  
union all select 1000 
  1. Set the sort to Numerical (asc)

Reload the dashboard several times and check the variable values selector pull-down.

The values seem to come back in some kind of random order? And the order changes between reloads? Example:

Image

Is the bug inside a dashboard panel?

No

Environment (with versions)?

Grafana: 11.4.0
OS: Ubuntu 24 LTS
Browser: Chrome

Grafana platform?

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

Datasource(s)?

clickhouse

@vaxvms
Copy link
Contributor

vaxvms commented Dec 17, 2024

We experience the same issue with natural sort.

Some tests show that the feature is working fine on version 11.3.2 and is broken on version 11.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants