voxpupuli / puppet-grafana

Puppet module to manage Grafana
Apache License 2.0
15 stars 106 forks source link

Fix idempotent issue in grafana_datasource provider #297

Closed tobias-urdin closed 2 years ago

tobias-urdin commented 2 years ago

This fixes the idempotent issue mentioned in the issue.

Fixes https://github.com/voxpupuli/puppet-grafana/issues/289

joernott commented 2 years ago

I actually noded, that there are two fields (depending on the datasource)

Notice: /Stage[main]/Profiles_monitoring::Grafana::Icinga_config/Grafana_datasource[icinga2_influxdb]/password: changed [redacted] to [redacted]
Notice: /Stage[main]/Profiles_monitoring::Grafana::Icinga_config/Grafana_datasource[icinga2_influxdb]/basic_auth_password: changed [redacted] to [redacted]

so, the patch should be applied to the "password" field as well

alexjfisher commented 2 years ago

@joernott Good spot. I've did some manual testing on @tobias-urdin's change and it looked good.

I'll see if I can add some acceptance tests for both types of datasource.

alexjfisher commented 2 years ago

This doesn't seem to work if basic_auth_password is something other than an empty string (the default). I think I've seen the issue. Will test a fix shortly.

tobias-urdin commented 2 years ago

Closing in favor of https://github.com/voxpupuli/puppet-grafana/pull/301