moxious / triage

testing triage actions for issues
0 stars 1 forks source link

Datasources: multiple default datasources #256

Open tonypowa opened 6 months ago

tonypowa commented 6 months ago

What happened?

Since we upgraded to Grafana 10.2.3 (introduced in helm release 7.0.22) we are frequently seeing Grafana ignoring the is_default: false attribute when creating new datasources. We even see multiple datasources being marked as default, which should not be possible.

This also leads to idempotency issues when using terraform:


 # grafana_data_source.additional["foo"] will be updated in-place

 ~ resource "grafana_data_source" "additional" {

 id = "1:8"

 ~ is_default = true -> false

 name = "Foo"

 # (9 unchanged attributes hidden)

 }

 # grafana_data_source.additional["bar"] will be updated in-place

 ~ resource "grafana_data_source" "additional" {

 id = "1:15"

 ~ is_default = true -> false

 name = "Bar"

 # (9 unchanged attributes hidden)

 }

 # grafana_data_source.additional["baz"] will be updated in-place

 ~ resource "grafana_data_source" "additional" {

 id = "1:7"

 ~ is_default = true -> false

 name = "Baz"

 # (8 unchanged attributes hidden)

 }

 # grafana_data_source.additional["qux"] will be updated in-place

 ~ resource "grafana_data_source" "additional" {

 id = "1:6"

 ~ is_default = true -> false

 name = "Qux"

 # (8 unchanged attributes hidden)

 }

What did you expect to happen?

Datasources should not be marked as default.

Did this work before?

Yes

How do we reproduce it?

We create tens of datasources with terraform with a parallelism of 25, so high concurrency. All have the is_default value set to false.

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana Enterprise: 10.2.3

Grafana platform?

Self-hosted

Datasource(s)?

All of them

tonypowa commented 6 months ago

This issue is a test copy of an issue in another repo. Original issue: https://github.com/grafana/grafana/issues/#80785

moxious commented 6 months ago

Hi @tonypowa,

It seems like you're encountering issues with multiple default datasources and idempotency with Terraform when using Grafana Enterprise. Given the nature of your problem, it's related to the core functionality of Grafana datasources and their interaction with infrastructure as code tools. This looks like an issue that would best be handled by the Enterprise datasources project team, so I'm tagging this issue for their attention.

/label ~"Enterprise datasources project"

Hope this helps, and the team should be with you shortly to assist further!