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

SQL Query Reset Issue in Panels with Multiple Clickhouse Altinity Datasources #604

Closed
LeThaumaturge opened this issue Aug 1, 2024 · 2 comments · Fixed by #606
Closed
Assignees
Milestone

Comments

@LeThaumaturge
Copy link

Description:

Hello,

I am encountering an issue with the Clickhouse-Grafana plugin when editing a panel that includes multiple Clickhouse Altinity datasources in mixed mode.

Observed Behavior:

When I edit a panel with multiple Clickhouse Altinity datasources, the SQL query for the first datasource is consistently reset to the following default content: SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t

This is problematic because it's easy to lose custom configurations if not careful.

Steps to Reproduce the Issue:

  • Create two Clickhouse datasources in the Data Sources section with the Altinity plugin for ClickHouse (datasourceA and datasourceB, for example).
  • Create a dashboard including a panel using mixed datasources.
  • Add the two Altinity datasources (datasourceA and datasourceB) with their own configurations.
  • Save the dashboard.
  • Reload the dashboard.
  • Edit the panel without making any changes and cancel via "discard".
  • After these steps, the first query will be reset, which is not the expected behavior. If you click on save, you will see in the incoming changes.

Note: There is no problem if you use the same datasource twice (datasourceA and datasourceA).
Note 2 : There is no problem with previous major version (version 2.5.4 is fine).

Expected Behavior:

The SQL query for each datasource should remain unchanged after editing the panel unless explicit modifications are made.

Additional Information:

Grafana Version: 10.3.6
Clickhouse Plugin Version: 3.2.1 (latest)
Browser: 6.8.3381.50 (Stable channel) (arm64)

Best regards,

@Slach Slach added this to the 3.2.2 milestone Aug 1, 2024
@Slach
Copy link
Collaborator

Slach commented Aug 1, 2024

Thank you so much for reporting, could you make a screencast with wrong behavior to better understanding?

@antip00 could we make e2e test for this scenario?

@LeThaumaturge
Copy link
Author

LeThaumaturge commented Aug 2, 2024

@Slach for sure, here is an example :

Screen.Recording.2024-08-02.at.11.58.21.mov

note: sorry for the multiple updates; I had to modify the attachment.

@Slach Slach closed this as completed in #606 Aug 6, 2024
antip00 added a commit to antip00/clickhouse-grafana that referenced this issue Aug 7, 2024
Slach added a commit that referenced this issue Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants