grafana / opensearch-datasource

Apache License 2.0
27 stars 21 forks source link

Updating/Opening annotations break the logic and may break the dashboards #143

Open hardikbajaj opened 1 year ago

hardikbajaj commented 1 year ago

What happened: Updating or opening an annotation messes up the dashboard logic, and query field becomes empty. This breaks the annotation query logic.

When you add annotation, JSON model of dashboard look like this

Screenshot 2023-04-18 at 11 07 19 AM

When you just open the annotation or update any field apart from query, JSON model becomes this

Screenshot 2023-04-18 at 11 09 03 AM

the target field contains the query now, which the annotation don't read and full timeseries panel is filled with annotations at all time stamps. This can break the dashboard in cases where time range is very high.

What you expected to happen: The query field to always contain the query added in UI

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

Anything else we need to know?:

Environment:

fridgepoet commented 1 year ago

Thanks @hardikbajaj for reporting this. Looks like it is the same as https://github.com/grafana/grafana/pull/66762 (thanks Gábor for such a nice explanation).

It looks like we will need to make a similar fix.

Adding "good first issue" since there is a model PR to follow.

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!