michelin / snowflake-grafana-datasource

Snowflake Grafana datasource plugin enables the visual representation of Snowflake data within Grafana dashboards and manages alerts.
Apache License 2.0
67 stars 33 forks source link

Query Editor not saving queries after edition #73

Closed feleuterio closed 4 months ago

feleuterio commented 4 months ago

Hello,

Great project! Hope to help with some feedback.

The release v1.6.0 came with a bug in the query editor. When we update the query in the editor, it tries to run the "demo" query in the preview, instead of my custom query, and when we Apply the changes to the panel, it keeps running the "demo" query instead of my customized query.

When I open to Edit the panel, my custom query is not on the editor, its the "demo" query that is there, even after I've applied the changes.

In my specific case, I came from v1.5.0 so I already had some queries working. Those kept working after upgrading, but when I edited them, they kept referencing the old version of the query.

Looking into the json of the dashboard, I could see the "demo" query or the old version of the query was in the JSON instead of the new queries after saving.

I'm not sure what is causing the issue, if it is "Use Grafana's Code editor for query editing." or "Add query context cancellation."

But I got this error on my logs:

│ logger=plugin.michelin-snowflake-datasource t=2024-04-22T18:00:25.140415658Z level=error msg="Could not execute query" err="context canceled" query="myquery"

I rolled back to v1.5.0 and queries are saving again.

Thank you! Hope this to be of some help.

acherubinoklaviyo commented 4 months ago

I am seeing the same behavior when using v1.6.0 of the plugin with Grafana v8.3.5, v8.3.11, v8.5.27, and v9.5.18, however it seems to be working fine for me on Grafana v10.4.2, so I believe this may only be an issue with major versions of Grafana >10.

Rolling back to v1.5.0 of the plugin has worked for those older versions of Grafana.

mkumar-eneco commented 4 months ago

Hi guys, There seems to be a bug in grafana-plugin-sdk-go v0.217.0, that is used in this version of the plugin.