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

Annotations: Switching data source to builtin doesn't remove mappings #87491

Open
rovo89 opened this issue May 8, 2024 · 0 comments
Open

Annotations: Switching data source to builtin doesn't remove mappings #87491

rovo89 opened this issue May 8, 2024 · 0 comments

Comments

@rovo89
Copy link

rovo89 commented May 8, 2024

What happened?

For most data sources (e.g. Static), we can map the annotation details (e.g. title and text) to fields. This makes no sense for builtin data source, hence with #51256 the configuration UI was hidden. But existing mappings still exist in the model and are used when displaying annotations. This leads to the strange effect that e.g. the text isn't visible in the tooltip, although it is stored in the DB.

What did you expect to happen?

Mappings should be cleared when switching to an annotation data source which doesn't support them, or at least they shouldn't be considered when processing annotations.

Did this work before?

Not that I'm aware of.

How do we reproduce it?

  1. Create a new annotation of type "Static".
  2. Add two fields, "abc" and "def".
  3. Map "title" and "text" to these two fields.
  4. Click "Apply".
  5. Verify in the JSON model of the dashboard that the mappings are filled.
  6. Edit the annotation and change the data source to "-- Grafana --".
  7. Observe that mappings are no longer visible in the UI.
  8. Click "Apply".
  9. Find that the mappings still exist in the JSON model.

The following steps can't be executed on the playground since I can't seem to add any annotations:

  1. Go back to the panel and create an annotation with some text.
  2. Hover the annotation and observe that the text isn't shown.

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

I tried most of the steps in the playground:
Grafana: Grafana v11.1.0-69950 (a4bb4c8)
OS:
Browser: Chrome 124

Grafana platform?

None

Datasource(s)?

No response

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

No branches or pull requests

1 participant