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

Time range resets to 24 hours on variables refresh in Grafana 11.3 when using query variables #118

Closed
p5i opened this issue Nov 22, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@p5i
Copy link

p5i commented Nov 22, 2024

After updating Grafana to v11.3.0 or v11.3.1 time range resets to 24 hours when variables are refreshed.
To reproduce you can add variable of type 'query', make it refresh on time range change, than build the time series graph.
Try to change time range to less then 24 hours and it will remain 24 hours.

photo

I tried the datasource versions v0.8.0 and v0.7.0

@koriit-kontakt
Copy link

Hi, we are having the same issue. It started happening after upgrading to Grafana v11.3.0 from v11.2.2. We tested it with datasource versions v0.6.1 and v0.9.0.

@p5i the workaround of not having variables refresh on time range change is also working in our case, thanks a lot!

@Loori-R Loori-R added the bug Something isn't working label Dec 4, 2024
@Loori-R Loori-R self-assigned this Dec 4, 2024
@dmitryk-dk
Copy link
Contributor

Hi @p5i , @koriit-kontakt ! I Suppose this issue is related to this issue

@p5i
Copy link
Author

p5i commented Dec 5, 2024

Hi @dmitryk-dk
Thanks for the answer.
That issue may be related, but not exactly the same, according to the description.
I don't have InfluxDB to check if there is similar problem.
I use also Graphite and Loki datasources and there is no such issues.

My problem is that time range of the query differs from time range specified on the dashboard. For example I set 1 munute range on the dashboard, but in the query I see 24 hours (23:59:59 exactly) range.

On the dashboard:
2024-12-05 12-12-29

In the Query Inspector:
2024-12-05 12-12-55

The query to VL from the network dump:
POST /select/logsql/stats_query_range?end=1731963599&query=%2A%7C+stats+count%28%29&start=1731877200&step=1m0s HTTP/1.1

date -u -d @1731877200
Sun Nov 17 21:00:00 UTC 2024

date -u -d @1731963599
Mon Nov 18 20:59:59 UTC 2024

Reproduced with Grafana v11.3.2 and victorialogs-datasource v0.10.0

@dmitryk-dk
Copy link
Contributor

Hi @dmitryk-dk Thanks for the answer. That issue may be related, but not exactly the same, according to the description. I don't have InfluxDB to check if there is similar problem. I use also Graphite and Loki datasources and there is no such issues.

My problem is that time range of the query differs from time range specified on the dashboard. For example I set 1 munute range on the dashboard, but in the query I see 24 hours (23:59:59 exactly) range.

On the dashboard: 2024-12-05 12-12-29

In the Query Inspector: 2024-12-05 12-12-55

The query to VL from the network dump: POST /select/logsql/stats_query_range?end=1731963599&query=%2A%7C+stats+count%28%29&start=1731877200&step=1m0s HTTP/1.1

date -u -d @1731877200
Sun Nov 17 21:00:00 UTC 2024

date -u -d @1731963599
Mon Nov 18 20:59:59 UTC 2024

Reproduced with Grafana v11.3.2 and victorialogs-datasource v0.10.0

I think it is mostly Grafana issue instead of plugin, but anyway we will check what can cause the problem

@hagen1778
Copy link
Contributor

Weirdly, I can reproduce the issue at playground with latest Grafana version. But can't do it in our internal snadbox that runs v11.2.1

@p5i
Copy link
Author

p5i commented Dec 6, 2024

I built the datasource plugin with the #137 fix. It doesn't seam to fix time range reset.

@dmitryk-dk
Copy link
Contributor

I built the datasource plugin with the #137 fix. It doesn't seam to fix time range reset.

@Loori-R could you take a look, please?

@Loori-R
Copy link
Contributor

Loori-R commented Dec 6, 2024

I built the datasource plugin with the #137 fix. It doesn't seam to fix time range reset.

Hi @p5i! Could you share how you built and launched the plugin?
It might be a caching issue. Does the problem persist when you open Grafana in incognito mode?

@p5i
Copy link
Author

p5i commented Dec 6, 2024

@Loori-R Thanks. Checked in Chromium browser and in private mode in Firefox. Both ways work fine. It is some Firefox caching problem.

UPD: Completely cleaning site data for the domain in Firefox helped.

@dmitryk-dk
Copy link
Contributor

Hi @p5i ! The issue was fixed in the new release. Please check it. If you find any problems feel free to reopen the issue.

@koriit-kontakt
Copy link

v0.11.0 fixed this issue for us. Thanks a lot!

@p5i
Copy link
Author

p5i commented Dec 10, 2024

@dmitryk-dk
v0.11.1 works fine, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants